[Zope-Checkins] SVN: Zope/trunk/ - Collector #1491: talgettext.py
did not create a proper header
Andreas Jung
andreas at andreas-jung.com
Thu Sep 23 01:42:21 EDT 2004
Log message for revision 27648:
- Collector #1491: talgettext.py did not create a proper header
for the generated .pot file if multiple pagetemplate files
were processed.
Changed:
U Zope/trunk/doc/CHANGES.txt
U Zope/trunk/lib/python/TAL/talgettext.py
-=-
Modified: Zope/trunk/doc/CHANGES.txt
===================================================================
--- Zope/trunk/doc/CHANGES.txt 2004-09-22 20:22:30 UTC (rev 27647)
+++ Zope/trunk/doc/CHANGES.txt 2004-09-23 05:42:21 UTC (rev 27648)
@@ -157,6 +157,10 @@
Bugs fixed
+ - Collector #1491: talgettext.py did not create a proper header
+ for the generated .pot file if multiple pagetemplate files
+ were processed.
+
- Collector #1477: TaintedString.strip() now implements the
same signature as str.strip()
Modified: Zope/trunk/lib/python/TAL/talgettext.py
===================================================================
--- Zope/trunk/lib/python/TAL/talgettext.py 2004-09-22 20:22:30 UTC (rev 27647)
+++ Zope/trunk/lib/python/TAL/talgettext.py 2004-09-23 05:42:21 UTC (rev 27648)
@@ -43,7 +43,7 @@
from ITALES import ITALESEngine
from TAL.TALDefs import TALESError
-__version__ = '$Revision: 1.2 $'
+__version__ = '$Revision: 1.1.2.1 $'
pot_header = '''\
# SOME DESCRIPTIVE TITLE.
@@ -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