[Zope-Checkins] CVS: Zope3/lib/python/Zope/I18n - GettextMessageCatalog.py:1.2 GlobalTranslationService.py:1.4

Stephan Richter srichter@cbu.edu
Thu, 13 Jun 2002 12:35:49 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/I18n
In directory cvs.zope.org:/tmp/cvs-serv9162/lib/python/Zope/I18n

Modified Files:
	GettextMessageCatalog.py GlobalTranslationService.py 
Log Message:
Added Headers to the translation .po files and fixed a bug in the tests.


=== Zope3/lib/python/Zope/I18n/GettextMessageCatalog.py 1.1 => 1.2 ===
         'See Zope.I18n.IMessageCatalog.IMessageCatalog'
         self._prepareTranslations()
-        msg = self.__translation_object.gettext(id)
+        msg = self.__translation_object.ugettext(id)
         if msg == id:
             raise KeyError
         return msg
@@ -58,7 +58,7 @@
     def queryMessage(self, id, default=None):
         'See Zope.I18n.IMessageCatalog.IMessageCatalog'
         self._prepareTranslations()
-        text = self.__translation_object.gettext(id)
+        text = self.__translation_object.ugettext(id)
         if text != id:
             return text
         if default is None:


=== Zope3/lib/python/Zope/I18n/GlobalTranslationService.py 1.3 => 1.4 ===
             text = catalog.queryMessage(msgid)
 
-        # XXX That should be done by the gettext module
-        text = unicode(text, 'latin-1')
         # Now we need to do the interpolation
         return self.interpolate(text, mapping)