-
Notifications
You must be signed in to change notification settings - Fork 90
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
Duplicate msgid with singular and plural form #366
Comments
We can't merge the translations yeah. I mean, the Elixir Gettext behavior seems fine to me because the singular and plural translations are treated completely differently, so they can coexist with the same Is |
@whatyouhide PHP reads the var_dump(gettext('item'));
[...]
string(7) "Produkt" msgid "item"
msgid_plural "items"
msgstr[0] "Produkt"
msgstr[1] "Produkte" |
Judging by this paragraph, I think that is the expected way to do things: https://www.gnu.org/software/gettext/manual/gettext.html#Invoking-the-msguniq-Program
So I guess we should merge singular and plural into one plural message and use the |
Yeah I think that's a good idea. I will be out all of next week so it will be a while before I'll be able to do anything about this 🙃 |
Sorry I was out of office and not great at using GitHub's notification center 😅 Thanks for looking into this! |
Not sure if it's a bug / how other implementations tackle that, but
msgfmt
will fail for duplicatemsgid
s:Which is expected for cases like:
However, it also fails for cases like:
Generated by this code:
I believe things should work fine if the singular form was dropped from the
po
/pot
file.Here's the repro repo: https://github.com/saveman71/elixir-gettext-duplicate-keys
Is this a bug, or an accepted behaviour and
msgfmt
is just being too noisy/plain wrong here?The issue I can see is that usually both translations aren't always used in the same context, so "merging" them could be a breaking change.
msgfmt
allowed me to remove actual duplicates, but now its output is only this case, so I can't move forward adding it as a new CI step.The text was updated successfully, but these errors were encountered: