Code

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

gosa-plugins/netatalk/personal/netatalk/class_netatalk.inc
gosa-plugins/netatalk/personal/netatalk/main.inc

index 5b6ced7dc067c08ad14b0ce33c492471bdfc7dcb..59b67c257f818eaf0b35d5e142d035e413d30968 100644 (file)
@@ -167,7 +167,7 @@ class netatalk 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 netatalk extensions.")."</b>";
+      $display = "<img alt=\"\"src=\"images/stop.png\" align=\"middle\">&nbsp;<b>".msgPool::noValidExtension(_("netatalk"))."</b>";
 
       $display .= back_to_main();
       return ($display);
@@ -176,20 +176,17 @@ class netatalk extends plugin {
     /* Show tab dialog headers */
     if ($this->parent !== NULL) {
       if ($this->is_account) {
-        $display = $this->show_disable_header(_("Remove netatalk account"), _("This account has netatalk features enabled. You can disable them by clicking below."));
+        $display = $this->show_disable_header(msgPool::removeFeaturesButton(_("netatalk")), msgPool::featuresEnabled(_("netatalk")));
       } else {
         $errmsg="";
         $obj = $this->parent->by_object['posixAccount'];
         if  (!($obj->is_account) ) {
-          $errmsg.="Posix features are needed for netatalk accounts, enable them first. ";
-        }
-        if (count($this->shares)== 0) {
-          $errmsg.="At least one share with netatalk or NFS mount entry needed.";
-        }
-        if($errmsg==""){
-          $display = $this->show_enable_header(_("Create netatalk account"), _("This account has netatalk features disabled. You can enable them by clicking below."));
+          $display = $this->show_enable_header(msgPool::addFeaturesButton(_("netatalk")), msgPool::featuresDisabled(_("netatalk"), _("POSIX")), TRUE);
+        } elseif (count($this->shares)== 0) {
+          $display = $this->show_enable_header(msgPool::addFeaturesButton(_("netatalk")), msgPool::featuresDisabled(_("netatalk"), _("netatalk or NFS share")), TRUE);
         } else {
-          $display = $this->show_enable_header(_("Create netatalk account"), _($errmsg), TRUE);
+          $display = $this->show_enable_header(msgPool::addFeaturesButton(_("netatalk")), msgPool::featuresDisabled(_("netatalk")), TRUE);
+        } 
         }
         return ($display);
       }
@@ -222,7 +219,7 @@ class netatalk extends plugin {
     $message = array ();
 
     if (strlen($this->apple_user_share) == 0) {
-      $message[] = _("You must select a share to use.");
+      $message[] = msgPool::required(_("Share"));
     }
 
     return ($message);
index bc73a396bfe4913de9ca5f9ee227548d647fceb7..043da09d9671e5f20964e6251aadf2583491f044 100644 (file)
@@ -93,15 +93,15 @@ 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 {
       $info = "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/openlock.png')."\"> ".$ui->dn."&nbsp;";
       if(preg_match("/w/",$ui->get_permissions($ui->dn,"users/netatalk"))){
-        $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";
+        $info .= "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lamp.png')."\"> ".msgPool::clickEditToChange());
+        $display .= "<input type=submit name=\"edit\" value=\"".msgPool::editButton()."\">\n";
       }
 
       $display .= "<input type=\"hidden\" name=\"ignore\">\n";