[Genhis] [1.1.94] Plural forms in locale break when given a non-integer number
Posted: Sat Nov 04, 2023 5:55 pm
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.
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.