Code

Msg Pool
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 13 Mar 2008 13:47:04 +0000 (13:47 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 13 Mar 2008 13:47:04 +0000 (13:47 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9742 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/systems/admin/systems/class_componentGeneric.inc
gosa-plugins/systems/admin/systems/class_divListSystem.inc
gosa-plugins/systems/admin/systems/class_divListSystemService.inc
gosa-plugins/systems/admin/systems/class_servGeneric.inc
gosa-plugins/systems/admin/systems/class_systemManagement.inc
gosa-plugins/systems/admin/systems/class_termDNS.inc

index dbd26c814ced2f56530ce1c165686396a2739638..8fe4eb5f1ce2bc2fd3b810d782a570e3f5154c6b 100644 (file)
@@ -69,7 +69,7 @@ class componentGeneric extends plugin
     /* Do we represent a valid phone? */
     if (!$this->is_account && $this->parent === NULL){
       $display= "<img alt=\"\" src=\"images/stop.png\" align=middle>&nbsp;<b>".
-        _("This 'dn' has no network features.")."</b>";
+        msgPool::noValidExtension(_("component"))."</b>";
       return($display);
     }
 
index 3a20ba4981af5a586c8003647c59168627afe296..ecb92ca82a203a9a4287861207a7d17ad58f6de5 100644 (file)
@@ -84,17 +84,31 @@ class divListSystem extends MultiSelectWindow
     /* set Page header */
     $this->AddHeader(array("string"=> $chk,          "attach"=>"style='width:20px;'"));
     $this->AddHeader(array("string"=>"&nbsp;","attach"=>"style='width:20px;'"));
-    $this->AddHeader(array("string"=>_("System / Department")));
+    $this->AddHeader(array("string"=>_("Systems")." / "._("Department")));
     $this->AddHeader(array("string"=>_("Actions"),"attach"=>"style='width:".$action_col_size."px;border-right:0px;'"));
 
     /*                  Text        ,Value    ,Name         ,Is selected */
-    $this->AddCheckBox("ShowServers",         _("Select to see servers"),            _("Show servers"),          true);
-    $this->AddCheckBox("ShowTerminals",       _("Select to see Linux terminals"),    _("Show terminals") ,       true);
-    $this->AddCheckBox("ShowWorkstations",    _("Select to see Linux workstations"), _("Show workstations"),     true);
-    $this->AddCheckBox("ShowWinWorkstations", _("Select to see MicroSoft Windows based workstations"), _("Show windows based workstations"),true);
-    $this->AddCheckBox("ShowPrinters",        _("Select to see network printers"),    _("Show network printers") ,true);
-    $this->AddCheckBox("ShowPhones",          _("Select to see VOIP phones"),         _("Show phones") ,          true);
-    $this->AddCheckBox("ShowDevices",         _("Select to see network devices"),     _("Show network devices"),  true);
+    $this->AddCheckBox("ShowServers",        
+        msgPool::selectToView(  _("servers")),            
+        sprintf(_("Show %s"),   _("servers")),true);
+    $this->AddCheckBox("ShowTerminals",       
+        msgPool::selectToView(  _("Linux terminals")),    
+        sprintf(_("Show %s"),   _("terminals")),true);
+    $this->AddCheckBox("ShowWorkstations",
+        msgPool::selectToView(  _("Linux workstations")), 
+        sprintf(_("Show %s"),   _("workstations")),true);
+    $this->AddCheckBox("ShowWinWorkstations", 
+        msgPool::selectToView(  _("MicroSoft Windows based workstations")), 
+        sprintf(_("Show %s"),   _("windows based workstations")),true);
+    $this->AddCheckBox("ShowPrinters",
+        msgPool::selectToView(  _("network printers")),   
+        sprintf(_("Show %s"),   _("network printers")) ,true);
+    $this->AddCheckBox("ShowPhones",
+        msgPool::selectToView(  _("VOIP phones")),        
+        sprintf(_("Show %s"),   _("phones")) ,true);
+    $this->AddCheckBox("ShowDevices",
+        msgPool::selectToView(  _("network devices")),    
+        sprintf(_("Show %s"),   _("network devices")),  true);
 
     /* Add SubSearch checkbox */
     $this->AddCheckBox(SEPERATOR);
@@ -451,15 +465,15 @@ class divListSystem extends MultiSelectWindow
       $num_deps = count($this->Added_Departments);
     }
 
-    $num_ser_str = _("Number of listed servers");
-    $num_ws_str  = _("Number of listed workstations");
-    $num_ter_str = _("Number of listed terminals");
-    $num_pho_str = _("Number of listed phones");
-    $num_prt_str = _("Number of listed printers");
-    $num_com_str = _("Number of listed network components");
-    $num_new_str = _("Number of listed new devices");
-    $num_wws_str = _("Number of listed windows workstations");
-    $num_dep_str = _("Number of listed departments");
+    $num_ser_str = sprintf(_("Number of listed %s"),_("servers"));
+    $num_ws_str  = sprintf(_("Number of listed %s"),_("workstations"));
+    $num_ter_str = sprintf(_("Number of listed %s"),_("terminals"));
+    $num_pho_str = sprintf(_("Number of listed %s"),_("phones"));
+    $num_prt_str = sprintf(_("Number of listed %s"),_("printers"));
+    $num_com_str = sprintf(_("Number of listed %s"),_("network components"));
+    $num_new_str = sprintf(_("Number of listed %s"),_("new devices"));
+    $num_wws_str = sprintf(_("Number of listed %s"),_("windows workstations"));
+    $num_dep_str = sprintf(_("Number of listed %s"),_("departments"));
 
     $str = "<img class='center' src='images/select_server.png'
       title='".$num_ser_str."' alt='".$num_ser_str."'>&nbsp;".$cnts['server']."&nbsp;&nbsp;&nbsp;&nbsp;";
index a29118718fccdf133ae6a512974ecd89a4fda2ab..2512c9cba425c13de3183dc41963b3e4eec9d13d 100644 (file)
@@ -47,7 +47,7 @@ class divListSystemService extends MultiSelectWindow
 
     /* set Page header */
     $this->AddHeader(array("string"=>"&nbsp;","attach"=>"style='width:20px;'"));
-    $this->AddHeader(array("string"=>_("Service name")));
+    $this->AddHeader(array("string"=>_("Name")));
     $this->AddHeader(array("string"=>_("Actions"),"attach"=>"style='width:100px;border-right:0px;'"));
     $this->HideFilterPart();
   }
