parseGetText can't parse zope.app catalogs (fr and zh_CN)

Bug #356004 reported by Devin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zope 3
Won't Fix
Undecided
Unassigned
zope.i18n
Won't Fix
Undecided
Unassigned

Bug Description

When I attempt to use GettextImportFilter to parse the gettext translation catalogs in zope.app for fr and zh_CN, I get the following tracebacks (the first is fr, the second is zh_CN):

Traceback (most recent call last):
  File "./generate-pillar-domain.py", line 68, in main
    filter.importMessages(language, fp)
  File "/usr/lib/python2.5/site-packages/zope/app/i18n/filters.py", line 95, in importMessages
    result = parseGetText(file.readlines())[3]
  File "/usr/lib/python2.5/site-packages/zope/app/i18n/filters.py", line 197, in parseGetText
    raise ParseError(3, pointer + 1)
ParseError: state 3, line 4382

Traceback (most recent call last):
  File "./generate-pillar-domain.py", line 68, in main
    filter.importMessages(language, fp)
  File "/usr/lib/python2.5/site-packages/zope/app/i18n/filters.py", line 95, in importMessages
    result = parseGetText(file.readlines())[3]
  File "/usr/lib/python2.5/site-packages/zope/app/i18n/filters.py", line 197, in parseGetText
    raise ParseError(3, pointer + 1)
ParseError: state 3, line 268

Both errors occur when a blank line is found at the beginning of a 'msgstr' portion in a gettext file.

Revision history for this message
Devin (devin.charityfinders.org) wrote :

Just to clarify, when I say "blank line", I mean "quoted empty string".

Tres Seaver (tseaver)
Changed in zope3:
status: New → Won't Fix
Revision history for this message
Tres Seaver (tseaver) wrote :
Changed in zope.i18n:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.