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

Barry Warsaw barry@zope.com
Thu, 17 Apr 2003 16:05:42 -0400


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

Modified Files:
	engine.py 
Log Message:
Make the various i18n interfaces more consistent in their argument
order.  Some required domain before msgid, others had those two
reversed.  We standardize on msgid before domain because msgid can be
a MessageID instance which carries its domain around with it.  So in
that case we don't need to specify domain and can make it an argument
with a default value of None.

Update all found call sites of the old order, fixed interfaces and
tests.  Ran the tests and z3.py with Python 2.2.2 -- I hope I got them
all!


=== Zope3/src/zope/app/pagetemplate/engine.py 1.11 => 1.12 ===
--- Zope3/src/zope/app/pagetemplate/engine.py:1.11	Tue Apr 15 17:14:39 2003
+++ Zope3/src/zope/app/pagetemplate/engine.py	Thu Apr 17 16:05:11 2003
@@ -64,9 +64,7 @@
         macro = removeAllProxies(macro)
         return macro
 
-    # 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):
+    def translate(self, msgid, domain=None, 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)