summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1946fc9)
raw | patch | inline | side by side (parent: 1946fc9)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 13 Mar 2008 08:07:00 +0000 (08:07 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 13 Mar 2008 08:07:00 +0000 (08:07 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9724 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/fai/admin/fai/class_askClassName.inc b/gosa-plugins/fai/admin/fai/class_askClassName.inc
index 2a40c6366ebc0f34617af05b34840b91999e087c..c803e64dc49e1bbf34206ba3a38604d138ab8c3b 100644 (file)
* Depending on the object type we want to create, a different headline will be shown
*/
switch($this->objectClass) {
- case "FAIpartitionTable": $str =_("Create new FAI object - partition table.");break;
- case "FAIpackageList" : $str =_("Create new FAI object - package bundle.");break;
- case "FAIscript" : $str =_("Create new FAI object - script bundle.");break;
- case "FAIvariable" : $str =_("Create new FAI object - variable bundle.");break;
- case "FAIhook" : $str =_("Create new FAI object - hook bundle.");break;
- case "FAIprofile" : $str =_("Create new FAI object - profile.");break;
- case "FAItemplate" : $str =_("Create new FAI object - template.");break;
+ case "FAIpartitionTable": $str =_("Create new FAI object")." - "._("Partition table");break;
+ case "FAIpackageList" : $str =_("Create new FAI object")." - "._("Package bundle");break;
+ case "FAIscript" : $str =_("Create new FAI object")." - "._("Script bundle");break;
+ case "FAIvariable" : $str =_("Create new FAI object")." - "._("Variable bundle");break;
+ case "FAIhook" : $str =_("Create new FAI object")." - "._("Hook bundle");break;
+ case "FAIprofile" : $str =_("Create new FAI object")." - "._("Profile");break;
+ case "FAItemplate" : $str =_("Create new FAI object")." - "._("Template bundle");break;
default : $str =_("Create new FAI object");break;
}
$smarty->assign("headline",$str);
$message= plugin::check();
if($this->ClassName != preg_replace("/ /","",trim($this->ClassName))){
- $message[] = _("Spaces are not allowed within class names.");
+ $message[] = msgPool::invalid(_("Name"),preg_replace("/ /","_",$this->ClassName),"/[^_]/");
}
if(empty($this->ClassName)){
- $message[]=_("The given class name is empty.");
+ $message[]= msgPool::required(_("Name"));
}
if(in_array($this->ClassName,$this->forbidden)){
- $message[]=_("The specified class name is already in use for this object type.");
+ $message[]= msgPool::duplicated(_("Name"));
}
return ($message);
diff --git a/gosa-plugins/fai/admin/fai/class_divListFai.inc b/gosa-plugins/fai/admin/fai/class_divListFai.inc
index 4994be56582c5aa8621eb59ab419182732addf90..8c151c79dfada35ad82198c62a5cc14343183047 100644 (file)
$this->AddHeader(array("string" => _("Class type"), "attach" => "style='width:200px;'"));
$this->AddHeader(array("string" => _("Actions"), "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'"));
- $this->AddCheckBox("ShowProfiles" , _("Display FAI profile objects") ,_("Show profiles") ,true);
- $this->AddCheckBox("ShowTemplates" , _("Display FAI template objects") ,_("Show templates") ,true);
- $this->AddCheckBox("ShowScripts" , _("Display FAI scripts") ,_("Show scripts") ,true);
- $this->AddCheckBox("ShowHooks" , _("Display FAI hooks") ,_("Show hooks") ,true);
- $this->AddCheckBox("ShowVariables" , _("Display FAI variables") ,_("Show variables") ,true);
- $this->AddCheckBox("ShowPackages" , _("Display FAI packages") ,_("Show packages") ,true);
- $this->AddCheckBox("ShowPartitions" , _("Display FAI partitions") ,_("Show partitions") ,true);
+ $this->AddCheckBox("ShowProfiles" , sprintf(_("Display objects of type '%s'."),_("Profile")) ,_("Show profiles") ,true);
+ $this->AddCheckBox("ShowTemplates" , sprintf(_("Display objects of type '%s'."),_("Variable")) ,_("Show templates") ,true);
+ $this->AddCheckBox("ShowScripts" , sprintf(_("Display objects of type '%s'."),_("Script")) ,_("Show scripts") ,true);
+ $this->AddCheckBox("ShowHooks" , sprintf(_("Display objects of type '%s'."),_("Hook")) ,_("Show hooks") ,true);
+ $this->AddCheckBox("ShowVariables" , sprintf(_("Display objects of type '%s'."),_("Variable")) ,_("Show variables") ,true);
+ $this->AddCheckBox("ShowPackages" , sprintf(_("Display objects of type '%s'."),_("Package")) ,_("Show packages") ,true);
+ $this->AddCheckBox("ShowPartitions" , sprintf(_("Display objects of type '%s'."),_("Partition")),_("Show partitions") ,true);
/* Add SubSearch checkbox */
//$this->AddCheckBox(SEPERATOR);
$num_deps = count($this->Added_Departments);
}
- $profile_str = _("Number of listed profiles");
- $partition_str = _("Number of listed partitions");
- $script_str = _("Number of listed scripts");
- $hook_str = _("Number of listed hooks");
- $variable_str = _("Number of listed variables");
- $template_str = _("Number of listed templates");
- $package_str = _("Number of listed packages");
- $dep_str = _("Number of listed departments");
+ $profile_str = sprintf(_("Number of listed '%s'"),_("profiles"));
+ $partition_str = sprintf(_("Number of listed '%s'"),_("partitions"));
+ $script_str = sprintf(_("Number of listed '%s'"),_("scripts"));
+ $hook_str = sprintf(_("Number of listed '%s'"),_("hooks"));
+ $variable_str = sprintf(_("Number of listed '%s'"),_("variables"));
+ $template_str = sprintf(_("Number of listed '%s'"),_("templates"));
+ $package_str = sprintf(_("Number of listed '%s'"),_("packages"));
+ $dep_str = sprintf(_("Number of listed '%s'"),_("departments"));
$str = "<img class='center' src='".$objects['FAIprofile']['IMG']."'
title='".$profile_str."' alt='".$profile_str."'> ".$cnts['FAIprofile']." ";
diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc
index 89bb6559d1616cf8d7740866426ee04303aa347a..9d935081d1d5603c31d95802eb1a4eaa881b3681 100644 (file)
} else {
/* Obviously the user isn't allowed to delete. Show message and clean session. */
- msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), ERROR_DIALOG);
+ msg_dialog::display(_("Permission error"), msgPool::permDelete(),ERROR_DIALOG);
}
}
/* Normally this shouldn't be reached, send some extra
logs to notify the administrator */
- msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), ERROR_DIALOG);
+ msg_dialog::display(_("Permission error"), msgPool::permDelete(), ERROR_DIALOG);
new log("security","fai/".get_class($this),$dn,array(),"Tried to trick deletion.");
}
/* Normally this shouldn't be reached, send some extra
logs to notify the administrator */
- msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), ERROR_DIALOG);
+ msg_dialog::display(_("Permission error"), msgPool::permDelete(), ERROR_DIALOG);
new log("security","fai/".get_class($this),$dn,array(),"Tried to trick deletion.");
}
/* Check used characters */
if(preg_match("/[^0-9a-z \ö\ä\ü\.-_:,]/i",$name)){
- if($type == "branch"){
- msg_dialog::display(_("Error"), _("Branch name is not valid!"), ERROR_DIALOG);
- }else{
- msg_dialog::display(_("Error"), _("Freeze name is not valid!"), ERROR_DIALOG);
- }
+ msg_dialog::display(_("Error"), msgPool::invalid(_("Name"),$name,"/[0-9a-z \ö\ä\ü\.-_:,]/i"), ERROR_DIALOG);
$is_ok = false;
}
/* Check if this name is already in use */
if(!$this->CheckNewBranchName($_POST['BranchName'],$this->DivListFai->selectedBranch)){
- msg_dialog::display(_("Error"), _("Name is already in use!"), ERROR_DIALOG);
+ msg_dialog::display(_("Error"), msgPool::duplicated(_("Name")), ERROR_DIALOG);
$is_ok = false;
}
if(isset($_GET['PerformBranch'])){
if(!$this->acl_is_createable()){
- msg_dialog::display(_("Permission error"), _("You have no permission to create a new branch!"), ERROR_DIALOG);
+ msg_dialog::display(_("Permission error"), msgPool::permCreate(_("Branch")), ERROR_DIALOG);
}else{
/* Create it know */
if("" != $this->config->search("faiManagement", "POSTCREATE",array('menu','tabs'))){
if(($s_action == "branch_branch")||($this->dispNewBranch)){
if(!$this->acl_is_createable()){
- msg_dialog::display(_("Permission error"), _("You have no permission to create a new branch!"), ERROR_DIALOG);
+ msg_dialog::display(_("Permission error"), msgPool::permCreate(_("Branch")), ERROR_DIALOG);
}else{
$this->dispNewBranch=true;
$smarty->assign("iframe",false);
if("" != $this->config->search("faiManagement", "POSTCREATE",array('menu','tabs'))){
if(($s_action == "freeze_branch")||($this->dispNewFreeze)){
if(!$this->acl_is_createable()){
- msg_dialog::display(_("Permission error"), _("You have no permission to create a new branch!"), ERROR_DIALOG);
+ msg_dialog::display(_("Permission error"), msgPool::permCreate(_("Branch")), ERROR_DIALOG);
}else{
$this->dispNewFreeze = true;
$smarty->assign("iframe",false);
diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc
index 44cb460fb334ede0b1f6909dc13c9281c567bb09..dba5a7a20e228f951823408d48ca3481f19a2046 100644 (file)
$message= plugin::check();
if(count($this->usedPackages)==0){
- $message[]=_("Please select a least one package!");
+ $message[]= _("Please select a least one package!");
}
if((empty($this->FAIdebianRelease))||(empty($this->FAIdebianSection))){
diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTableEntry.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTableEntry.inc
index a49dad40e076d6efe9783d5d3ad716953d313943..8e29422fbb5ef3d965199278703e5bdc71ab07e2 100644 (file)
/* Check for an empty disk name */
if(empty($this->DISKcn)){
- $message[] = _("Please specify a valid disc name.");
+ $message[] = msgPool::required(_("Name"));
}
/* check every partition.
if($part['FAIfsType']!="swap" && $part['FAImountPoint'] != "-"){
if((empty($part['FAImountPoint']))||(!((preg_match("/^\/.*/",$part['FAImountPoint']))||(preg_match("/^swap$/",$part['FAImountPoint']))))){
- $message[]=sprintf(_("Please enter a valid mount point for partition %s." ),($key));
+ $message[]= msgPool::invalid(sprintf(_("partition %s mount point"),$key));
}
}
if($part['FAIfsType'] == "swap"){
$tmp = split("-",$part['FAIpartitionSize']);
switch (count($tmp)){
case 0:
- $message[]= sprintf(_("Please enter a valid partition size for partition %s."),($key));
+ $message[]= msgPool::invalid(sprintf(_("partition %s size"),$key));
break;
case 1:
- if (!tests::is_id(is_id($tmp[0])) &&(!empty($tmp[1]))){
- $message[]= sprintf(_("Please enter a valid partition size for partition %s."),($key));
+ if (!tests::is_id($tmp[0]) &&(!empty($tmp[1]))){
+ $message[]= msgPool::invalid(sprintf(_("partition %s size"),$key));
}
break;
case 2:
if((!tests::is_id($tmp[0]))&&(!tests::is_id($tmp[1])) &&(!empty($tmp[1]))){
- $message[]=sprintf(_("Please enter a valid range for partition %s."),($key));
+ $message[]= msgPool::invalid(sprintf(_("partition %s size"),$key));
}elseif($tmp[0]>=$tmp[1]){
- $message[]=sprintf(_("Please enter a valid range for partition %s."),($key));
+ $message[]= msgPool::invalid(sprintf(_("partition %s size"),$key));
}
break;
default:
- $message[]=sprintf(_("Please enter a range for partition size for partition %s."),($key));
+ $message[]= msgPool::invalid(sprintf(_("partition %s size"),$key));
}
foreach($this->UsedAttrs as $attrs){
diff --git a/gosa-plugins/fai/admin/fai/class_faiProfile.inc b/gosa-plugins/fai/admin/fai/class_faiProfile.inc
index 7f337fd803976e13933bda2dfcbfc798513c987e..4eec15fa08e45db57e0560f2c280062199e93306 100644 (file)
$objTypes['FAItemplate'] = "<img src='images/fai_template.png' title='"._("Template bundle")."' alt=''>";
$objTypes['FAIscript'] = "<img src='images/fai_script.png' title='"._("Script bundle")."' alt=''>";
$objTypes['FAIvariable'] = "<img src='images/fai_variable.png' title='"._("Variable bundle")."' alt=''>";
- $objTypes['FAIpackageList'] = "<img src='images/fai_packages.png' title='"._("Packages bundle")."' alt=''>";
+ $objTypes['FAIpackageList'] = "<img src='images/fai_packages.png' title='"._("Package bundle")."' alt=''>";
$objTypes['FAIpartitionTable'] = "<img src='images/fai_partitionTable.png' title='"._("Partition table")."' alt=''>";
/* Delete button */
}
if(empty($this->cn)){
- $message[]=_("'Name' is not valid!");
+ $message[]= msgPool::invalid(_("Name"));
}
$ldap = $this->config->get_ldap_link();
}
if($ldap->count() || isset($this->FAIAllclasses[$this->cn])){
- $message[]=_("Name is already in use!");
+ $message[]= msgPool::duplicated(_("Name"));
}
return ($message);
diff --git a/gosa-plugins/fai/admin/fai/class_faiVariableEntry.inc b/gosa-plugins/fai/admin/fai/class_faiVariableEntry.inc
index 21d7bc0f03b9475dfa7993dc73b5bf2746a9222d..92ba68d200ccd181d2f7490c5e50946f97febf28 100644 (file)
$message= plugin::check();
if(isset($this->parent->SubObjects[$this->cn]) && $this->cn != $this->orig_cn){
- $message[] =_("There is already a variable with the given name.");
+ $message[] = msgPool::duplicate(_("Name"));
}
if(empty($this->FAIvariableContent)) {
- $message[]=_("Please specify a value for the attribute 'content'.");
+ $message[]= msgPool::required(_("Content"));
}
if(empty($this->cn)){
- $message[] = _("Please enter a name.");
+ $message[] = msgPool::required(_("Name"));
}
return ($message);