[ZPT] CVS: Zope/lib/python/Products/PageTemplates - TALES.py:1.31.6.5
Florent Guillaume
fg@nuxeo.com
Mon, 23 Sep 2002 15:57:37 -0400
Update of /cvs-repository/Zope/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv30550/lib/python/Products/PageTemplates
Modified Files:
Tag: Zope-2_6-branch
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.31.6.4 => 1.31.6.5 ===
--- Zope/lib/python/Products/PageTemplates/TALES.py:1.31.6.4 Fri Sep 20 15:52:25 2002
+++ Zope/lib/python/Products/PageTemplates/TALES.py Mon Sep 23 15:57:37 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)