[Checkins] SVN: zope.tal/trunk/src/zope/tal/talgettext.py Set default to None if default is equal to msgid. With this, Message objects can be compared easily with Message objects extracted from other extractors (PYReader, GSReader) to search for Message objects with same msgid but with a different default message.

Vincent Fretin vincent.fretin at gmail.com
Mon Oct 12 02:29:50 EDT 2009


Log message for revision 105021:
  Set default to None if default is equal to msgid. With this, Message objects can be compared easily with Message objects extracted from other extractors (PYReader, GSReader) to search for Message objects with same msgid but with a different default message.

Changed:
  U   zope.tal/trunk/src/zope/tal/talgettext.py

-=-
Modified: zope.tal/trunk/src/zope/tal/talgettext.py
===================================================================
--- zope.tal/trunk/src/zope/tal/talgettext.py	2009-10-11 23:16:28 UTC (rev 105020)
+++ zope.tal/trunk/src/zope/tal/talgettext.py	2009-10-12 06:29:49 UTC (rev 105021)
@@ -117,6 +117,8 @@
 
         if default is not None:
             default = normalize(default)
+        if msgid == default:
+            default = None
         msgid = Message(msgid, default=default)
 
         if domain not in self.catalog:



More information about the checkins mailing list