On Thu, 7 Jul 2022 20:08:50 GMT, Andy Goryachev <d...@openjdk.org> wrote:
>> Shall we handle "1 byte"? > > good point! that's why I suggested "{0} B" > plural rules can be quite complex, see > http://www.unicode.org/cldr/cldr-aux/charts/22/supplemental/language_plural_rules.html > > example: in Arabic, there are 6 forms: > > > Language Name | Code | Category | Examples | Rules > -- | -- | -- | -- | -- > Arabic | ar | zero | 0 | zero → n is 0;one → n is 1;two → n is 2;few → n mod > 100 in 3..10;many → n mod 100 in 11..99;other → everything else > one | 1 > two | 2 > few | 3-10, 103-110, 203-210... > many | 11-99, 111-199, 211-299... > other | 100-102, 200-202, 300-302...;0.2, 1.07, 2.94, 3.81, 11.68, 100.55... Yet JDK isn't localised into Arabic. Some Slavic languages have different plural forms which depend on the last digit in the number (except for 10-19). It is probably the reason why Windows Explorer shows the size in KB. On the other hand, Properties dialog shows the size as "0 bytes" and "1 bytes". ------------- PR: https://git.openjdk.org/jdk/pull/9327