Code

Updated msgPools
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Sat, 8 Mar 2008 11:20:51 +0000 (11:20 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Sat, 8 Mar 2008 11:20:51 +0000 (11:20 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9459 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/samba/personal/samba/class_sambaAccount.inc
gosa-plugins/samba/personal/samba/class_sambaLogonHours.inc
gosa-plugins/samba/personal/samba/main.inc

index b0f396274c5b2c8e5f2bfdfed914bf38c04d1dfc..0f37c46aeee296972c91042ea63a81e384389ab6 100644 (file)
@@ -214,7 +214,7 @@ class sambaAccount extends plugin
     /* Do we represent a valid account? */
     if (!$this->is_account && $this->parent === NULL){
       $display= "<img alt=\"\"src=\"images/stop.png\" align=\"middle\">&nbsp;<b>".
-        _("This account has no samba extensions.")."</b>";
+        msgPool::noValidExtension(_("Samba"))."</b>";
       $display.= back_to_main();
       return ($display);
     }
@@ -226,8 +226,8 @@ class sambaAccount extends plugin
       $display= "";
       if ($this->parent !== NULL){
         if ($this->is_account){
-          $display= $this->show_disable_header(_("Remove samba account"),
-              _("This account has samba features enabled. You can disable them by clicking below."));
+          $display= $this->show_disable_header(msgPool::removeFeaturesButton(_("Samba")),
+              msgPool::featuresEnabled(_("Samba")));
         } else {
           $obj= $this->parent->by_object['posixAccount'];
 
@@ -236,11 +236,11 @@ class sambaAccount extends plugin
              uidNumbers. There'll be a better solution later
              on. */
           if ($obj->is_account){
-            $display= $this->show_enable_header(_("Create samba account"),
-                _("This account has samba features disabled. You can enable them by clicking below."));
+            $display= $this->show_enable_header(msgPool::addFeaturesButton(_("Samba")),
+                msgPool::featuresDisabled(_("Samba")));
           } else {
-            $display= $this->show_enable_header(_("Create samba account"),
-                _("This account has samba features disabled. Posix features are needed for samba accounts, enable them first."), TRUE);
+            $display= $this->show_enable_header(msgPool::addFeaturesButton(_("Samba")),
+                msgPool::featuresDisabled(_("Samba"), _("POSIX")), TRUE);
           }
           return ($display);
         }
@@ -432,9 +432,7 @@ class sambaAccount extends plugin
     for($y= $date['year']-4; $y<$date['year']+4; $y++){
       $years[]= $y;
     }
-    $months= array(_("January"), _("February"), _("March"), _("April"),
-        _("May"), _("June"), _("July"), _("August"), _("September"),
-        _("October"), _("November"), _("December"));
+    $months= msgPool::months();
     $smarty->assign("day", $date["mday"]);
     $smarty->assign("days", $days);
     $smarty->assign("months", $months);
@@ -450,9 +448,7 @@ class sambaAccount extends plugin
     for($y= $date['year']-4; $y<$date['year']+4; $y++){
       $sambaLogonTime_years[]= $y;
     }
-    $sambaLogonTime_months= array(_("January"), _("February"), _("March"), _("April"),
-        _("May"), _("June"), _("July"), _("August"), _("September"),
-        _("October"), _("November"), _("December"));
+    $sambaLogonTime_months= msgPool::months;
     $smarty->assign("sambaLogonTime_day", $sambaLogonTime_date["mday"]);
     $smarty->assign("sambaLogonTime_days", $sambaLogonTime_days);
     $smarty->assign("sambaLogonTime_months", $sambaLogonTime_months);
@@ -468,9 +464,7 @@ class sambaAccount extends plugin
     for($y= $date['year']-4; $y<$date['year']+4; $y++){
       $sambaLogoffTime_years[]= $y;
     }
-    $sambaLogoffTime_months= array(_("January"), _("February"), _("March"), _("April"),
-        _("May"), _("June"), _("July"), _("August"), _("September"),
-        _("October"), _("November"), _("December"));
+    $sambaLogoffTime_months= msgPool::months();
     $smarty->assign("sambaLogoffTime_day", $sambaLogoffTime_date["mday"]);
     $smarty->assign("sambaLogoffTime_days", $sambaLogoffTime_days);
     $smarty->assign("sambaLogoffTime_months", $sambaLogoffTime_months);
@@ -486,9 +480,7 @@ class sambaAccount extends plugin
     for($y= $date['year']-4; $y<$date['year']+4; $y++){
       $sambaKickoffTime_years[]= $y;
     }
-    $sambaKickoffTime_months= array(_("January"), _("February"), _("March"), _("April"),
-        _("May"), _("June"), _("July"), _("August"), _("September"),
-        _("October"), _("November"), _("December"));
+    $sambaKickoffTime_months= msgPool::months();
     //$smarty->assign("sambaKickoffTime_day", $sambaKickoffTime_date["mday"]-1);
     $smarty->assign("sambaKickoffTime_day", $sambaKickoffTime_date["mday"]); // hickert
     $smarty->assign("sambaKickoffTime_days", $sambaKickoffTime_days);
@@ -765,7 +757,7 @@ class sambaAccount extends plugin
 
       /* Too many workstations? Windows usrmgr only supports eight */
       if (substr_count($this->sambaUserWorkstations, ",") >= 8){
-        $message[]= _("The windows user manager only allows eight clients. You've specified more than eight.");
+        $message[]= _("The windows usermanager allows eight clients at maximum!");
       }
     }
 
index fa030804711746e4abadfea83655158aca4a2524..e3cc51d3466ecdbc7889d5bcf63f49a9bf9f91cb 100644 (file)
@@ -58,14 +58,7 @@ class sambaLogonHours extends plugin
   function execute()
   {
 
-    $week_days = array();
-    $week_days[0]= _("Sunday");
-    $week_days[1]= _("Monday");
-    $week_days[2]= _("Tuesday");
-    $week_days[3]= _("Wednesday");
-    $week_days[4]= _("Thursday");
-    $week_days[5]= _("Friday");
-    $week_days[6]= _("Saturday");
+    $week_days = msgPool::weekdays();
 
     $hours = array();
     for($i = 0 ; $i <24 ; $i++ ){
index 172d6ae70bf6cb44a857f79d5dc99595302cab18..9a102442e72e654a53731732f8c87b94c5c79a74 100644 (file)
@@ -101,9 +101,9 @@ if (!$remove_lock){
 
     /* Are we in edit mode? */
     if (session::is_set('edit')){
-      $display.= "<input type=submit name=\"edit_finish\" style=\"width:80px\" value=\""._("Ok")."\">\n";
+      $display.= "<input type=submit name=\"edit_finish\" style=\"width:80px\" value=\"".msgPool::okButton()."\">\n";
       $display.= "&nbsp;";
-      $display.= "<input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
+      $display.= "<input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">\n";
       $info= "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/closedlock.png').
              "\"> ".$ui->dn."&nbsp;";
     } else {
@@ -113,8 +113,8 @@ if (!$remove_lock){
       if(preg_match("/w/",$ui->get_permissions($ui->dn,"users/sambaAccount"))){
 
         $info.= "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lamp.png')."\"> ".
-                _("Click the 'Edit' button below to change informations in this dialog");
-        $display.= "<input type=submit name=\"edit\" value=\""._("Edit")."\">\n";
+                msgPool::clickEditToChange();
+        $display.= "<input type=submit name=\"edit\" value=\"".msgPool::editButton()."\">\n";
       }
       $display.= "<input type=\"hidden\" name=\"ignore\">\n";
     }