[Zope3-checkins] CVS: Zope3/src/zope/tal/tests - test_talgettext.py:1.3

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


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

Modified Files:
	test_talgettext.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/tal/tests/test_talgettext.py 1.2 => 1.3 ===
--- Zope3/src/zope/tal/tests/test_talgettext.py:1.2	Thu Apr  3 11:18:38 2003
+++ Zope3/src/zope/tal/tests/test_talgettext.py	Thu Apr 17 16:05:14 2003
@@ -24,19 +24,19 @@
     """Test the PO engine functionality, which simply adds items to a catalog
     as .translate is called
     """
-    
+
     def test_translate(self):
         test_keys = ['foo', 'bar', 'blarf', 'washington']
-        
+
         engine = POEngine()
         engine.file = 'foo.pt'
         for key in test_keys:
-            engine.translate(None, key, None, 1)
+            engine.translate(key)
 
         for key in test_keys:
-            self.failIf( (key not in engine.catalog),
-                         "POEngine catalog does not properly store message ids"
-                         )
+            self.failIf(key not in engine.catalog,
+                        "POEngine catalog does not properly store message ids"
+                        )
 
 def test_suite():
     suite = unittest.makeSuite(test_POEngine)