[Zope3-checkins] CVS: Zope3/src/zope/app/pagetemplate - engine.py:1.9
Fred L. Drake, Jr.
fred@zope.com
Thu, 3 Apr 2003 14:55:21 -0500
Update of /cvs-repository/Zope3/src/zope/app/pagetemplate
In directory cvs.zope.org:/tmp/cvs-serv24709/app/pagetemplate
Modified Files:
engine.py
Log Message:
Pass default text to the translation service in a few more places.
=== Zope3/src/zope/app/pagetemplate/engine.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/pagetemplate/engine.py:1.8 Tue Mar 25 19:19:57 2003
+++ Zope3/src/zope/app/pagetemplate/engine.py Thu Apr 3 14:55:20 2003
@@ -61,13 +61,13 @@
macro = removeAllProxies(macro)
return macro
- def translate(self, domain, msgid, mapping):
+ def translate(self, domain, msgid, mapping, default=None):
# When running Zope, request is a Proxy, but no mutation is done here,
# so it is safe to remove all proxies
request = removeAllProxies(self.request)
# XXX should we cache the translator instance?
translator = Translator(request.locale, domain, self.context)
- return translator.translate(msgid, mapping)
+ return translator.translate(msgid, mapping, default=default)
class ZopeEngine(ExpressionEngine):