To reproduce:
1. Make the following locale entry: n-items=__1__ __plural_for_parameter_1_{1=item|rest=items}__
2. Launch the game and run the following command: /c game.print{'n-items', 0.5}
3. Observe the following output: 0.5 1
Expected behavior:
The "rest" form gets used, producing the following output: 0.5 items
Comment:
There should probably be more pluralization categories to properly support non-integer pluralization, but that's beyond the scope of a bug report. The proposed above fix would not get in the way of adding such categories in the future: since these categories don't exist now, there would be no conflict with existing mods should you wish to add them.
[Genhis] [1.1.94] Plural forms in locale break when given a non-integer number
Re: [Genhis] [1.1.94] Plural forms in locale break when given a non-integer number
Thanks for the report. This has been broken for a long time and is unlikely to get fixed in 1.1. For 2.0, I refactored the localization code and adding proper decimal numbers support is on my to-do list.
Re: [Genhis] [1.1.94] Plural forms in locale break when given a non-integer number
I see. Thank you for telling me. Workaround time, I guess.
Re: [Genhis] [1.1.94] Plural forms in locale break when given a non-integer number
FYI, it doesn't understand negative numbers either.
Re: [Genhis] [1.1.94] Plural forms in locale break when given a non-integer number
This has been fixed for 2.0. All decimal numbers will match "decimal" or "rest" patterns. Negative numbers will behave as positive numbers.
Re: [Genhis] [1.1.94] Plural forms in locale break when given a non-integer number
That's great news! Thank you.