[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #59005] Can't translate strings properly to Hebrew and Arabic

From: Miguel Ángel Arruga Vivas
Subject: [bug #59005] Can't translate strings properly to Hebrew and Arabic
Date: Mon, 18 Jan 2021 08:58:02 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Follow-up Comment #2, bug #59005 (project gettext):

Hi אורי,

The issue with % operator from python's str[1] is that unnamed parameters
cannot be omitted in any case, therefore the limitation isn't on gettext
because named identifiers do allow the omission of certain parameters, and
they are currently implemented by msgfmt.  For example, the following code:

ngettext("%(number)d month", "%(number)d months", months) % { "number": months

does indeed allow the following translation:

#, python-format
msgid "%(number)d month"
msgid_plural "%(number)d months"
msgstr[0] "one month"
msgstr[1] "%(number)d month"

And msgfmt --check-format implements checks for these cases too.

AFAIK[2], both Arabic and Hebrew have separate plural forms for the '1' case
but plural forms on other languages may apply to more cases as explained by
the manual[3].

This probably is certainly related to my lack of knowledge of Hebrew language:
default Plural-Forms[2] is 'nplurals=2; plural=(n != 1);', is that an error
from a native speaker POV?  From this wikipedia page[4] I guess that the dual
case isn't common as it says "some count nouns" differ, therefore most of the
plural and dual case translations would be the same.  Nonetheless, if your
case requires it even when it isn't the common usage, you can modify the
Plural-Forms accordingly too on your PO file.

[2] https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]