Opened 14 years ago
Closed 14 years ago
#16717 closed New feature (fixed)
Add optional [as VARNAME] to trans template tag
| Reported by: | Jannis Leidel | Owned by: | nobody |
|---|---|---|---|
| Component: | Internationalization | Version: | dev |
| 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 by , 14 years ago
| Summary: | Added optional [as VARNAME] to trans template tag → Add optional [as VARNAME] to trans template tag |
|---|
comment:2 by , 14 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:3 by , 14 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
In [16712]: