Replies: 2 comments 1 reply
-
I suppose this is a known issue then Going for advice to disable obsolete fuzzy msgids: |
Beta Was this translation helpful? Give feedback.
1 reply
-
This is a bug in nodejs gettext parser that it doesn't handle all GNU gettext syntax. This is created by msgmerge: $ cat 1.po
#, fuzzy
#| msgid "lang_name_en"
msgid "lang_name_he"
msgstr "Englisch"
$ cat 1.pot
msgid "other"
msgstr "Other"
$ msgmerge 1.po 1.pot -o 2.po
.. dokončeno.
$ cat 2.po
msgid "other"
msgstr "Other"
#, fuzzy
#~| msgid "lang_name_en"
#~ msgid "lang_name_he"
#~ msgstr "Englisch" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the issue
Hello Weblate team.
We're using weblate for translation of our new github.com/openSUSE/quiz application
https://l10n.opensuse.org/projects/quiz/quiz/
Comment '#~| msgid "lang_name_en"' from weblate crashes our nodejs gettext parser as it seems that unescaped pipe is not allowed.(https://github.com/openSUSE/quiz/blob/3126eb29c5cc624d7daf5cb3470e596e6a89e0be/po/de.po#L1424)
📦[lkocman@quiz quiz]$ npm start
[nodemon] 3.1.10
[nodemon] to restart at any time, enter
rs
[nodemon] watching path(s): .
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting
node src/server.js
✅ Quiz app running at http://localhost:4000
file:///home/lkocman/Workspace/opensuse/quiz/node_modules/gettext-parser/lib/poparser.js:217
const err = new SyntaxError(
Error parsing PO data: Invalid key name "${this._node.value}" at line ${this._lineNumber}. This can be caused by an unescaped quote character in a msgid or msgstr value.
);^
SyntaxError: Error parsing PO data: Invalid key name "|" at line 1424. This can be caused by an unescaped quote character in a msgid or msgstr value.
at Parser._lexer (file:///home/lkocman/Workspace/opensuse/quiz/node_modules/gettext-parser/lib/poparser.js:217:25)
at Parser.parse (file:///home/lkocman/Workspace/opensuse/quiz/node_modules/gettext-parser/lib/poparser.js:63:8)
at Object.parse (file:///home/lkocman/Workspace/opensuse/quiz/node_modules/gettext-parser/lib/poparser.js:16:17)
at loadTranslations (/home/lkocman/Workspace/opensuse/quiz/src/app.js:82:29)
at async /home/lkocman/Workspace/opensuse/quiz/src/route.js:27:5 {
lineNumber: 1424
}
How do you run Weblate?
No response
Weblate versions
No response
Weblate deploy checks
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions