summaryrefslogtreecommitdiff
path: root/tmpl.py
diff options
context:
space:
mode:
Diffstat (limited to 'tmpl.py')
-rw-r--r--tmpl.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tmpl.py b/tmpl.py
index 3e7d8b5..e9f3483 100644
--- a/tmpl.py
+++ b/tmpl.py
@@ -19,6 +19,7 @@ def do_translate(text):
if type(transl) == unicode:
return transl
return transl.decode('utf-8')
+_ = do_translate
def select_language():
if cherrypy.thread_data.lang != None:
lang = cherrypy.thread_data.lang
@@ -55,7 +56,7 @@ def render(*args, **kwargs):
template = cherrypy.thread_data.template
#ctxt = Context(url = cherrypy.url)
- ctxt = Context(url = myurl, lang = cherrypy.thread_data.lang)
+ ctxt = Context(url = myurl, lang = cherrypy.thread_data.lang, _ = do_translate)
ctxt.push(kwargs)
return template.generate(ctxt)