Code

updated strings
[gosa.git] / gosa-plugins / mail / admin / ogroups / mail / class_mailogroup.inc
index 85aadf3e7a398a080d8fcb7304face237871fd98..e626b07807b51a8c75eafa4f11b600ad16c06c29 100644 (file)
@@ -48,9 +48,10 @@ class mailogroup extends plugin
     if ($this->parent !== NULL){
       if ($this->is_account){
         $display= $this->show_disable_header(_("Remove mail account"),
-            _("This group has mail features enabled. You can disable them by clicking below."));
+            msgPool::featuresEnabled(_("mail group")));
       } else {
-        $display= $this->show_enable_header(_("Create mail account"), _("This group has mail features disabled. You can enable them by clicking below."));
+        $display= $this->show_enable_header(_("Create mail account"), 
+            msgPool::featuresDisabled(_("mail group")));
         return ($display);
       }
     }
@@ -82,14 +83,14 @@ class mailogroup extends plugin
 
       /* Check if mail address is valid */
       if (!tests::is_email($this->mail) || $this->mail == ""){
-        $message[]= _("Please enter a valid email address in 'Primary address' field.");
+        $message[]= msgPool::invalid(_("Mail address"),"","",_("your-name@your-domain.com"));
       }
 
       /* Check if mail address is already in use */
       $ldap->cd($this->config->current['BASE']);
       $ldap->search ("(&(!(objectClass=gosaUserTemplate))(|(mail=".$this->mail.")(gosaMailAlternateAddress=".$this->mail."))(!(cn=".$this->cn.")))", array("uid"));
       if ($ldap->count() != 0){
-        $message[]= _("The primary address you've entered is already in use.");
+        $message[]= msgPool::duplicated(_("Mail address"));
       }
     }
 
@@ -115,7 +116,9 @@ class mailogroup extends plugin
       new log("create","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
     }
 
-    show_ldap_error($ldap->get_error(), sprintf(_("Saving of object group/mail with dn '%s' failed."),$this->dn));
+    if (!$ldap->success()){
+      msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+    }
 
     /* Optionally execute a command after we're done */
     if ($this->initially_was_account == $this->is_account){
@@ -150,7 +153,9 @@ class mailogroup extends plugin
 
     new log("remove","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
 
-    show_ldap_error($ldap->get_error(), sprintf(_("Removing of object group/mail with dn '%s' failed."),$this->dn));
+    if (!$ldap->success()){
+      msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+    }
   }