From 3bdfd463e30d67d9e72ea78aac1d28c046791caa Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 12 Mar 2008 13:14:40 +0000 Subject: [PATCH] msgPool git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9712 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../applications/class_applicationGeneric.inc | 14 +++++++------- .../applications/class_applicationManagement.inc | 6 +++--- .../applications/class_applicationParameters.inc | 7 +++---- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc index 1410422ba..198d1114a 100644 --- a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc +++ b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc @@ -128,7 +128,7 @@ class application extends plugin /* Do we represent a valid group? */ if (!$this->is_account && $this->parent === NULL){ $display= "\"\" ". - _("This 'dn' is no application.").""; + msgPool::noValidExtension(_("application")).""; return ($display); } @@ -419,7 +419,7 @@ class application extends plugin $message= plugin::check(); if(!preg_match("#^/#",$this->gosaApplicationExecute)){ - $message[]=(_("Specified execute path must start with '/'.")); + $message[]=msgPool::invalid(_("Execute path"),"","","/some/path"); } /* Permissions for that base? */ @@ -436,15 +436,15 @@ class application extends plugin /* All required fields are set? */ if ($this->cn == ""){ - $message[]= _("Required field 'Name' is not filled."); + $message[]= msgPool::required(_("Name")); } if(preg_match("/[^a-z0-9]/",$this->cn)) { - $message[]=_("Invalid character in application name. Only a-z 0-9 are allowed."); + $message[]=msgPool::invalid(_("Name"),$this->cn,"/^[a-z0-9]*$/"); } if ($this->gosaApplicationExecute == ""){ - $message[]= _("Required field 'Execute' is not filled."); + $message[]= msgPool::required(_("Execute")); } /* Check for existing application */ @@ -460,7 +460,7 @@ class application extends plugin if($ldap->count()){ $attrs = $ldap->fetch(); if($this->dn != $attrs['dn']) { - $message[]= _("There's already an application with this 'Name'."); + $message[]= msgPool::duplicate("cn"); } } }else{ @@ -468,7 +468,7 @@ class application extends plugin if ($ldap->count()){ $attrs = $ldap->fetch(); if($this->dn != $attrs['dn']) { - $message[]= _("There's already an application with this 'Name'."); + $message[]= msgPool::duplicate("cn"); } } } diff --git a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc index cb84df9c3..2450de95c 100644 --- a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc +++ b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc @@ -339,7 +339,7 @@ class applicationManagement 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 application!")); + print_red (msgPool::permDelete()); new log("security","application/".get_class($this),$dn,array(),"Tried to trick deletion."); } /* Remove lock file after successfull deletion */ @@ -393,7 +393,7 @@ class applicationManagement extends plugin /* Obviously the user isn't allowed to delete. Show message and clean session. */ - print_red (_("You are not allowed to delete this application!")); + print_red(msgPool::permDelete()); } } @@ -423,7 +423,7 @@ class applicationManagement 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 application!")); + print_red(msgPool::permDelete()); new log("security","application/".get_class($this),$dn,array(),"Tried to trick deletion."); } diff --git a/gosa-plugins/goto/admin/applications/class_applicationParameters.inc b/gosa-plugins/goto/admin/applications/class_applicationParameters.inc index e04c10cdc..30c8ee338 100644 --- a/gosa-plugins/goto/admin/applications/class_applicationParameters.inc +++ b/gosa-plugins/goto/admin/applications/class_applicationParameters.inc @@ -47,10 +47,10 @@ class applicationParameters extends plugin if ($this->parent !== NULL){ if ($this->is_account){ $display= $this->show_disable_header(_("Remove options"), - _("This application has options. You can disable them by clicking below.")); + msgPool::featuresEnabled(_("parameter")); } else { $display= $this->show_enable_header(_("Create options"), - _("This application has options disabled. You can enable them by clicking below.")); + msgPool::featuresDisabled(_("parameter")); $this->parent->by_object['application']->generateTemplate(); return ($display); } @@ -184,8 +184,7 @@ class applicationParameters extends plugin /* Check for valid option names */ for ($i= 0; $ioption_name); $i++){ if (!preg_match ("/^[a-z0-9_]+$/i", $this->option_name[$i])){ - $message[]= sprintf(_("Value '%s' specified as option name is not valid."), - $this->option_name[$i]); + $message[]= msgPool::invalid(_("Name"), $this->option_name[$i],"/^[a-z0-9_]+$/i"); } } -- 2.30.2