-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
I have a .po file whose translations are handled with Poedit and I get obsolete entries in my .po files. The parser fails when it encounters them.
Reproduction
en.po
#, fuzzy
#~| msgid "Latest version"
#~ msgid "Latest Version"
#~ msgstr "Latest version"Parsing the content of en.po with gettext-parser (running gettextParser.po.parse(content)) produces the following error:
node_modules\gettext-parser\lib\poparser.js:224
throw err;
^
SyntaxError: Error parsing PO data: Invalid key name "|" at line 2. This can be caused by an unescaped quote character in a msgid or msgstr value.Expected behavior
The parser should not crash. It should either ignore the entry, or properly parse it to data.
Misc
I believe this issue was introduced by the following PR: #64 -- released in version 5.0.0. 4.2.0 is the last version before 5.0.0.
Have a good day !
sg00 and Etheryte
Metadata
Metadata
Assignees
Labels
No labels