Opened 4 years ago

Closed 4 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: aaugustin 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 aaugustin)

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 4 years ago by aaugustin

  • Description modified (diff)
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed
  • Summary changed from trans tag and msgctxt to Provide 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