Code

Added branches container for old stuff
[gosa.git] / gosa-core / include / utils / class_msgPool.inc
index b4700ccf56df26b6f707c41e0c84111a5aabb5a0..d77eeb82803d95afd2a4240a4239d7dac7b67c41 100644 (file)
@@ -44,15 +44,15 @@ class msgPool
     }
     if (count($name) == 1){
       if($type == ""){
-        return (_("This object will be deleted:")."<br>".msgPool::buildList($name));
+        return (_("This object will be deleted:")."<br>".msgPool::buildList($name)."<br><br>");
       }else{
-        return (sprintf(_("This '%s' object will be deleted:"),$type, "<br>".msgPool::buildList($name)));
+        return (sprintf(_("This '%s' object will be deleted:"),$type). "<br>".msgPool::buildList($name)."<br><br>");
       }
     }
     if($type == ""){
-      return (sprintf(_("These objects will be deleted: %s"), "<br>".msgPool::buildList($name)));
+      return (sprintf(_("These objects will be deleted: %s"), "<br>".msgPool::buildList($name)."<br><br>"));
     }else{
-      return (sprintf(_("These '%s' objects will be deleted: %s"),$type, "<br>".msgPool::buildList($name)));
+      return (sprintf(_("These '%s' objects will be deleted: %s"),$type, "<br>".msgPool::buildList($name)."<br><br>"));
     }
   }
 
@@ -367,6 +367,7 @@ class msgPool
         $objects.= "<br>\n$value (<i>$key</i>)";
       }
     }
+    return($objects);
   }
 
   public static function noValidExtension($name)
@@ -465,7 +466,7 @@ class msgPool
   }
 
 
-  function incorrectUpload($reason= "")
+  public static function incorrectUpload($reason= "")
   {
     if ($reason == ""){
       return _("Upload failed!");
@@ -475,7 +476,7 @@ class msgPool
   }
 
 
-  function siError($error= "")
+  public static function siError($error= "")
   {
     if ($error == ""){
       return _("Communication failure with the infrastructure service!");
@@ -484,7 +485,7 @@ class msgPool
   }
 
 
-  function stillInUse($type, $objects= array())
+  public static function stillInUse($type, $objects= array())
   {
     if (!is_array($objects)){
       return sprintf(_("This '%s' is still in use by this object: %s"), $type, "<br><br>".$objects);
@@ -492,45 +493,71 @@ class msgPool
     if (count($objects) == 1){
       return sprintf(_("This '%s' is still in use by this object: %s"), $type, "<br><br>".msgPool::buildList($objects));
     }
+    if (count($objects) == 0){
+      return sprintf(_("This '%s' is still in use."), $type);
+    }
     return sprintf(_("This '%s' is still in use by these objects: %s"), $type, "<br><br>".msgPool::buildList($objects));
   }
 
 
-  function fileDoesNotExist($file)
+  public static function fileDoesNotExist($file)
   {
     return sprintf(_("File '%s' does not exist!"), $file);
   }
 
 
-  function cannotReadFile($file)
+  public static function cannotReadFile($file)
   {
     return sprintf(_("Cannot open file '%s' for reading!"), $file);
   }
 
 
-  function cannotWriteFile($file)
+  public static function cannotWriteFile($file)
   {
     return sprintf(_("Cannot open file '%s' for writing!"), $file);
   }
 
 
-  function cannotDeleteFile($file)
+  public static function invalidConfigurationAttribute($attr)
+  {
+    return sprintf(_("The value for '%s' is currently unconfigured or invalid, please check your configuration file!"), $attr);
+  }
+
+
+  public static function cannotDeleteFile($file)
   {
     return sprintf(_("Cannot delete file '%s'!"), $file);
   }
 
 
-  function cannotCreateFolder($path)
+  public static function cannotCreateFolder($path)
   {
     return sprintf(_("Cannot create folder '%s'!"), $path);
   }
 
 
-  function cannotDeleteFolder($path)
+  public static function cannotDeleteFolder($path)
   {
     return sprintf(_("Cannot delete folder '%s'!"), $path);
   }
 
+
+  public static function checkingFor($what)
+  {
+    return sprintf(_("Checking for %s support"), $what);
+  }
+
+
+  public static function installPhpModule($what)
+  {
+    return sprintf(_("Install and activate the %s PHP module."), $what);
+  }
+
+
+  public static function class_not_found($plugin)
+  {
+    return (sprintf(_("Cannot initialize class '%s'! Maybe there is a plugin missing in your gosa setup?"), $plugin));
+  }
 }
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>