[Zope-Checkins] CVS: Packages/TAL - talgettext.py:1.1.2.2
Andreas Jung
andreas at andreas-jung.com
Thu Sep 23 01:41:39 EDT 2004
Update of /cvs-repository/Packages/TAL
In directory cvs.zope.org:/tmp/cvs-serv29868/lib/python/TAL
Modified Files:
Tag: Zope-2_7-branch
talgettext.py
Log Message:
- Collector #1491: talgettext.py did not create a proper header
for the generated .pot file if multiple pagetemplate files
were processed.
=== Packages/TAL/talgettext.py 1.1.2.1 => 1.1.2.2 ===
--- Packages/TAL/talgettext.py:1.1.2.1 Wed Aug 20 17:01:05 2003
+++ Packages/TAL/talgettext.py Thu Sep 23 01:41:39 2004
@@ -123,9 +123,14 @@
self.catalog[domain] = {}
domain = self.catalog[domain]
- if msgid not in domain:
- domain[msgid] = []
- domain[msgid].append((self.file, position))
+ # ---------------------------------------------
+ # only non-empty msgids are added to dictionary
+ # (changed by heinrichbernd - 2004/09/07)
+ # ---------------------------------------------
+ if msgid:
+ if msgid not in domain:
+ domain[msgid] = []
+ domain[msgid].append((self.file, position))
return 'x'
@@ -283,7 +288,6 @@
outfile = sys.stdout
else:
outfile = file(outfile, update_mode and "a" or "w")
-
catalog = {}
for domain in engine.catalog.keys():
catalog.update(engine.catalog[domain])
More information about the Zope-Checkins
mailing list