Opened 4 years ago

Closed 4 years ago

#16717 closed New feature (fixed)

Add optional [as VARNAME] to trans template tag

Reported by: jezdez Owned by: nobody
Component: Internationalization Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Part of this year's SoC about form rendering (https://github.com/gregmuellegger/django/tree/soc2011/form-rendering) had to deal with dynamically changing the label of a form field in the template. For that purpose it's required to easily set a context variable with a translated string. E.g.:

{% trans "Your full name" as full_name %}
...
{% formfield form.full_name with label=full_name %}
...

Change History (3)

comment:1 Changed 4 years ago by jezdez

  • Summary changed from Added optional [as VARNAME] to trans template tag to Add optional [as VARNAME] to trans template tag

comment:2 Changed 4 years ago by aaugustin

  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 4 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

In [16712]:

Fixed #16717 -- Added ability to store result of trans template tag in context variable.

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