[Zope3-checkins] CVS: Zope3/src/zope/app/pagetemplate - engine.py:1.11

Barry Warsaw barry@zope.com
Tue, 15 Apr 2003 17:14:40 -0400


Update of /cvs-repository/Zope3/src/zope/app/pagetemplate
In directory cvs.zope.org:/tmp/cvs-serv25518/src/zope/app/pagetemplate

Modified Files:
	engine.py 
Log Message:
ZopeContext.translate(): Set mapping default value to None.  When
msgid is a MessageID, the mapping tags along with the object so it
needn't be specified.

Ideally, I'd like to change the signature of this message so that
msgid comes first and domain defaults to None.  The domain tags along
with MessageIDs too, so they needn't be always specified.


=== Zope3/src/zope/app/pagetemplate/engine.py 1.10 => 1.11 ===
--- Zope3/src/zope/app/pagetemplate/engine.py:1.10	Mon Apr 14 08:15:50 2003
+++ Zope3/src/zope/app/pagetemplate/engine.py	Tue Apr 15 17:14:39 2003
@@ -64,7 +64,9 @@
         macro = removeAllProxies(macro)
         return macro
 
-    def translate(self, domain, msgid, mapping, default=None):
+    # XXX msgid should come first, with domain defaulting to None.  When msgid
+    # is a MessageID, domain tags along and needn't be specified.
+    def translate(self, domain, msgid, mapping=None, 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)