Simple tags don't have a translation hook - as opposed to the documentation
|Reported by:||Indy||Owned by:||nobody|
|Severity:||Keywords:||Template, Translation, I18N|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||yes||Patch needs improvement:||no|
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.
Change History (7)
Changed 7 years ago by Indy
comment:1 Changed 7 years ago by mtredinnick
- Component changed from Template system to Internationalization
- Needs documentation unset
- Needs tests unset
- Owner changed from adrian to mtredinnick
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted