[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form - widget.py:1.28

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


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

Modified Files:
	widget.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/browser/form/widget.py 1.27 => 1.28 ===
--- Zope3/src/zope/app/browser/form/widget.py:1.27	Wed Apr 16 16:25:30 2003
+++ Zope3/src/zope/app/browser/form/widget.py	Thu Apr 17 16:05:11 2003
@@ -125,7 +125,7 @@
 
     def label(self):
         ts = getService(self.context.context, "Translation")
-        title = ts.translate("zope", self.title, context=self.request)
+        title = ts.translate(self.title, "zope", context=self.request)
         if title is None:
             title = self.title
         return '<label for="%s">%s</label>' % (
@@ -580,7 +580,7 @@
 
     def label(self):
         ts = getService(self.context.context, "Translation")
-        title = ts.translate("zope", self.title, context=self.request)
+        title = ts.translate(self.title, "zope", context=self.request)
         if title is None:
             title = self.title
         # radio field's label isn't "for" anything