Opened 11 years ago
Closed 11 years ago
#22671 closed Uncategorized (duplicate)
some ungettext strings do not appear in po file if the same string was in an ugettext call elsewhere in the code
Reported by: | ygbo | Owned by: | nobody |
---|---|---|---|
Component: | Uncategorized | Version: | 1.6 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I can only reproduce this issue in a big project (hence https://github.com/openstack/horizon/ ) and not in a single file code, so checking out the patch-set 8 of my branch: https://review.openstack.org/#/c/91338/ is best to reproduce the issue:
git fetch https://review.openstack.org/openstack/horizon refs/changes/38/91338/8 && git checkout FETCH_HEAD
If you look in horizon/openstack_dashboard/dashboards/project/instances/tables.py
line 97 there is a call to return ungettext_lazy(u"Instance", u"Instances", count)
now go in the horizon/openstack_dashboard
directory and launch:
python ../manage.py makemessages -l fr
check horizon/openstack_dashboard/locale/fr/LC_MESSAGES/django.po
, msgid_plural "Instances"
never appears anywhere.
However, msgid "Instances"
appears in the pot file, but not as a plural.
The issue is not higly noticible for French, but it is for languages which handle 3,4,5 or 6 plural forms:
http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html?id=l10n/pluralforms
If I try Irish:
python ../manage.py makemessages -l ga
I'm supposed to have 5 plural forms and expect to find in horizon/openstack_dashboard/locale/ga/LC_MESSAGES/django.po
:
msgid "Instance" msgid_plural "Instances" msgstr[0] "" msgstr[1] "" msgstr[2] "" msgstr[3] "" msgstr[4] ""
But this appears nowhere so this will not be properly translated.
Duplicate of #17375