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)
comment:1 Changed 9 years ago by
|Component:||Template system → Internationalization|
|Owner:||changed from Adrian Holovaty to Malcolm Tredinnick|
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Accepted|