[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libreoffice-l10n] plural forms translation, ngettext
- Subject: [libreoffice-l10n] plural forms translation, ngettext
- From: Caolán McNamara <email@example.com>
- Date: Fri, 05 Oct 2018 16:09:30 +0100
- To: firstname.lastname@example.org, "email@example.com" <firstname.lastname@example.org>
- Cc: email@example.com
I was asked in
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
msgid "%1 results found"
msgid "1 result found"
msgid_plural "%1 results found"
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?
To unsubscribe e-mail to: firstname.lastname@example.org
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/l10n/
- Prev by Date: [libreoffice-l10n] Re: plural forms translation, ngettext
- Next by Date: [libreoffice-l10n] Marketing Conference Call
- Previous by thread: [libreoffice-l10n] correct Ctrl+Shift <> Shift+Ctrl ?
- Next by thread: [libreoffice-l10n] Re: plural forms translation, ngettext