-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different output in some languages when there is semicolon in header #87
Comments
1 task
marusak
added a commit
to cockpit-project/cockpit-weblate
that referenced
this issue
Jan 17, 2020
marusak
referenced
this issue
in cockpit-project/cockpit-weblate
Feb 11, 2020
1 task
marusak
added a commit
to marusak/cockpit-machines
that referenced
this issue
Mar 24, 2021
See mikeedwards/po2json#87 Done with bots that I edited to include every changed file
marusak
added a commit
to cockpit-project/cockpit-machines
that referenced
this issue
Mar 24, 2021
See mikeedwards/po2json#87 Done with bots that I edited to include every changed file
Most likely https://github.com/smhg/gettext-parser related. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There seems to be some inconsistency, about using semicolon at the end of
plural-forms
in.po
headers. It's presence can break the format, thatpo2json
produces. Let me explain with examples:Let's have this file: (
tmp.po
)when I run
./node_modules/po2json/bin/po2json -p tmp.po tmp
thentmp
looks like this:Which is correct. But let's now add semicolon to the
"Plural-Forms: nplurals=1; plural=0\n"
line.Now the
tmp.po
file looks like this:and when I run the same command, the
tmp
output is:So the translation for the string is not array of strings, but array of one string and one array.
Interestingly enough, if I have different file, like this:
The output is the same, no matter if there is semicolon or not on the Plural-Forms line.
From docs it seems there always should be semicolon (1, 2). This is likely problem in some library that po2json uses, but was not sure where it really comes from, so reporting here.
(side note: We had mix of some files having this semicolon and some don't for years and it seemed to work just fine. We were using Zanata to generate these files for us, now we migrated to Weblate and it adds this semicolon to some more languages (still not to all). So maybe this is known bug/documented somewhere)
The text was updated successfully, but these errors were encountered: