#15376 closed (duplicate)
translation in templates does not allow for a context variable
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Internationalization | Version: | 1.3-beta |
Severity: | 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
As per http://docs.djangoproject.com/en/dev//topics/i18n/internationalization/#contextual-markers, one of the newer features of the i18n framework allows for a context to be associated with each translatable string.
This works great, if all your strings are in your views.
However it is not so useful if your strings are in your templates and you also want to present the same context to translators (ideally, a single .po file with all translatable strings and contexts).
What would be nice is an extension to the 'trans' tag so that if two values were given to it, i.e.
{% trans "Month name" "May" %}
The contextual portion (the first string) in this case is output to the .po file
This may require some extra careful jiggery-pokery if this option is taken since {% trans "string" noop %} is also possible.
Change History (3)
comment:1 by , 14 years ago
milestone: | → 1.3 |
---|
comment:2 by , 14 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Duplicate of #14806.