Commit 94dffd34 authored by Andreas Jung's avatar Andreas Jung

- Collector #1491: talgettext.py did not create a proper header

       for the generated .pot file if multiple pagetemplate files
       were processed.
parent f1f02e6a
...@@ -157,6 +157,10 @@ Zope Changes ...@@ -157,6 +157,10 @@ Zope Changes
Bugs fixed 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 - Collector #1477: TaintedString.strip() now implements the
same signature as str.strip() same signature as str.strip()
......
...@@ -43,7 +43,7 @@ from TAL.DummyEngine import DummyEngine ...@@ -43,7 +43,7 @@ from TAL.DummyEngine import DummyEngine
from ITALES import ITALESEngine from ITALES import ITALESEngine
from TAL.TALDefs import TALESError from TAL.TALDefs import TALESError
__version__ = '$Revision: 1.2 $' __version__ = '$Revision: 1.1.2.1 $'
pot_header = '''\ pot_header = '''\
# SOME DESCRIPTIVE TITLE. # SOME DESCRIPTIVE TITLE.
...@@ -123,6 +123,11 @@ class POEngine(DummyEngine): ...@@ -123,6 +123,11 @@ class POEngine(DummyEngine):
self.catalog[domain] = {} self.catalog[domain] = {}
domain = self.catalog[domain] domain = self.catalog[domain]
# ---------------------------------------------
# only non-empty msgids are added to dictionary
# (changed by heinrichbernd - 2004/09/07)
# ---------------------------------------------
if msgid:
if msgid not in domain: if msgid not in domain:
domain[msgid] = [] domain[msgid] = []
domain[msgid].append((self.file, position)) domain[msgid].append((self.file, position))
...@@ -283,7 +288,6 @@ def main(): ...@@ -283,7 +288,6 @@ def main():
outfile = sys.stdout outfile = sys.stdout
else: else:
outfile = file(outfile, update_mode and "a" or "w") outfile = file(outfile, update_mode and "a" or "w")
catalog = {} catalog = {}
for domain in engine.catalog.keys(): for domain in engine.catalog.keys():
catalog.update(engine.catalog[domain]) catalog.update(engine.catalog[domain])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment