#11686 closed (wontfix)
Support for gettext's contexts
Reported by: | Mitar | Owned by: | nobody |
---|---|---|---|
Component: | Internationalization | Version: | 1.1 |
Severity: | Keywords: | ||
Cc: | mmitar@…, bronger@… | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | yes |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
For languages where translations change based on context (like number, gender, tense, case) it would be great if Django would support gettext's context as a parameter to ugettext
and others.
And then if admin app would use this. :-)
Attachments (1)
Change History (7)
comment:1 by , 15 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 by , 15 years ago
Just for the record, there exists a ticket for this on a Python tracker and it seems it will be included.
There is no future milestones which would be a place for tickets which are valid but not yet possible?
comment:3 by , 15 years ago
See http://groups.google.com/group/Django-I18N/browse_frm/thread/577afdaef1392958?hl=en
So, I'd say this would be (or at least has been) in the plans of a core developer for 1.2. A champion that implements (and commits to take care of) a patch for review attaching it to this (reopened) ticket plus adding the feature to the Version1.2Features list would increase the chances of something like this being added to Django.
Leaving this ticket closed as it has been set so by a core developer.
comment:4 by , 14 years ago
Cc: | added |
---|
comment:5 by , 14 years ago
Has patch: | set |
---|---|
Needs documentation: | set |
I'd like to reopen this, see the attached patch (note I didn't include tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/django.mo has it contains binary data, just msgfmt it from the django.po).
The Python issue is still pending, and as it will probably never reach the 2.x Python codebase, I think it's worth to be implemented in Django itself. Other bugs are depending on this (e.g. #9988, #14570, ...).
I took some inspiration from http://bugs.python.org/file10036/gettext-pgettext.patch
I'm OK to write docs as soon as it is accepted.
This is not possible at present, as Python's
gettext
module does not provide an equivalent to GNUpgettext
.