mirror of
https://git.deluge-torrent.org/deluge
synced 2025-09-16 23:11:54 +00:00
id_to_label
This commit is contained in:
parent
531cf70911
commit
8c676a950e
3 changed files with 11 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ $:render.admin_toolbar('config')
|
|||
<!--left block-->
|
||||
<div class="panel" id="config_chooser">
|
||||
$for group in groups:
|
||||
<h3>$group</h3>
|
||||
<h3>$id_to_label(group)</h3>
|
||||
<ul>
|
||||
$for page in pages:
|
||||
$if pages[page].group == group:
|
||||
|
@ -18,7 +18,7 @@ $for group in groups:
|
|||
</div>
|
||||
<!--form block-->
|
||||
<div class="panel" id="config_panel">
|
||||
<h2>$form.group / $form.title</h2>
|
||||
<h2>$id_to_label(form.group) / $form.title</h2>
|
||||
<div class="info">$form.info</div>
|
||||
<form method="POST">
|
||||
$:form.pre_html()
|
||||
|
|
|
@ -24,7 +24,7 @@ $if get('filter_cat') == "keyword":
|
|||
$filter_items
|
||||
-->
|
||||
$for cat in filter_items.keys():
|
||||
<div class="title">$cat</div>
|
||||
<div class="title">$id_to_label(cat)</div>
|
||||
<ul>
|
||||
$for value, count in filter_items[cat]:
|
||||
<li
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue