Opened 5 years ago

Closed 5 years ago

#17045 closed New feature (duplicate)

Provide the equivalent of pgettext in the translation template tags

Reported by: herve Owned by: nobody
Component: Translations Version: 1.3
Severity: Normal Keywords:
Cc: Aymeric Augustin Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Aymeric Augustin)

Using pgettext you can specify a contextual marker:

https://docs.djangoproject.com/en/1.3/topics/i18n/internationalization/#contextual-markers

But there is nothing in templates to call such translations.

Proposal:

{% trans "May" "month name" %}
{% blocktrans msgctxt="month name" %}May{% endblocktrans %}

Change History (1)

comment:1 Changed 5 years ago by Aymeric Augustin

Description: modified (diff)
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Resolution: duplicate
Status: newclosed
Summary: trans tag and msgctxtProvide the equivalent of pgettext in the translation template tags

This is a duplicate of #14806. And yes, it's annoying.

Note: See TracTickets for help on using tickets.
Back to Top