Improved holidays module translations

This commit is contained in:
Marcos García 2013-04-15 00:53:06 +02:00
parent deaa63960e
commit 6d896a8558
6 changed files with 36 additions and 27 deletions

View File

@ -859,7 +859,7 @@ class Holiday extends CommonObject
*/
function updateSoldeCP($userID='',$nbHoliday='')
{
global $user;
global $user, $langs;
if (empty($userID) && empty($nbHoliday))
{
@ -897,7 +897,7 @@ class Holiday extends CommonObject
$new_solde = $now_holiday + $this->getConfCP('nbHolidayEveryMonth');
// On ajoute la modification dans le LOG
$this->addLogCP($user->id,$users[$i]['rowid'],'Event : Mise à jour mensuelle',$new_solde);
$this->addLogCP($user->id,$users[$i]['rowid'], $langs->trans('Event').': '.$langs->trans('HolidaysMonthlyAssignment'),$new_solde);
$i++;
}

View File

@ -67,7 +67,7 @@ if ($action == 'update' && isset($_POST['update_cp']))
}
// On ajoute la modification dans le LOG
$holiday->addLogCP($user->id,$userID,'Event : Manual update',$userValue);
$holiday->addLogCP($user->id,$userID, $langs->trans('Event').': '.$langs->trans('ManualUpdate'),$userValue);
// Mise à jour des congés de l'utilisateur
$holiday->updateSoldeCP($userID,$userValue);
@ -100,7 +100,7 @@ elseif($action == 'add_event')
$new_holiday = $nb_holiday + $add_holiday;
// On ajoute la modification dans le LOG
$holiday->addLogCP($user->id,$userCP,'Event : '.$holiday->getNameEventCp($event),$new_holiday);
$holiday->addLogCP($user->id,$userCP, $langs->trans('Event').': '.$holiday->getNameEventCp($event),$new_holiday);
$holiday->updateSoldeCP($userCP,$new_holiday);
@ -158,7 +158,7 @@ foreach($listUsers as $users)
print '</td>';
print '<td>';
print '<input type="text" value="'.$holiday->getCPforUser($users['rowid']).'" name="nb_holiday['.$users['rowid'].']" size="5" style="text-align: center;"/>';
print ' jours</td>'."\n";
print ' '.$langs->trans('days').'</td>'."\n";
print '<td><input type="submit" name="update_cp['.$users['rowid'].']" value="'.dol_escape_htmltag($langs->trans("Update")).'" class="button"/></td>'."\n";
print '</tr>';

View File

