Topic: How to fix Plural-Forms
palino![]() Topic Opener |
Posted at: 2024-12-07, 22:29
Hello In Slovak translation files there is historically wrong Plural-Forms field, now:
and should be:
For example in this snippet:
all msgstr[3] could be removed, because they are duplicate of msgstr[2] I can propose PR for all related .po files, but what about Transifex? Will such change automatically propagate or some manual change on web is needed too? ![]() ![]() |
OIPUN![]() |
Posted at: Yesterday 11:34
And when we are discussing the languages. Czech language has the same issue. On the internet I found this table. But it seams to be wrong. The attached table would make more sense. Can someone explain the categories? Or put here a link where more informations can be found? Edited: Yesterday 11:35
![]() ![]() |
Nordfriese![]() |
Posted at: Yesterday 11:54
Plural rules have many competing standards depending on interpretation of the language and grammar. The most reliable may be CLDR/Unicode: https://www.unicode.org/cldr/charts/46/supplemental/language_plural_rules.html Looks like Czech has a Singular form for n=1, a Few form for integral n=2..4, an Other form for other integer values, and a Many form for non-integer (decimal) values. The table you attached uses different names, but the form named Two is commonly only used for languages with a rule "n=2" (e.g. Arabic). Edit: Note that Widelands only uses ngettext with non-negative integers, so the decimal forms are unused for us. Edited: Yesterday 11:55
![]() ![]() |
OIPUN![]() |
Posted at: Yesterday 12:10
In this case, I agree with palino, only 3 forms are needed for our languages. As for now, for all Czech strings msgstr[2] =msgstr[3] in Transifex. msgstr[3] can be removed. ![]() ![]() |
palino![]() Topic Opener |
Posted at: Yesterday 12:21
We continued discussion in this closed PR: https://codeberg.org/wl/widelands/pulls/5017 I realised that 3rd form (
(even it doesn't make sense to have fractional part of players, but I think you get the point) Actually I haven't seen any fractional numbers in widelands' strings - like ![]() ![]() |
OIPUN![]() |
Posted at: Yesterday 13:13
Ok, fractinoal=decimal 1/2 dne/hráče = 1.5 dne/hráče. I remember having a discussion with GunChleoc on this topic few years ago. But my old Transifex account is deleted so I couldn't return to it. I just remember us coming to a conclusion that msgstr[2] should be translated the same way as msgstr[3]. It is probably wrong, but doesn't cause any problems when msgstr[2] is not used. Should it be used in the future, it will need correction. ![]() ![]() |