jwilk / i18nspector

checking tool for gettext POT, PO and MO files
https://jwilk.net/software/i18nspector
MIT License
2 stars 4 forks source link

false positive E: vi.po: unusual-plural-forms 'nplurals=2; plural=n == 1 ? 0 : 1;' => 'nplurals=1; plural=0;' #15

Open jwilk opened 2 years ago

jwilk commented 2 years ago

Currently we insist on nplurals=1 for Vietnamese, but @1ec5 noted in https://savannah.gnu.org/bugs/?62876 that some sentences may require nplurals=2 with special case for n=1.

FWIW, this doesn't seem to have much real-world use at the moment. In bullseye, out of 180 vi.po files that have at least one plural message translated, there's only one that special-cases n=1: https://sources.debian.org/src/openbox/3.6.1-9%2Bdeb11u1/po/vi.po/ (And even that one has msgstr[0] and msgstr[1] identical.)

Grepping for "(các)", I found another file that could have improved translation with special-cased n=1: https://sources.debian.org/src/git/1%3A2.30.2-1/po/vi.po/#L12306

1ec5 commented 2 years ago

By the way, sometimes an overly granular translation unit has a plural form, but without knowledge about how the translation unit is being used, it would be difficult to tell whether the conflated singular and plural forms would be a problem:

https://sources.debian.org/src/util-linux/2.25.2-6/po/vi.po/#L5159