Opened 18 years ago
Closed 18 years ago
#4713 closed (fixed)
Simple tags don't have a translation hook - as opposed to the documentation
| Reported by: | Indy | Owned by: | nobody |
|---|---|---|---|
| Component: | Internationalization | Version: | dev |
| Severity: | Keywords: | Template, Translation, I18N | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | yes | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
The documentation states that template tags offers a translation hook and accept _('...') instead of a constant string. This doesn't work for simple tags because resolve_variable isn't aware of translations.
If you trying to do so, you receive the following error:
VariableDoesNotExist at ...
Failed lookup for key [_('...
The attached patch is very simple and resolves this problem.
Attachments (3)
Change History (7)
by , 18 years ago
| Attachment: | __init__.diff added |
|---|
comment:1 by , 18 years ago
| Component: | Template system → Internationalization |
|---|---|
| Owner: | changed from to |
| Triage Stage: | Unreviewed → Accepted |
comment:3 by , 18 years ago
| Needs tests: | set |
|---|
comment:4 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Simple patch