index 5bf6e46ecc3f2e1a57a128790e1a6cb75d6b31db..b2295c8ab0ddcf5e55ddfc52ab9af19b70db647a 100644 (file)
@@ -123,12 +123,10 @@ class servgeneric extends plugin
     /* Do we represent a valid server? */
     if (!$this->is_account && $this->parent === NULL){
       $display= "<img alt=\"\" src=\"images/stop.png\" align=middle>&nbsp;<b>".
-        _("This 'dn' has no server features.")."</b>";
+        msgPool::noValidExtension(_("server"))."</b>"; 
       return($display);
     }
 
-
-
     if ((isset($_POST['action'])) && ($this->acl_is_writeable("FAIstate")) && isset($this->mapActions[$_POST['saction']]) ){
       $action = $_POST['saction'];
       
@@ -150,7 +148,6 @@ class servgeneric extends plugin
         msg_dialog::display(_("Event error"),
                     sprintf(_("Event '%s' is not available!"),$action),ERROR_DIALOG);
       }
-
     }
 
     /* Base select dialog */
index 0258be6bdc3a34681b6b41a1270a8ff091b2be02..7e8f429f5357095a5b9f83b56da285ad458e24f4 100644 (file)
@@ -327,7 +327,7 @@ class systems extends plugin
           $this->systab->by_object[$tabname]->base = $this->DivListSystem->selectedBase;
           $this->systab->base = $this->DivListSystem->selectedBase;
         }else{
-          print_red(_("You are not allowed to create a new object of this type."));
+          print_red(msgPool::permCreate());
         }
       }
     }
@@ -649,7 +649,7 @@ class systems extends plugin
           } else {
             /* Normally this shouldn't be reached, send some extra
                logs to notify the administrator */
-            print_red (_("You are not allowed to delete this component!"));
+            print_red (msgPool::permDelete());
             new log("security","systems/".get_class($this),$dn,array(),"Tried to trick deletion.");
           }
           /* Remove lock file after successfull deletion */
@@ -727,7 +727,7 @@ class systems extends plugin
 
         /* Obviously the user isn't allowed to delete. Show message and
            clean session. */
-        print_red (_("You are not allowed to delete this component!"));
+        print_red (msgPool::permDelete());
       }
     }
 
@@ -792,7 +792,7 @@ class systems extends plugin
 
         /* Normally this shouldn't be reached, send some extra
            logs to notify the administrator */
-        print_red (_("You are not allowed to delete this component!"));
+        print_red(msgPool::permDelete());
         new log("security","systems/".get_class($this),$dn,array(),"Tried to trick deletion.");
       }
 
@@ -801,14 +801,7 @@ class systems extends plugin
     }
 
 
-
-
-
-
-
-
-
-   /********************
+    /********************
       Edit system type finished, check if everything went ok
      ********************/
     /* Finish user edit is triggered by the tabulator dialog, so
index eddac15555d812b643d757942687f34ce3d4c85c..86bdcc6bac6b15c4284e9d5956d5bbd9c1abce8f 100644 (file)
@@ -509,10 +509,6 @@ class termDNS extends plugin
     /* Call common method to give check the hook */
     $message= plugin::check();
 
-#    if($this->dhcpEnabled && $this->dhcp_is_Account && $this->dhcpParentNode != "" && count($this->dhcpHostEntry) == 0){
-#      $message[] =_("You have not configured your dhcp settings yet.");
-#    }
-    
     /* Check if mac and ip are already used */
     if(!empty($this->ipHostNumber) && $this->DNS_is_account && 
         $this->ipHostNumber != $this->orig_ipHostNumber && 
@@ -589,7 +585,7 @@ class termDNS extends plugin
          */
         if(($values['type'] == "aRecord")&&($values['value'] == $this->ipHostNumber)){
           #TODO: Where's the problem here?
-          $message[]=sprintf(_("The IP address '%s' will is added as 'A Record', this will be done automatically, please remove the record."), 
+          $message[]=sprintf(_("The IP address '%s' will be added as 'A Record', this will be done automatically, please remove the record."), 
                $this->ipHostNumber);
         }