Open maciejpos opened 2 years ago
The PO importer was contributed by @bauerj
Thank you. Indeed, this is currently not implemented.
The upstream library (gettext_parser
) correctly identified the plurals as defined in the .PO file.
However, I don't think it's currently possible to use arbitrary plural definitions like necessary some languages. Polish plurals could be defined by using 26 calls to .times
(although probably unefficient).
@marcglasberg: Is it currently possible (e.g. using the .times
modifier) to define plural translations for e.g. Arabic?
Source: https://unicode-org.github.io/cldr-staging/charts/37/supplemental/language_plural_rules.html#ar
In some languages (e.g. Czech, Polish), there are 3 plural forms. e.g. for the English word "character" (Polish: 'znak') the 3 possible plurals as follows: znaków, znak, znaki.
Above plurals appear for following numbers accordingly: 0 : znaków 1: znak 2,3,4: znaki 5,6,7,8,..21: znaków 22-25: znaki
The Plural-Forms rules are correctly defined in the following pl_pl.po file:
[Poedit 3.1 screenshot]
The po file is loaded using the following code:
And the i18n_extension translations in the code are as follows:
The output in the app is as follows:
[ISSUE] The problem is that the plural modifier is not taking into account the Plural-Forms definition from po file. Do you have any idea how to fix it?