patch gettext for compat w/ catalog generated by cw < 3.5 3.5
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 17 Sep 2009 11:08:09 +0200
branch3.5
changeset 3279 6a2cde3f886e
parent 3278 293068aeee41
child 3280 c1f5625f2fea
patch gettext for compat w/ catalog generated by cw < 3.5
gettext.py
--- a/gettext.py	Thu Sep 17 09:52:19 2009 +0200
+++ b/gettext.py	Thu Sep 17 11:08:09 2009 +0200
@@ -421,7 +421,7 @@
         elif self._charset:
             return tmsg.encode(self._charset)
         return tmsg
-        
+
     def lgettext(self, message):
         missing = object()
         tmsg = self._catalog.get(message, missing)
@@ -521,6 +521,8 @@
         missing = object()
         tmsg = self._catalog.get(ctxt_message_id, missing)
         if tmsg is missing:
+            # XXX logilab patch for compat w/ catalog generated by cw < 3.5
+            return self.ugettext(message)
             if self._fallback:
                 return self._fallback.upgettext(context, message)
             return unicode(message)