From df9331036ed98b4167b71266c0df615d464f1bb6 Mon Sep 17 00:00:00 2001 From: cajus Date: Sat, 8 Mar 2008 11:20:51 +0000 Subject: [PATCH] Updated msgPools git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9459 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../personal/samba/class_sambaAccount.inc | 32 +++++++------------ .../personal/samba/class_sambaLogonHours.inc | 9 +----- gosa-plugins/samba/personal/samba/main.inc | 8 ++--- 3 files changed, 17 insertions(+), 32 deletions(-) diff --git a/gosa-plugins/samba/personal/samba/class_sambaAccount.inc b/gosa-plugins/samba/personal/samba/class_sambaAccount.inc index b0f396274..0f37c46ae 100644 --- a/gosa-plugins/samba/personal/samba/class_sambaAccount.inc +++ b/gosa-plugins/samba/personal/samba/class_sambaAccount.inc @@ -214,7 +214,7 @@ class sambaAccount extends plugin /* Do we represent a valid account? */ if (!$this->is_account && $this->parent === NULL){ $display= "\"\"src=\"images/stop.png\" ". - _("This account has no samba extensions.").""; + msgPool::noValidExtension(_("Samba")).""; $display.= back_to_main(); return ($display); } @@ -226,8 +226,8 @@ class sambaAccount extends plugin $display= ""; if ($this->parent !== NULL){ if ($this->is_account){ - $display= $this->show_disable_header(_("Remove samba account"), - _("This account has samba features enabled. You can disable them by clicking below.")); + $display= $this->show_disable_header(msgPool::removeFeaturesButton(_("Samba")), + msgPool::featuresEnabled(_("Samba"))); } else { $obj= $this->parent->by_object['posixAccount']; @@ -236,11 +236,11 @@ class sambaAccount extends plugin uidNumbers. There'll be a better solution later on. */ if ($obj->is_account){ - $display= $this->show_enable_header(_("Create samba account"), - _("This account has samba features disabled. You can enable them by clicking below.")); + $display= $this->show_enable_header(msgPool::addFeaturesButton(_("Samba")), + msgPool::featuresDisabled(_("Samba"))); } else { - $display= $this->show_enable_header(_("Create samba account"), - _("This account has samba features disabled. Posix features are needed for samba accounts, enable them first."), TRUE); + $display= $this->show_enable_header(msgPool::addFeaturesButton(_("Samba")), + msgPool::featuresDisabled(_("Samba"), _("POSIX")), TRUE); } return ($display); } @@ -432,9 +432,7 @@ class sambaAccount extends plugin for($y= $date['year']-4; $y<$date['year']+4; $y++){ $years[]= $y; } - $months= array(_("January"), _("February"), _("March"), _("April"), - _("May"), _("June"), _("July"), _("August"), _("September"), - _("October"), _("November"), _("December")); + $months= msgPool::months(); $smarty->assign("day", $date["mday"]); $smarty->assign("days", $days); $smarty->assign("months", $months); @@ -450,9 +448,7 @@ class sambaAccount extends plugin for($y= $date['year']-4; $y<$date['year']+4; $y++){ $sambaLogonTime_years[]= $y; } - $sambaLogonTime_months= array(_("January"), _("February"), _("March"), _("April"), - _("May"), _("June"), _("July"), _("August"), _("September"), - _("October"), _("November"), _("December")); + $sambaLogonTime_months= msgPool::months; $smarty->assign("sambaLogonTime_day", $sambaLogonTime_date["mday"]); $smarty->assign("sambaLogonTime_days", $sambaLogonTime_days); $smarty->assign("sambaLogonTime_months", $sambaLogonTime_months); @@ -468,9 +464,7 @@ class sambaAccount extends plugin for($y= $date['year']-4; $y<$date['year']+4; $y++){ $sambaLogoffTime_years[]= $y; } - $sambaLogoffTime_months= array(_("January"), _("February"), _("March"), _("April"), - _("May"), _("June"), _("July"), _("August"), _("September"), - _("October"), _("November"), _("December")); + $sambaLogoffTime_months= msgPool::months(); $smarty->assign("sambaLogoffTime_day", $sambaLogoffTime_date["mday"]); $smarty->assign("sambaLogoffTime_days", $sambaLogoffTime_days); $smarty->assign("sambaLogoffTime_months", $sambaLogoffTime_months); @@ -486,9 +480,7 @@ class sambaAccount extends plugin for($y= $date['year']-4; $y<$date['year']+4; $y++){ $sambaKickoffTime_years[]= $y; } - $sambaKickoffTime_months= array(_("January"), _("February"), _("March"), _("April"), - _("May"), _("June"), _("July"), _("August"), _("September"), - _("October"), _("November"), _("December")); + $sambaKickoffTime_months= msgPool::months(); //$smarty->assign("sambaKickoffTime_day", $sambaKickoffTime_date["mday"]-1); $smarty->assign("sambaKickoffTime_day", $sambaKickoffTime_date["mday"]); // hickert $smarty->assign("sambaKickoffTime_days", $sambaKickoffTime_days); @@ -765,7 +757,7 @@ class sambaAccount extends plugin /* Too many workstations? Windows usrmgr only supports eight */ if (substr_count($this->sambaUserWorkstations, ",") >= 8){ - $message[]= _("The windows user manager only allows eight clients. You've specified more than eight."); + $message[]= _("The windows usermanager allows eight clients at maximum!"); } } diff --git a/gosa-plugins/samba/personal/samba/class_sambaLogonHours.inc b/gosa-plugins/samba/personal/samba/class_sambaLogonHours.inc index fa0308047..e3cc51d34 100644 --- a/gosa-plugins/samba/personal/samba/class_sambaLogonHours.inc +++ b/gosa-plugins/samba/personal/samba/class_sambaLogonHours.inc @@ -58,14 +58,7 @@ class sambaLogonHours extends plugin function execute() { - $week_days = array(); - $week_days[0]= _("Sunday"); - $week_days[1]= _("Monday"); - $week_days[2]= _("Tuesday"); - $week_days[3]= _("Wednesday"); - $week_days[4]= _("Thursday"); - $week_days[5]= _("Friday"); - $week_days[6]= _("Saturday"); + $week_days = msgPool::weekdays(); $hours = array(); for($i = 0 ; $i <24 ; $i++ ){ diff --git a/gosa-plugins/samba/personal/samba/main.inc b/gosa-plugins/samba/personal/samba/main.inc index 172d6ae70..9a102442e 100644 --- a/gosa-plugins/samba/personal/samba/main.inc +++ b/gosa-plugins/samba/personal/samba/main.inc @@ -101,9 +101,9 @@ if (!$remove_lock){ /* Are we in edit mode? */ if (session::is_set('edit')){ - $display.= "\n"; + $display.= "\n"; $display.= " "; - $display.= "\n"; + $display.= "\n"; $info= "\"\" ".$ui->dn." "; } else { @@ -113,8 +113,8 @@ if (!$remove_lock){ if(preg_match("/w/",$ui->get_permissions($ui->dn,"users/sambaAccount"))){ $info.= "\"\" ". - _("Click the 'Edit' button below to change informations in this dialog"); - $display.= "\n"; + msgPool::clickEditToChange(); + $display.= "\n"; } $display.= "\n"; } -- 2.30.2