diff --git a/deluge/ui/webui/render.py b/deluge/ui/webui/render.py index a119bd36a..f0ef48a98 100644 --- a/deluge/ui/webui/render.py +++ b/deluge/ui/webui/render.py @@ -180,6 +180,12 @@ def template_get(key): val = getcookie(key) return val +def id_to_label(text): + "translated capitalize" + text = text.replace("_"," ") + text = text.capitalize() + return _(text) + template.Template.globals.update({ 'sort_head': template_sort_head, 'part_stats':template_part_stats, @@ -205,7 +211,8 @@ template.Template.globals.update({ #'env':'0.6', 'forms':web.Storage(), 'enumerate':enumerate, - 'base':'' #updated when running within apache. + 'base':'', #updated when running within apache. + 'id_to_label':id_to_label }) #/template-defs diff --git a/deluge/ui/webui/templates/classic/config.html b/deluge/ui/webui/templates/classic/config.html index be7bc0fc0..c09b30145 100644 --- a/deluge/ui/webui/templates/classic/config.html +++ b/deluge/ui/webui/templates/classic/config.html @@ -6,7 +6,7 @@ $:render.admin_toolbar('config')
$for group in groups: -

$group

+

$id_to_label(group)

-

$form.group / $form.title

+

$id_to_label(form.group) / $form.title

$form.info
$:form.pre_html() diff --git a/deluge/ui/webui/templates/white/part_label_filters.html b/deluge/ui/webui/templates/white/part_label_filters.html index f2eb4ceaa..1a3a93624 100644 --- a/deluge/ui/webui/templates/white/part_label_filters.html +++ b/deluge/ui/webui/templates/white/part_label_filters.html @@ -24,7 +24,7 @@ $if get('filter_cat') == "keyword": $filter_items --> $for cat in filter_items.keys(): -
$cat
+
$id_to_label(cat)