@ -52,7 +52,7 @@ $now=dol_now();
// Si création de la demande
if ($action == 'create')
{
$cp = new Holiday($db);
$cp = new Holiday($db);
// Si pas le droit de créer une demande
if(!$user->rights->holiday->write)
@ -63,12 +63,12 @@ if ($action == 'create')
$date_debut = dol_mktime(0, 0, 0, GETPOST('date_debut_month'), GETPOST('date_debut_day'), GETPOST('date_debut_year'));
$date_fin = dol_mktime(0, 0, 0, GETPOST('date_fin_month'), GETPOST('date_fin_day'), GETPOST('date_fin_year'));
$starthalfday=GETPOST('starthalfday');
$starthalfday=GETPOST('starthalfday');
$endhalfday=GETPOST('endhalfday');
$halfday=0;
if ($starthalfday == 'afternoon' && $endhalfday == 'morning') $halfday=2;
else if ($starthalfday == 'afternoon') $halfday=-1;
else if ($endhalfday == 'morning') $halfday=1;
else if ($endhalfday == 'morning') $halfday=1;
$valideur = GETPOST('valideur');
$description = trim(GETPOST('description'));
@ -144,14 +144,14 @@ if ($action == 'create')
if ($action == 'update')
{
$date_debut = dol_mktime(0, 0, 0, GETPOST('date_debut_month'), GETPOST('date_debut_day'), GETPOST('date_debut_year'));
$date_fin = dol_mktime(0, 0, 0, GETPOST('date_fin_month'), GETPOST('date_fin_day'), GETPOST('date_fin_year'));
$starthalfday=GETPOST('starthalfday');
$endhalfday=GETPOST('endhalfday');
$halfday=0;
if ($starthalfday == 'afternoon' && $endhalfday == 'morning') $halfday=2;
else if ($starthalfday == 'afternoon') $halfday=-1;
else if ($endhalfday == 'morning') $halfday=1;
$date_debut = dol_mktime(0, 0, 0, GETPOST('date_debut_month'), GETPOST('date_debut_day'), GETPOST('date_debut_year'));
$date_fin = dol_mktime(0, 0, 0, GETPOST('date_fin_month'), GETPOST('date_fin_day'), GETPOST('date_fin_year'));
$starthalfday=GETPOST('starthalfday');
$endhalfday=GETPOST('endhalfday');
$halfday=0;
if ($starthalfday == 'afternoon' && $endhalfday == 'morning') $halfday=2;
else if ($starthalfday == 'afternoon') $halfday=-1;
else if ($endhalfday == 'morning') $halfday=1;
// Si pas le droit de modifier une demande
if(!$user->rights->holiday->write)
@ -375,7 +375,7 @@ if($action == 'confirm_valid')
$newSolde = $soldeActuel - ($nbJour*$cp->getConfCP('nbHolidayDeducted'));
// On ajoute la modification dans le LOG
$cp->addLogCP($userID,$cp->fk_user,'Event : '.$langs->transnoentitiesnoconv("Holiday"),$newSolde);
$cp->addLogCP($userID,$cp->fk_user, $langs->trans('Event').': '.$langs->transnoentitiesnoconv("Holidays"),$newSolde);
// Mise à jour du solde
$cp->updateSoldeCP($cp->fk_user,$newSolde);
@ -575,9 +575,9 @@ if ($action == 'confirm_cancel' && $_GET['confirm'] == 'yes')
*/
$form = new Form($db);
$cp = new Holiday($db);
$cp = new Holiday($db);
$listhalfday=array('morning'=>$langs->trans("Morning"),"afternoon"=>$langs->trans("Afternoon"));
$listhalfday=array('morning'=>$langs->trans("Morning"),"afternoon"=>$langs->trans("Afternoon"));
llxHeader(array(),$langs->trans('CPTitreMenu'));
@ -859,12 +859,12 @@ else
print '<tr>';
print '<td width="25%">'.$langs->trans("Ref").'</td>';
print '<td>';
print $form->showrefnav($cp, 'id', $linkback, 1, 'rowid', 'ref');
print $form->showrefnav($cp, 'id', $linkback, 1, 'rowid', 'ref');
print '</td>';
print '</tr>';
$starthalfday=($cp->halfday == -1 || $cp->halfday == 2)?'afternoon':'morning';
$endhalfday=($cp->halfday == 1 || $cp->halfday == 2)?'morning':'afternoon';
$endhalfday=($cp->halfday == 1 || $cp->halfday == 2)?'morning':'afternoon';
if(!$edit) {
print '<tr>';
@ -890,7 +890,7 @@ else
print '<tr>';
print '<td>'.$langs->trans('DateFinCP').' ('.$langs->trans("LastDayOfHoliday").')</td>';
print '<td>'.dol_print_date($cp->date_fin,'day');
print ' &nbsp; &nbsp; ';
print ' &nbsp; &nbsp; ';
print $langs->trans($listhalfday[$endhalfday]);
print '</td>';
print '</tr>';
@ -1026,10 +1026,10 @@ else
{
print '<a href="fiche.php?id='.$_GET['id'].'&action=sendToValidate" class="butAction">'.$langs->trans("Validate").'</a>';
}
if($user->rights->holiday->delete && $cp->statut == 1)
{
print '<a href="fiche.php?id='.$_GET['id'].'&action=delete" class="butActionDelete">'.$langs->trans("DeleteCP").'</a>';
}
if($user->rights->holiday->delete && $cp->statut == 1)
{
print '<a href="fiche.php?id='.$_GET['id'].'&action=delete" class="butActionDelete">'.$langs->trans("DeleteCP").'</a>';
}
// Si le statut est en attente de validation et que le valideur est connecté
if ($userID == $cp->fk_validator && $cp->statut == 2)

View File

@ -1,6 +1,7 @@
# Dolibarr language file - en_US - holiday
CHARSET= UTF-8
Holidays=Holidays
CPTitreMenu=Holidays
MenuReportMonth=Monthly statement
MenuAddCP=Apply for holidays
@ -86,6 +87,8 @@ UserName=Name
Employee=Employee
FirstDayOfHoliday=First day of holiday
LastDayOfHoliday=Last day of holiday
HolidaysMonthlyUpdate=Monthly update
ManualUpdate=Manual update
## Configuration du Module ##
ConfCP=Configuration of holidays module

View File

@ -1,6 +1,7 @@
# Dolibarr language file - es_ES - holiday
CHARSET= UTF-8
Holidays=Vacaciones
CPTitreMenu=Vacaciones
MenuReportMonth=Estado mensual
MenuAddCP=Nueva petición
@ -88,6 +89,8 @@ FirstDayOfHoliday=Primer día libre
LastDayOfHoliday=Último día libre
Morning=Mañana
Afternoon=Tarde
HolidaysMonthlyUpdate=Actualización mensual
ManualUpdate=Actualización manual
## Configuration du Module ##
ConfCP=Configuración del módulo Vacaciones
@ -99,7 +102,7 @@ LastUpdateCP=Última actualización automática de vacaciones
UpdateConfCPOK=Actualización efectuada correctamente.
ErrorUpdateConfCP=Se ha producido un error durante la actualización, vuélvalo a intentar.
AddCPforUsers=Añada los saldos de vacaciones de los usuarios <a href="../define_holiday.php" style="font-weight: normal; color: red; text-decoration: underline;">haciendo clic aquí</a>.
DelayForSubmitCP=La fecha límite para solicitar vacaciones
DelayForSubmitCP=Antelación mínima para solicitar vacaciones
AlertValidatorDelayCP=Advertir al usuario validador si la petición no respeta el límite previsto
AlertValidorSoldeCP=Advertir al usuario validador si el usuario pide vacaciones superiores a su saldo
nbUserCP=Número de usuarios tomados en cuenta en el módulo vacaciones

View File

@ -1,6 +1,7 @@
# Dolibarr language file - fr_FR - holiday
CHARSET= UTF-8
Holidays=Congés
CPTitreMenu=Congés
MenuReportMonth=Etat mensuel
MenuAddCP=Nouvelle demande
@ -86,6 +87,8 @@ UserName=Nom Prénom
Employee=Salarié
FirstDayOfHoliday=Premier jour de congès
LastDayOfHoliday=Dernier jour de congès
HolidaysMonthlyUpdate=Mise à jour mensuelle
ManualUpdate=Mise à jour manuelle
## Configuration du Module ##
ConfCP=Configuration du module Congés