Hi,

webpy added extensions support for Jinja2 template engine, but i18n
extension should be improvement again.

Dirty patch attached.

-- 
Best Regards.

Zhang Huangbin

- iRedMail: Mail Server Solution for Red Hat(R) Enterprise Linux & CentOS 5.x:
  http://code.google.com/p/iredmail/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

--- web/contrib/template.py	2009-03-12 21:19:04.000000000 +0800
+++ /usr/lib/python2.4/site-packages/web/contrib/template.py	2009-03-13 13:34:45.000000000 +0800
@@ -83,10 +83,13 @@
     """
     def __init__(self, *a, **kwargs):
         extensions = kwargs.pop('extensions', [])
+        translations = kwargs.pop('translations', None)
         globals = kwargs.pop('globals', {})
 
         from jinja2 import Environment,FileSystemLoader
         self._lookup = Environment(loader=FileSystemLoader(*a, **kwargs), extensions=extensions)
+        if translations is not None:
+            self._lookup.install_gettext_translations(translations)
         self._lookup.globals.update(globals)
         
     def __getattr__(self, name):

Reply via email to