summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: efed019)
raw | patch | inline | side by side (parent: efed019)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 14 Mar 2008 13:06:53 +0000 (13:06 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 14 Mar 2008 13:06:53 +0000 (13:06 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9841 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/gofon/gofon/macro/class_divListMacros.inc | patch | blob | history | |
gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc | patch | blob | history |
diff --git a/gosa-plugins/gofon/gofon/macro/class_divListMacros.inc b/gosa-plugins/gofon/gofon/macro/class_divListMacros.inc
index 2528b2607f249b8b9f21d1015ccd82ddb8c96536..871f3d89b9710e2661418873c8940512ca5cbd54 100644 (file)
/* set Page header */
$this->AddHeader(array("string"=> $chk, "attach"=>"style='width:20px;'"));
$this->AddHeader(array("string" => " ", "attach" => "style='text-align:center;width:20px;'"));
- $this->AddHeader(array("string" => _("Macro name")." / "._("Department"), "attach" => "style=''"));
+ $this->AddHeader(array("string" => _("Name")." / "._("Department"), "attach" => "style=''"));
$this->AddHeader(array("string" => _("Visible"), "attach" => "style='width:50px;'"));
$this->AddHeader(array("string" => _("Actions"), "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'" ));
}
$num_objs = count($list);
- $num_obj_str = _("Number of listed macros");
- $num_dep_str = _("Number of listed departments");
+ $num_obj_str = sprintf(_("Number of listed %s"),_("macros"));
+ $num_deb_str = sprintf(_("Number of listed %s"),_("departments"));
$str = "<img class='center' src='images/select_macro.png'
title='".$num_obj_str."' alt='".$num_obj_str."'> ".$num_objs." ";
diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc
index 509188ff4b9f97e6c7122b3f7267a28cbc0b2d6b..8a9358a5cdd24e94b7c7881a085d7e846a9230d7 100644 (file)
{
/* Check if mysql extension is available */
if(!is_callable("mysql_pconnect")){
- return(sprintf(_("Missing %s PHP extension!"), "mysql"));
+ return(msgPool::missingext("php-mysql"));
}
/********************
$r_current = @mysql_pconnect($cfg_Current['SERVER'],$cfg_Current['LOGIN'],$cfg_Current['PASSWORD']);
if(!$r_current){
new log("debug","gofonmacro/".get_class($this),"",array(),@mysql_error($r_current));
- return (sprintf(_("Cannot connect to %s database on server '%s'!"), "GOfon", $cfg_Current['SERVER']));
+ return ( msgPool::dbconnect("GOfon",@mysql_error(),$cfg_Current['SERVER']));
}
$db_current = @mysql_select_db($cfg_Current['DB'],$r_current);
if(!$db_current){
new log("debug","gofonmacro/".get_class($this),"",array(),@mysql_error($r_current));
mysql_close($r_current);
- return (sprintf(_("Cannot select %s database on server '%s'!"), "GOfon", $cfg_Current['SERVER']));
+ return ( msgPool::dbselect("GOfon",@mysql_error(),$cfg_Current['DB']));
}
}
}
@DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$query, "Database query");
if(!$res){
new log("debug","gofonmacro/".get_class($this),"",array(),@mysql_error($r_current));
- return(sprintf(_("Cannot remove macro from '%s'!"),$Server['SERVER']));
+ return ( msgPool::dbquery("GOfon",@mysql_error($r_current),$Server['SERVER']));
}
@mysql_close($r_current);
}
*/
$tmp = split(",", $s_linestr,3);
- /* Check if there are exactly 2 , */
-# if(substr_count($s_linestr,",") !=2){
-# return(sprintf(_("More than two ',' given in line : '%s'. Remember that parameters are seperated by '|'."),$i_linenum));
-# }
/* Multiple () are not supproted currently ... */
if(substr_count($s_linestr,"(") >1 ){
return(sprintf(_("Not supported multiple brace in line %s!"),$i_linenum));
@DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$query, "Database query");
if(!$res){
new log("debug","gofonmacro/".get_class($this),"",array(),@mysql_error($r_con));
- return(sprintf(_("Cannot insert new macro on server '%s'!"),$cfg['SERVER']));
}
@mysql_close($r_con);
}
$message= plugin::check();
if(!count($this->goFonHomeServers)){
- $message[] = _("There is currently no asterisk server defined!");
+ $message[] = msgPool::noserver(_("GOfon"));
}
/* Check if insert/replace is possible and all servers are available */
$ldap = $this->config->get_ldap_link();
$ldap->search("(&(objectClass=goFonMacro)(cn=".$this->cn."))",array("cn"));
if($ldap->count()>0){
- $message[]= _("Name is already in use!");
+ $message[]= msgPool::duplicated(_("Name"));
}
}
/* Check if display name is set */
if(empty($this->displayName)){
- $message[] = _("Display name is not set!");
+ $message[] = msgPool::requried(_("Name"));
}
/* CN is restricted to 20 chars */
if(strlen("Makro-".$this->cn)>20 ){
return false;
}
}else{
- msg_dialog::display(_("Configuration error"), _("There is currently no asterisk server defined!"), WARNING_DIALOG);
+ msg_dialog::display(_("Configuration error"), msgPool::noserver(_("GOfon")), WARNING_DIALOG);
return false;
}