summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 134a60b)
raw | patch | inline | side by side (parent: 134a60b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 13 Mar 2008 14:26:15 +0000 (14:26 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 13 Mar 2008 14:26:15 +0000 (14:26 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9747 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/goto/admin/systems/goto/class_ArpNewDevice.inc b/gosa-plugins/goto/admin/systems/goto/class_ArpNewDevice.inc
index 455406ae8646d986509e1df276f2be6cd8253cc9..40251a966e45d9f924baa92417cb8f0de9a07621 100644 (file)
$message= plugin::check();
$message= array_merge($message, $this->netConfigDNS->check());
if(empty($this->cn)){
- $message[] = _("Please specify a valid dns name.");
+ $message[] = msgPool::required(_("Name."));
}
return($message);
}
diff --git a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc
index 0b89ef20e84cd1b69bd5e2763d4488cdbdff5026..1c974684ecd3e7323135651725079f2a91a8e491 100644 (file)
/* Do we represent a valid printer? */
if (!$this->is_account && $this->parent === NULL){
$display= "<img alt=\"\" src=\"images/stop.png\" align=middle> <b>".
- _("This 'dn' has no printer features.")."</b>";
+ msgPool::noValidExtension(_("printer"))."</b>";
return($display);
}
if(!preg_match("/^Printer$/i",$this->BelongsTo)){
if((empty($this->cn)) && ($this->dn != "new")){
$display= $this->show_enable_header(_("Add printer extension"),
- _("This object has printer extension disabled. You can't enable it while 'cn' is not present in entry. Possibly you are currently creating a new terminal template"),TRUE,TRUE);
+ msgPool::featuresDisabled(_("printer"))._("You can't enable it while 'cn' is not present in entry. Possibly you are currently creating a new terminal template."),TRUE,TRUE);
$this->is_account= false;
return $display;
}
if (($this->is_account)){
if(preg_match("/^Workstation$/i",$this->BelongsTo)){
$display= $this->show_disable_header(_("Remove printer extension"),
- _("This workstation has printer extension enabled.You can disable it by clicking below."));
+ msgPool::featuresEnabled(_("printer")));
}elseif(preg_match("/^Terminal$/i",$this->BelongsTo)){
$display= $this->show_disable_header(_("Remove printer extension"),
- _("This terminal has printer extension enabled. You can disable it by clicking below."));
+ msgPool::featuresDisabled(_("printer")));
}
}else{
if(preg_match("/^Workstation$/i",$this->BelongsTo)){
$display= $this->show_disable_header(_("Add printer extension"),
- _("This workstation has printer extension disabled. You can enable it by clicking below."));
+ msgPool::featuresEnabled(_("printer")));
}elseif(preg_match("/^Terminal$/i",$this->BelongsTo)){
$display= $this->show_enable_header(_("Add printer extension"),
- _("This terminal has printer extension disabled. You can enable it by clicking below."));
+ msgPool::featuresDisabled(_("printer")));
}
return ($display);
}
if(!preg_match("/Printer/i",$this->BelongsTo)){
if(preg_match("/Terminal/i",$this->BelongsTo)){
- $smarty->assign("desc" ,sprintf(_("This printer belongs to terminal %s. You can't rename this printer."),"<b>".$this->cn."</b>"));
+ $smarty->assign("desc" ,sprintf(_("This printer belongs to %s. You can't rename this printer."),_("terminal"),"<b>".$this->cn."</b>"));
}else{
- $smarty->assign("desc" ,sprintf(_("This printer belongs to workstation %s. You can't rename this printer."),"<b>".$this->cn."</b>"));
+ $smarty->assign("desc" ,sprintf(_("This printer belongs to %s. You can't rename this printer."),_("workstation"),"<b>".$this->cn."</b>"));
}
$smarty->assign("cnACL" , $this->getacl("cn",true));
}else{
/* must: cn */
if(($this->BelongsTo == "Printer") && (empty($this->cn))){
- $message[]= _("The required field 'Printer name' is not set.");
+ $message[]= msgPool::required(_("Name"));
}
/* must: cn */
if(($this->BelongsTo == "Printer") && !tests::is_dns_name($this->cn)){
- $message[]= _("Invalid character in printer name.");
+ $message[]= msgPool::invalid(_("Name"));
}
/* must: labeledURI */
if(empty($this->labeledURI)){
- $message[]= "The required field 'Printer URL' is not set.";
+ $message[]= msgPool::required(_("Printer URL"));
}
/* Check if there is already an entry with this cn*/
continue;
}
if ($attrs['dn'] != $this->orig_dn){
- $message[]= sprintf (_("There is already an entry '%s' in the base choosen by you"), $this->cn);
+ $message[]= msgPool::duplicated(_("Name"));
break;
}
}
diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc
index 7928972f7d3260bdbaa9749405be9e00a9cc511f..dbdb6a10c501c0ccafa346026e6c640cfc677e9e 100644 (file)
/* Do we represent a valid terminal? */
if (!$this->is_account && $this->parent === NULL){
$display= "<img alt=\"\" src=\"images/stop.png\" align=middle> <b>".
- _("This 'dn' has no terminal features.")."</b>";
+ msgPool::noValidExtension(_("terminal"))."</b>";
return($display);
}
$this->dn= "cn=".$this->cn.",".get_ou('terminalou').$this->base;
if ($this->cn == ""){
- $message[]= _("The required field 'Terminal name' is not set.");
+ $message[]= msgPool::required(_("Name"));
}
/* Check if given name is a valid host/dns name */
if(!tests::is_dns_name($this->cn) ){
- $message[] = _("Please specify a valid name for this object.");
+ $message[] = msgPool::invalid(_("Name"));
}
if ($this->orig_dn == 'new'){
continue;
} else {
if ($attrs['dn'] != $this->orig_dn){
- $message[]= sprintf (_("There is already an entry '%s' in the base choosen by you"), $this->cn);
+ $message[]= msgPool::duplicated(_("Name"));
break;
}
}
/* Check for valid ntpServer selection */
if((!$this->inheritTimeServer) && (!count($this->gotoNtpServer))){
- $message[]= _("There must be at least one NTP server selected, or the inherit mode activated.");
+ $message[]= msgPool::required(_("NTP server"));
}
return ($message);
diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalInfo.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalInfo.inc
index 7a331339702342cdfe591d755fcd463b2efc0f91..64096c4f6cae7c0392a48b5f1b5fadc76db98e70 100644 (file)
/* Do we represent a valid terminal? */
if (!$this->is_account && $this->parent === NULL){
return("<img alt=\"\" src=\"images/stop.png\" align=middle> <b>".
- _("This 'dn' has no terminal features.")."</b>");
+ msgPool::noValidExtension(_("terminal"))."</b>");
}
$smarty= get_smarty();
$display= "";
if(!is_callable("snmpget")){
- print_red(_("There is no php snmp module installed, can't gather any informations."));
+ print_red(msgPool::missingext("snmp"));
$smarty->assign("load", progressbar(0,100,15,true));
$smarty->assign("mem", progressbar(0,100,15,true));
diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc
index 63fe1fce14b105c05e6f178ddf7524cc7c7bb075..9ba040b90c24b02a3ae058b63b2635c8040811d8 100644 (file)
/* Check vsync for correct usage */
$val= preg_replace ("/\s/", "", $this->gotoXVsync);
if (!preg_match ("/^\d+(\.\d+)?([-]\d+(\.\d+)?)?$/", $val) && $this->acl_is_writeable("gotoXVsync")){
-
- $message[]= _("Please specify a valid VSync range.");
+ $message[]= msgPool::invalid(_("VSync range"));
} elseif ($this->acl_is_writeable("gotoXVsync")){
list($v1,$v2)= preg_split ("/[-+]/", $val);
if ($v2 != ""){
if ($v1 > $v2){
- $message[]= _("Please specify a valid VSync range.");
+ $message[]= msgPool::invalid(_("VSync range"));
}
}
}
/* Check hsync for correct usage */
$val= preg_replace ("/\s/", "", $this->gotoXHsync);
if (!preg_match ("/^\d+(\.\d+)?([-]\d+(\.\d+)?)?$/", $val) && $this->acl_is_writeable("gotoXHsync")){
-
- $message[]= _("Please specify a valid HSync range.");
+ $message[]= msgPool::invalid(_("HSync range"));
} elseif ($this->acl_is_writeable("gotoXHsync")){
list($v1,$v2)= preg_split ("/[-+]/", $val);
if ($v2 != ""){
if ($v1 > $v2){
- $message[]= _("Please specify a valid HSync range.");
+ $message[]= msgPool::invalid(_("HSync range"));
}
}
}
diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc
index c0d4a580315ec90a01bf211c2de053becdc99f9e..6f7d61a38e19c66020d8cc72c29c3d6b86ee5ff9 100644 (file)
/* Do we represent a valid terminal? */
if (!$this->is_account && $this->parent === NULL){
$display= "<img alt=\"\" src=\"images/stop.png\" align=middle> <b>".
- _("This 'dn' has no terminal features.")."</b>";
+ msgPool::noValidExtension(_("terminal"))."</b>";
return ($display);
}
if(isset($_POST['gotoShareAdd']) && $this->acl_is_writeable("gotoShare")){
/* We assign a share to this user, if we don't know where to mount the share */
if((!isset($_POST['gotoShareMountPoint']))||(empty($_POST['gotoShareMountPoint']))||(preg_match("/[\|]/i",$_POST['gotoShareMountPoint']))){
- print_red(_("You must specify a valid mount point."));
+ print_red(msgPool::invalid(_("Mount point")));
}else{
$a_share = $this->gotoAvailableShares[$_POST['gotoShareSelection']];
$s_mount = $_POST['gotoShareMountPoint'];
diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc
index a2469a6a66f5064806d64cc06148d5a9e3792af8..d092278bfdc564d298642c66e789c84839c33070 100644 (file)
/* Do we represent a valid terminal? */
if (!$this->is_account && $this->parent === NULL){
$display= "<img alt=\"\" src=\"images/stop.png\" align=middle> <b>".
- _("This 'dn' has no workstation features.")."</b>";
+ msgPool::noValidExtension(_("workstation"))."</b>";
return($display);
}
$this->dn= "cn=".$this->cn.",".get_ou('workstationou').$this->base;
if ($this->cn == ""){
- $message[]= _("The required field 'Workstation name' is not set.");
+ $message[]= msgPool::required(_("Name"));
}
/* Check if given name is a valid host/dns name */
if(!tests::is_dns_name($this->cn)){
- $message[] = _("Please specify a valid name for this object.");
+ $message[] = msgPool::invalid(_("Name"));
}
if ($this->orig_dn != $this->dn){
continue;
} else {
if ($attrs['dn'] != $this->orig_dn){
- $message[]= sprintf (_("There is already an entry '%s' in the base choosen by you"), $this->cn);
+ $message[]= msgPool::duplicated(_("Name"));
break;
}
}
/* Check for valid ntpServer selection */
if((!$this->inheritTimeServer) && (!count($this->gotoNtpServer))){
- $message[]= _("There must be at least one NTP server selected, or the inherit mode activated.");
+ $message[]= msgPool::required(_("NTP server"));
}
/* Warn the user, that this host is currently installing */
diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc
index d10108a2ae59c8cf9ed5642d0afe16f42ac7e17d..438d0b6809fee1668775117cc551e11a9e69218d 100644 (file)
if($this->acl_is_writeable("gotoXVsync")){
if (!preg_match ("/^\d+(\.\d+)?([-]\d+(\.\d+)?)?$/", $val)){
- $message[]= _("Please specify a valid VSync range.");
+ $message[]= msgPool::invalid(_("VSync"));
} else{
list($v1,$v2)= preg_split ("/[-+]/", $val);
if ($v2 != ""){
if ($v1 > $v2){
- $message[]= _("Please specify a valid VSync range.");
+ $message[]= msgPool::invalid(_("VSync"));
}
}
}
$val= preg_replace ("/\s/", "", $this->gotoXHsync);
if($this->acl_is_writeable("gotoXHsync")){
if (!preg_match ("/^\d+(\.\d+)?([-]\d+(\.\d+)?)?$/", $val)){
- $message[]= _("Please specify a valid HSync range.");
+ $message[]= msgPool::invalid(_("HSync"));
} else{
list($v1,$v2)= preg_split ("/[-+]/", $val);
if ($v2 != ""){
if ($v1 > $v2){
- $message[]= _("Please specify a valid HSync range.");
+ $message[]= msgPool::invalid(_("HSync"));
}
}
}
diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc
index 59582f76dc5a0c750d1d06fc90a8dfbc7d3fc564..fc4487d3deec2fbabb721e4bc81232c203345170 100644 (file)
/* Do we represent a valid terminal? */
if (!$this->is_account && $this->parent === NULL){
$display= "<img alt=\"\" src=\"images/stop.png\" align=middle> <b>".
- _("This 'dn' has no terminal features.")."</b>";
+ msgPool::noValidExtension(_("workstation"))."</b>";
return ($display);
}
if((isset($_POST['gotoShareAdd'])) && ($this->acl_is_writeable("gotoShare"))) {
/* We assign a share to this user, if we don't know where to mount the share */
if((!isset($_POST['gotoShareMountPoint']))||(empty($_POST['gotoShareMountPoint']))||(preg_match("/[\|]/i",$_POST['gotoShareMountPoint']))){
- print_red(_("You must specify a valid mount point."));
+ print_red(msgPool::required(_("Mount point")));
}else{
if(count($this->gotoAvailableShares)){
$a_share = $this->gotoAvailableShares[$_POST['gotoShareSelection']];