Opened 3 years ago

Closed 3 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


Part of this year's SoC about 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 %}

Attachments (0)

Change History (3)

comment:1 Changed 3 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 3 years ago by aaugustin

  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 3 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.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.