#29825: ngettext returns invalid result if msgstr is also a valid msgid in the
same
catalog
-------------------------------------+-------------------------------------
Reporter: Jeremy Moffitt | Owner: nobody
Type: Bug | Status: new
Component: | Version: 2.1
Internationalization |
Severity: Normal | Resolution:
Keywords: ngettext | Triage Stage: Accepted
localization |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jeremy Moffitt):
I've got the unit tests running, though I'm not 100% clear on how this
section gets tested given that its part of a javascript template within
django (defined in django/views/i18n.py) . I do see that jsi18n-
mocks.test.js defines:
{{{
django.ngettext = function(singular, plural, count) {
return (count === 1) ? singular : plural;
};
}}}
the tests under tests/i18n/tests.py are testing the functions from
utils/translation (where trans_real.py and trans_null.py both define
ngettext). I'll continue investigating to see if I can pin it down
further.
When the problem is occurring, the initial call into the django.ngettext
(as observed via the debugger) passes in ("Image", "Images", undefined)
--
Ticket URL: <https://code.djangoproject.com/ticket/29825#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/072.930a9a8c8da07c0e3b77e2b24c125cd2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.