JaroslawWiosna / regionalizer

How to choose the best capital of a state and regions? Divider into regions, especially for administrative purposes
Mozilla Public License 2.0
2 stars 2 forks source link

Plural form in polish i18n #125

Open JaroslawWiosna opened 5 years ago

JaroslawWiosna commented 5 years ago

Firstly please read: https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html

...and if you understand something, here is the issue:

#: src/Region/Region.cpp:189
#, c-format
msgid "This region has %s cities."
msgstr "Liczba miast tego regionu to %s" 

In polish, there is:

"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2);\n"

It looks like the correct translation is:

msgid "This region has %s cities."
msgstr "Ten region ma %s mias{to,ta,t}" 
n
0 miasto
n%10>=2 and n%10<=4 and (n%100<10 "" or n%100>=20) miasta
otherwise miast

In order to fix this issue you have to modify this file: po/pl/regionalizer.po

JaroslawWiosna commented 5 years ago

It looks like this is how it should be done:

msgid "year"
msgid_plural "years"
msgstr[0] "rok"
msgstr[1] "lata"
msgstr[2] "lat"

but it has to be verified