-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plural forms in Slovenian and other languages #1488
Comments
Thanks for reporting this. I'm not well experienced with that plural forms feature. But this is a good oportunity to dive into it. 😄 Please correct me if I'm wrong here. As I can see the "Plural-Forms" line you propose as a "solution" still exists in our latest version. Lines 13 to 14 in 56ea86f
I assume we just don't use them for specific strings. We should use Lines 117 to 119 in 56ea86f
Am I right so far? I read through the GNU gettext docu about that plural form:
I couldn't find a (for me) sufficient description about the syntax in the "Plural-Forms" line in the po-files header. |
Yes it seems that gettext.ngettext() should do the trick. |
I was looking through the BIT screenshots on Weblate to find cases where the use of I do see only the Schedule drop-down menu. Are you aware of other places or source strings? Keep in mind that there are cases where there is no other way to say "Day(s)", e.g. in a spin-box where the user can modify the value. |
Hello Vanja, You won't see the effect in Slovenian, yet. I will synchronize the translations from Weblate and the modified source strings here in the repository in the next days. After this is done you should see multiple plural forms in the weblate frontend; e.g. here. |
@b100w11 reported at #1465.
There are some issues with the slovenian translation (and i guess also with others).
Slovenian has different plural forms based on the last number of the plural (this is probably an oversimplification and the linguists will have something to complain, but it explains the issue).
So if we take an example with "knjiga" (book) we have this forms.
The same pattern repeats with "101 knjiga", "102 knjigi", ... , "1001 knjiga", "1002 knjigi" and so on.
The gettext solution is this
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0)\n"
So it should work for every instance where there is a singular and plural form.
Something similar should also solve the "day(s)" problem in English and other languages.
I don't know where to incorporate this.
The text was updated successfully, but these errors were encountered: