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')