You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gettext() cannot find translations with plural forms #62519
gettext() cannot find translations for messages that have plural forms. I would expect that gettext(s) is equivalent to ngettext(s, s, 1) for such messages, as it is implemented in GNU gettext.
>>> import gettext
>>> withopen('test.mo', 'rb') as mo: trans = gettext.GNUTranslations(mo)
...
>>> trans.ngettext("egg", "eggs", 1)
'Ei'
>>> trans.gettext("egg")
'egg'
I worked on a patch for this issue (see attached pull request).
I would be happy to discuss it with people involved in gettext module maintenance but I'm not sure how to contact them. Is there a dedicated mailing list or an IRC channel or something? I've found i18n-sig but it has been inactive for 5 years...
Activity
jwilk commentedon Jun 27, 2013
gettext() cannot find translations for messages that have plural forms. I would expect that gettext(s) is equivalent to ngettext(s, s, 1) for such messages, as it is implemented in GNU gettext.
BreamoreBoy commentedon Oct 5, 2014
@martin can you comment on this please.
gbassiere commentedon May 7, 2020
Hi there,
I worked on a patch for this issue (see attached pull request).
I would be happy to discuss it with people involved in gettext module maintenance but I'm not sure how to contact them. Is there a dedicated mailing list or an IRC channel or something? I've found i18n-sig but it has been inactive for 5 years...
Best regards
Gilles
gh-62519: Make pgettext search plurals when translation is not found (#…
pythongh-62519: Make pgettext search plurals when translation is not …
pythongh-62519: Make pgettext search plurals when translation is not …
pythongh-62519: Make pgettext search plurals when translation is not …
pythongh-62519: Make pgettext search plurals when translation is not …
Merge branch 'main' into superfix
[3.12] gh-62519: Make pgettext search plurals when translation is not…
[3.11] gh-62519: Make pgettext search plurals when translation is not…
ambv commentedon Jul 31, 2023
This is now fixed. Thanks! ✨ 🍰 ✨