[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/locales/extract.py
Teach extract how to handle new style Messages.
Gary Poster
gary at zope.com
Fri Apr 15 12:16:41 EDT 2005
Log message for revision 30003:
Teach extract how to handle new style Messages.
Changed:
U Zope3/trunk/src/zope/app/locales/extract.py
-=-
Modified: Zope3/trunk/src/zope/app/locales/extract.py
===================================================================
--- Zope3/trunk/src/zope/app/locales/extract.py 2005-04-15 16:11:46 UTC (rev 30002)
+++ Zope3/trunk/src/zope/app/locales/extract.py 2005-04-15 16:16:41 UTC (rev 30003)
@@ -27,7 +27,7 @@
from interfaces import IPOTEntry, IPOTMaker, ITokenEater
from zope.interface import implements
-from zope.i18nmessageid import MessageID
+from zope.i18nmessageid import MessageID, Message
DEFAULT_CHARSET = 'UTF-8'
DEFAULT_ENCODING = '8bit'
@@ -113,7 +113,9 @@
if self.comments:
file.write(self.comments)
if (isinstance(self.msgid, MessageID) and
- self.msgid != self.msgid.default):
+ self.msgid != self.msgid.default) or (
+ isinstance(self.msgid, Message) and
+ self.msgid.default is not None):
default = self.msgid.default.strip()
lines = normalize(default).split("\n")
lines[0] = "# Default: %s\n" % lines[0]
More information about the Zope3-Checkins
mailing list