babel icon indicating copy to clipboard operation
babel copied to clipboard

Warn for inconsistent uses of (p)ngettext plurals?

Open tomasr8 opened this issue 2 years ago • 0 comments

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

tomasr8 avatar May 01 '23 16:05 tomasr8