[ZPT] CVS: Zope/lib/python/Products/PageTemplates - TALES.py:1.34
Florent Guillaume
fg@nuxeo.com
Mon, 23 Sep 2002 15:58:53 -0400
Update of /cvs-repository/Zope/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv30762
Modified Files:
TALES.py
Log Message:
Provide a context to the translation service so that it can
be placeful.
=== Zope/lib/python/Products/PageTemplates/TALES.py 1.33 => 1.34 ===
--- Zope/lib/python/Products/PageTemplates/TALES.py:1.33 Thu Sep 19 10:39:24 2002
+++ Zope/lib/python/Products/PageTemplates/TALES.py Mon Sep 23 15:58:52 2002
@@ -247,6 +247,8 @@
def translate(self, domain, msgid, mapping=None,
context=None, target_language=None):
+ if context is None:
+ context = self.contexts.get('here')
return getGlobalTranslationService().translate(
domain, msgid, mapping=mapping,
context=context, target_language=target_language)