From fc9c612c21038d669d1f395477f11677cd5c9247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Thu, 24 Apr 2008 18:07:11 +0000 Subject: [PATCH] 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")); --- bureau/class/m_err.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bureau/class/m_err.php b/bureau/class/m_err.php index c1babc9a..d8b307ed 100644 --- a/bureau/class/m_err.php +++ b/bureau/class/m_err.php @@ -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; }