[Zope3-checkins] CVS: Zope3/src/zope/tal - talgettext.py:1.8

Fred L. Drake, Jr. fred@zope.com
Thu, 3 Apr 2003 16:31:40 -0500


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

Modified Files:
	talgettext.py 
Log Message:
Be more thorough about passing the default text the right way at each
layer.


=== Zope3/src/zope/tal/talgettext.py 1.7 => 1.8 ===
--- Zope3/src/zope/tal/talgettext.py:1.7	Thu Apr  3 16:26:17 2003
+++ Zope3/src/zope/tal/talgettext.py	Thu Apr  3 16:31:40 2003
@@ -86,14 +86,12 @@
     def evaluateBoolean(self, expr):
         return 1 # dummy
 
-    def translate(self, domain, msgid, default, mapping, position):
+    def translate(self, domain, msgid, mapping, position, default=None):
         # assume domain and mapping are ignored; if they are not,
         # unit test must be updated.
         if msgid not in self.catalog:
             self.catalog[msgid] = []
-            
         self.catalog[msgid].append((self.file, position))
-
         return 'x'
 
 class UpdatePOEngine(POEngine):
@@ -187,10 +185,11 @@
     def evaluatePathOrVar(self, expr):
         return 'who cares'
 
-    def translate(self, domain, msgid, mapping, position):
+    def translate(self, domain, msgid, mapping, position,
+                  default=None):
         if msgid not in self.base:
-            POEngine.translate(self, domain, msgid, mapping, position)
-
+            POEngine.translate(self, domain, msgid, mapping, position,
+                               default=default)
         return 'x'
     
 def main():