[Checkins] SVN: five.pt/trunk/src/five/pt/pagetemplate.py Set target_language so translations works.

Sylvain Viollon sylvain at infrae.com
Fri Oct 10 06:24:05 EDT 2008


Log message for revision 91976:
  Set target_language so translations works.
  
  

Changed:
  U   five.pt/trunk/src/five/pt/pagetemplate.py

-=-
Modified: five.pt/trunk/src/five/pt/pagetemplate.py
===================================================================
--- five.pt/trunk/src/five/pt/pagetemplate.py	2008-10-10 09:30:40 UTC (rev 91975)
+++ five.pt/trunk/src/five/pt/pagetemplate.py	2008-10-10 10:24:04 UTC (rev 91976)
@@ -50,6 +50,8 @@
         context = aq_inner(view.context)        
 
         def template(*args, **kwargs):
+            # Next is fast so more efficient that IUserPreferedLanguages
+            language = view.request.get('I18N_LANGUAGE', None)
             namespace = dict(
                 view=view,
                 context=context,
@@ -62,6 +64,7 @@
                 root=root,
                 modules=SecureModuleImporter,
                 views=ViewMapper(context, view.request),
+                target_language=language,
                 options=kwargs)
             if default_namespace:
                 namespace.update(default_namespace)



More information about the Checkins mailing list