Skip to content
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

Warn for inconsistent uses of (p)ngettext plurals? #1003

Open
tomasr8 opened this issue May 1, 2023 · 0 comments
Open

Warn for inconsistent uses of (p)ngettext plurals? #1003

tomasr8 opened this issue May 1, 2023 · 0 comments

Comments

@tomasr8
Copy link
Contributor

tomasr8 commented May 1, 2023

Overview Description

Sorry for the issue spam, I swear this is the last one ;)

When the python extractor encounters multiple ngettext calls with differing plurals:

ngettext("foo", "foos", 2)
ngettext("foo", "bars", 2)

I think it would be a good idea to show a warning as this probably not intentional.

The po file entry currently uses the plural from the first call (I don't think it's specified anywhere what we should do in this case)

#: test2.py:1 test2.py:2
msgid "foo"
msgid_plural "foos"
msgstr[0] ""
msgstr[1] ""

Additional Information

babel version 2.12.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants