Open Minoru opened 7 years ago
+1 on this to be solved.
Can you maybe get around this problem by rephrasing in a way that works independent of the number? Of course I don't know if this makes sense for your language.
For example, instead of:
<p id="sandbox_rules_1">
Play [N] rounds per match:
</p>
<p id="sandbox_rules_1_single">
Play [N] round per match:
</p>
<p id="sandbox_rules_2">
After each tournament, eliminate the bottom [N] players & reproduce the top [N] players:
</p>
<p id="sandbox_rules_2_single">
After each tournament, eliminate the bottom [N] player & reproduce the top [N] player:
</p>
use the following:
<p id="sandbox_rules_1">
Number of rounds per match: [N]
</p>
<p id="sandbox_rules_1_single">
Number of rounds per match: [N]
</p>
<p id="sandbox_rules_2">
Number of players to eliminate from bottom & reproduce from top after each tournament: [N]
</p>
<p id="sandbox_rules_2_single">
Number of players to eliminate from bottom & reproduce from top after each tournament: [N]
</p>
For me, that could probably work. We'll see if I'll run into a situation where it can't be used.
@jkoelling, we sure can, but:
@Minoru I'm aware this is not perfect, but it is a solution that works right now without any changes to the code. You can always come back and change it once someone added a general solution for pluralization.
I thought about doing one myself, but as far as I can tell it affects only two sentences which are basically just labels in the sandbox. You don't loose much, if they are a bit less lively.
If you really want to add correct pluralization for a specific single language, you only need to know a little js and html and change a few lines of code to get it working. Since every language is in it's own repo for now I don't see a problem with changing parts of the code in addition to the translation.
If you need more space, have a look at https://github.com/ncase/trust/issues/19#issuecomment-320930912.
The game currently assumes that a word can be either in a singular or plural form, but in reality it just isn't so in some languages. For example, Russian uses the same word with counts 1, 11 and 121, another with 2 and 3, and yet another with 5. See this oldish article on how Qt framework handles this problem.