[Koha-bugs] [Bug 15395] Internationalization: plural forms, context, and more
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Oct 23 20:56:49 CEST 2018
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15395
--- Comment #101 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
It works better instead.
Just noting:
== es-ES - nplurals=2; plural=(n != 1); ==
msgid "{count} item"
msgid_plural "{count} items"
msgstr[0] "Uno ejemplar"
msgstr[1] "{count} ejemplares"
will output:
1: Uno ejemplar
2: 2 ejemplares
but also:
0: 0 ejemplares
== fr-FR - nplurals=2; plural=(n > 1); ==
msgid "{count} item"
msgid_plural "{count} items"
msgstr[0] "Un exemplaire"
msgstr[1] "{count} exemplaires"
will output:
1: Un examplaire
2: 2 exemplaires
but also:
0: Un exemplaire
So, from what I understand the third form (for 0) will be not supported, unless
we change the Plural-Forms (are we really supposed to change that?).
With:
"Plural-Forms: nplurals=3; plural=(n==0 ? 0 : n==1 ? 1 : 2);\n"
#: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt:1
#: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt:2
#, perl-brace-format
msgid "{count} item"
msgid_plural "{count} items"
msgstr[0] "Pas d'exemplaire"
msgstr[1] "Un exemplaire"
msgstr[2] "{count} exemplaires"
I get what I expected:
1: Un exemplaire
2: 2 exemplaires
0: Pas d'exemplaire
(I have moved the tnx call outside before the SEARCH_RESULT.items_count)
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list