use strtr instead of printf to expand variables in translated strings
this means that the error arguments are now passed as an associative array. exemple: $err->raise("foo", "error message: %error", array('%error' => "blah"));
This commit is contained in:
parent
15f9312e72
commit
fc9c612c21
|
@ -90,9 +90,9 @@ class m_err {
|
|||
*/
|
||||
function errstr() {
|
||||
if (is_string($this->error)) {
|
||||
$msg = sprintf(_("err_".$this->clsid."_generic: ")._($this->error)."\n",$this->param);
|
||||
$msg = strtr(_("err_".$this->clsid."_generic: ")._($this->error)."\n",$this->param);
|
||||
} else {
|
||||
$msg = sprintf(_("err_".$this->clsid."_".$this->error)."\n",$this->param);
|
||||
$msg = strtr(_("err_".$this->clsid."_".$this->error)."\n",$this->param);
|
||||
}
|
||||
return $msg;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue