Skip to content

Commit e88c48e

Browse files
author
Alexander Smishlajev
committed
don't collect empty msgids
1 parent 4a4f668 commit e88c48e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

roundup/cgi/TAL/talgettext.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# Modifications for Roundup:
1616
# 1. commented out ITALES references
1717
# 2. escape quotes and line feeds in msgids
18+
# 3. don't collect empty msgids
1819

1920
"""Program to extract internationalization markup from Page Templates.
2021
@@ -43,7 +44,7 @@
4344
#from ITALES import ITALESEngine
4445
from roundup.cgi.TAL.TALDefs import TALESError
4546

46-
__version__ = '$Revision: 1.5 $'
47+
__version__ = '$Revision: 1.6 $'
4748

4849
pot_header = '''\
4950
# SOME DESCRIPTIVE TITLE.
@@ -119,6 +120,8 @@ def translate(self, msgid, domain=None, mapping=None, default=None,
119120
# interface
120121
position=None):
121122

123+
if not msgid: return 'x'
124+
122125
if domain not in self.catalog:
123126
self.catalog[domain] = {}
124127
domain = self.catalog[domain]

0 commit comments

Comments
 (0)