On Thu, 14 Jul 2022 20:33:12 GMT, Naoto Sato <na...@openjdk.org> wrote:
>> We seem to have resources localized in French. French rules are as follows: >> one → n within 0..2 and n is not 2; >> other → everything else >> >> ChoiceFormat simply cannot be used for number localization, we should remove >> it being mentioned in MessageFormat javadoc, at least remove the example >> with plurals. >> >> The whole idea is that localization process does not require a code change. >> With ChoiceFormat, it does - as the choices depend on language, and rules >> for some languages cannot be expressed as a set of choice, as for example in >> Ukrainian and many other Slavic languages: >> >> one → n mod 10 is 1 and n mod 100 is not 11; >> few → n mod 10 in 2..4 and n mod 100 not in 12..14; >> many → n mod 10 is 0 or n mod 10 in 5..9 or n mod 100 in 11..14; >> other → everything else > > Yes, you are right that `ChoiceFormat` is not for general localization. > However, the supported UI translations in the JDK are English, German (new in > 19), Japanese, and Simplified Chinese. > (https://www.oracle.com/java/technologies/javase/jdk18-suported-locales.html > for JDK18). That's why I made the point. I have reverted back the changes for basic.properties file and FileChooser now shows the file size as below: 0 - "0 KB" 1 - "1 KB" and so on... ------------- PR: https://git.openjdk.org/jdk/pull/9327