Skip to content

Commit

Permalink
LO: Added a call to the Context's Translator in module->l() (#5824)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérémie Tabet authored and mickaelandrieu committed Jul 1, 2016
1 parent 0418978 commit f431c9d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions classes/module/Module.php
Expand Up @@ -1846,6 +1846,10 @@ public function l($string, $specific = false)
if (self::$_generate_config_xml_mode) {
return $string;
}

if (($translation = Context::getContext()->getTranslator()->trans($string)) !== $string) {
return $translation;
}

return Translate::getModuleTranslation($this, $string, ($specific) ? $specific : $this->name);
}
Expand Down

0 comments on commit f431c9d

Please sign in to comment.