Date: prev next · Thread: first prev next last
2018 Archives by date, by thread · List index


I was asked in 
https://bugs.documentfoundation.org/show_bug.cgi?id=83128 about
supporting ngettext-alike plural forms.

https://gerrit.libreoffice.org/#/c/61426/ is my proposal on that.

To current Translate::get(id) we add Translate::nget(id, cardinality)
when requesting the translation.

To current NC_(context, string) we add NNC_(context, singular, plural)
when declaring the strings for translation

We add --keyword=NNC_:1c,2,3 to our xgettext invocation resulting in a
change in the output .po for my calc SCSTR_TOTAL example from

msgctxt "SCSTR_TOTAL"
msgid "%1 results found"
msgstr ""

to

msgctxt "SCSTR_TOTAL"
msgid "1 result found"
msgid_plural "%1 results found"
msgstr[0] ""
msgstr[1] ""

Locally at least this works to give the desired expected results of "1
result found" vs "2 results found" for the simple example.

caolanm->cloph: would this work smoothly with our current pootle stuff?


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.