petabyte-research / redflags

Automagically checks and filters risky public procurements
http://www.redflags.eu/
Apache License 2.0
4 stars 4 forks source link

Generic count including different word variant #33

Closed KrzysztofMadejski closed 7 years ago

KrzysztofMadejski commented 8 years ago

Generic count including different word variant.

Change translations:

@juzraai How to do it? There should be some java lib to handle it

juzraai commented 7 years ago

The search term for this issue was "plural forms i18n" and luckily there's a library called ICU4J which contains (among many other things) the plural rules for each language and can select the proper form for a given numeric value.

I wired this magic in, it works now. Please see the updated documentation:

:point_right: http://docs.redflags.eu/developer/webapp/basic/#plural-forms

Polish language has 4 plural forms: few, many, one and other, so you need to create these 4 variations for every message mentioned above and in the documentation section. For example:

charts.flag.few= charts.flag.many= charts.flag.one= charts.flag.other=