-
Notifications
You must be signed in to change notification settings - Fork 86
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
Unique singular and plural messages #379
Conversation
Pull Request Test Coverage Report for Build 6f62f075c71eaa09e135a8b593aa74a680097b3e-PR-379
💛 - Coveralls |
8503f2b
to
00af4c2
Compare
Hi there, I wanted to test out this branch so I set the
Now when running the task I get this message about duplicate keys, fair enough there's a fix to be made.
But when I run the suggested command:
Also when running to stdin there's a weird
am I missing something? My understanding is that expo is pulled to match the updated gettext dependency's requirements, so I didn't touch that (neither did I have it in the dependencies anyway) EDIT: yes it shows 0.5.0 in the lockfile |
@saveman71 Oops, the error should give you the concrete instructions… I’ll try to reproduce your issue as well and do a fix. |
@saveman71 Can you send me your po file with the duplicates? I have trouble reproducing that issue. |
Sure, let me try to tear down the po file to a single reproductible example first. Otherwise I'll send by email |
Okay here's a test file that fails on my laptop: POT # This is added just to be on par with the .po file (same same message id keys)
msgid ""
msgstr ""
#, elixir-autogen, elixir-format
msgid "Invitation envoyée"
msgid_plural "Invitations envoyées"
msgstr[0] ""
msgstr[1] ""
#, elixir-autogen, elixir-format
msgid "Invitation envoyée"
msgstr "" PO msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n>1);"
#, elixir-autogen, elixir-format
msgid "Invitation envoyée"
msgid_plural "Invitations envoyées"
msgstr[0] "Invitation envoyée"
msgstr[1] "Invitations envoyées"
#, elixir-autogen, elixir-format
msgid "Invitation envoyée"
msgstr "Invitation envoyée" The issue seems to come from the first lines, if I remove them it seems we're good. Not an expert in PO files but I assume they are required on the PO file to describe the encoding etc, right? Then I added the empty ones in the POT file to be able to do this in our CI (checks the same msgids are there, checking both files are synced (side note: this is to early exit the CI instead of compiling 3 minutes for nothing if we find an "easy to find discrepancy", we do run diff <(cat priv/gettext/fr/LC_MESSAGES/default.po | grep msgid) <(cat priv/gettext/default.pot | grep msgid) So for the POT file we're kinda the origin of the issue, but I don't see what's wrong on the PO file? |
@saveman71 I got it. It's an issue with the |
Here are the outputs sorry With the files as above:
=> note the extra 10 and duplicate comment
=> note the missing new lines, the
=> File is truncated to # This is added just to be on par with the .po file (same same message id keys)
msgid ""
msgstr "" |
00af4c2
to
6f62f07
Compare
@whatyouhide Are we doing a release directly? If yes: should I prepare it or will you? |
@maennchen yes, we can do a release. Feel free to prep it up 🙃 |
Implements #366
Depends on elixir-gettext/expo#120 & elixir-gettext/expo#125