From 42574d3cf26d823101f91fcb6551919703145578 Mon Sep 17 00:00:00 2001 From: Alan Garcia Date: Thu, 8 Nov 2012 09:48:39 +0000 Subject: [PATCH] Quelques traductions de messages foireuses --- bureau/class/m_bro.php | 4 ++-- bureau/class/m_dom.php | 4 ++-- bureau/class/m_mem.php | 6 +++--- bureau/class/m_mysql.php | 4 ++-- bureau/class/m_quota.php | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bureau/class/m_bro.php b/bureau/class/m_bro.php index 5e30514b..946b133b 100644 --- a/bureau/class/m_bro.php +++ b/bureau/class/m_bro.php @@ -533,7 +533,7 @@ class m_bro { exec("sudo /usr/lib/alternc/fixperms.sh -u ".$cuid." -f '".$absolute."/".$_FILES['userfile']['name']."'"); return $absolute."/".$_FILES['userfile']['name']; } else { - $err->raise("bro",("Cannot create the requested file. Please check the permissions")); + $err->raise("bro",_("Cannot create the requested file. Please check the permissions")); return false; } } else { @@ -856,7 +856,7 @@ class m_bro { fputs($f,$texte,strlen($texte)); fclose($f); } else { - $err->raise("bro",("Cannot edit the requested file. Please check the permissions")); + $err->raise("bro",_("Cannot edit the requested file. Please check the permissions")); return false; } } diff --git a/bureau/class/m_dom.php b/bureau/class/m_dom.php index 9c7661bf..01233b9f 100644 --- a/bureau/class/m_dom.php +++ b/bureau/class/m_dom.php @@ -715,7 +715,7 @@ class m_dom { $r["name"]=$dom; $db->query("SELECT * FROM domaines WHERE compte='$cuid' AND domaine='$dom'"); if ($db->num_rows()==0) { - $err->raise("dom",1,_("Domain '%s' not found"),$dom); + $err->raise("dom",sprintf(_("Domain '%s' not found"),$dom)); return false; } $db->next_record(); @@ -976,7 +976,7 @@ class m_dom { } $t=checkfqdn($dom); if ($t) { - $err->raise("dom",("The domain name is syntaxically incorrect")); + $err->raise("dom",_("The domain name is syntaxically incorrect")); return false; } if (!$r=$this->get_sub_domain_all($dom,$sub,$type)) { diff --git a/bureau/class/m_mem.php b/bureau/class/m_mem.php index 5c0a7b9c..8857cc5b 100644 --- a/bureau/class/m_mem.php +++ b/bureau/class/m_mem.php @@ -349,7 +349,7 @@ class m_mem { $newpass=stripslashes($newpass); $newpass2=stripslashes($newpass2); if (!$this->user["canpass"]) { - $err->raise("mem",("You are not allowed to change your password.")); + $err->raise("mem",_("You are not allowed to change your password.")); return false; } if ($this->user["pass"]!=_md5cr($oldpass,$this->user["pass"])) { @@ -381,7 +381,7 @@ class m_mem { global $db,$err,$cuid; $err->log("mem","admlist"); if (!$this->user["su"]) { - $err->raise("mem",("You must be a system administrator to do this.")); + $err->raise("mem",_("You must be a system administrator to do this.")); return false; } $db->query("UPDATE membres SET admlist='$admlist' WHERE uid='$cuid';"); @@ -401,7 +401,7 @@ class m_mem { $err->log("mem","send_pass"); $db->query("SELECT * FROM membres WHERE login='$login';"); if (!$db->num_rows()) { - $err->raise("mem",("This account is locked, contact the administrator.")); + $err->raise("mem",_("This account is locked, contact the administrator.")); return false; } $db->next_record(); diff --git a/bureau/class/m_mysql.php b/bureau/class/m_mysql.php index 998db8a5..4947d643 100644 --- a/bureau/class/m_mysql.php +++ b/bureau/class/m_mysql.php @@ -425,7 +425,7 @@ class m_mysql { $err->raise("mysql",_("Database name can contain only letters and numbers")); return false; } elseif (!$db->query("select db from db where db='$base';")){ - $err->raise("mysql","Database not found"); + $err->raise("mysql",_("Database not found")); return false; } @@ -443,7 +443,7 @@ class m_mysql { $db->query("select name from dbusers where name='".$user."' ;"); if(!$db->num_rows()){ - $err->raise("mysql","Database user not found"); + $err->raise("mysql",_("Database user not found")); return false; } if($rights == "FILE"){ diff --git a/bureau/class/m_quota.php b/bureau/class/m_quota.php index 22f7419a..6fe70e4e 100644 --- a/bureau/class/m_quota.php +++ b/bureau/class/m_quota.php @@ -261,7 +261,7 @@ class m_quota { if(empty($type)) return false; $type=strtolower($type); if (!preg_match("#^[a-z0-9]*$#",$type)) { - $err->raise("quota", "Type can only contains characters a-z and 0-9"); + $err->raise("quota", _("Type can only contains characters a-z and 0-9")); return false; } while (list($key,$val)=each($qlist)) {