Improved holidays module translations
This commit is contained in:
parent
deaa63960e
commit
6d896a8558
@ -859,7 +859,7 @@ class Holiday extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function updateSoldeCP($userID='',$nbHoliday='')
|
function updateSoldeCP($userID='',$nbHoliday='')
|
||||||
{
|
{
|
||||||
global $user;
|
global $user, $langs;
|
||||||
|
|
||||||
if (empty($userID) && empty($nbHoliday))
|
if (empty($userID) && empty($nbHoliday))
|
||||||
{
|
{
|
||||||
@ -897,7 +897,7 @@ class Holiday extends CommonObject
|
|||||||
$new_solde = $now_holiday + $this->getConfCP('nbHolidayEveryMonth');
|
$new_solde = $now_holiday + $this->getConfCP('nbHolidayEveryMonth');
|
||||||
|
|
||||||
// On ajoute la modification dans le LOG
|
// 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++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -67,7 +67,7 @@ if ($action == 'update' && isset($_POST['update_cp']))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// On ajoute la modification dans le LOG
|
// 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
|
// Mise à jour des congés de l'utilisateur
|
||||||
$holiday->updateSoldeCP($userID,$userValue);
|
$holiday->updateSoldeCP($userID,$userValue);
|
||||||
@ -100,7 +100,7 @@ elseif($action == 'add_event')
|
|||||||
$new_holiday = $nb_holiday + $add_holiday;
|
$new_holiday = $nb_holiday + $add_holiday;
|
||||||
|
|
||||||
// On ajoute la modification dans le LOG
|
// 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);
|
$holiday->updateSoldeCP($userCP,$new_holiday);
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ foreach($listUsers as $users)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
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 '<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 '<td><input type="submit" name="update_cp['.$users['rowid'].']" value="'.dol_escape_htmltag($langs->trans("Update")).'" class="button"/></td>'."\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,7 @@ $now=dol_now();
|
|||||||
// Si création de la demande
|
// Si création de la demande
|
||||||
if ($action == 'create')
|
if ($action == 'create')
|
||||||
{
|
{
|
||||||
$cp = new Holiday($db);
|
$cp = new Holiday($db);
|
||||||
|
|
||||||
// Si pas le droit de créer une demande
|
// Si pas le droit de créer une demande
|
||||||
if(!$user->rights->holiday->write)
|
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_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'));
|
$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');
|
$endhalfday=GETPOST('endhalfday');
|
||||||
$halfday=0;
|
$halfday=0;
|
||||||
if ($starthalfday == 'afternoon' && $endhalfday == 'morning') $halfday=2;
|
if ($starthalfday == 'afternoon' && $endhalfday == 'morning') $halfday=2;
|
||||||
else if ($starthalfday == 'afternoon') $halfday=-1;
|
else if ($starthalfday == 'afternoon') $halfday=-1;
|
||||||
else if ($endhalfday == 'morning') $halfday=1;
|
else if ($endhalfday == 'morning') $halfday=1;
|
||||||
|
|
||||||
$valideur = GETPOST('valideur');
|
$valideur = GETPOST('valideur');
|
||||||
$description = trim(GETPOST('description'));
|
$description = trim(GETPOST('description'));
|
||||||
@ -144,14 +144,14 @@ if ($action == 'create')
|
|||||||
|
|
||||||
if ($action == 'update')
|
if ($action == 'update')
|
||||||
{
|
{
|
||||||
$date_debut = dol_mktime(0, 0, 0, GETPOST('date_debut_month'), GETPOST('date_debut_day'), GETPOST('date_debut_year'));
|
$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'));
|
$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');
|
$endhalfday=GETPOST('endhalfday');
|
||||||
$halfday=0;
|
$halfday=0;
|
||||||
if ($starthalfday == 'afternoon' && $endhalfday == 'morning') $halfday=2;
|
if ($starthalfday == 'afternoon' && $endhalfday == 'morning') $halfday=2;
|
||||||
else if ($starthalfday == 'afternoon') $halfday=-1;
|
else if ($starthalfday == 'afternoon') $halfday=-1;
|
||||||
else if ($endhalfday == 'morning') $halfday=1;
|
else if ($endhalfday == 'morning') $halfday=1;
|
||||||
|
|
||||||
// Si pas le droit de modifier une demande
|
// Si pas le droit de modifier une demande
|
||||||
if(!$user->rights->holiday->write)
|
if(!$user->rights->holiday->write)
|
||||||
@ -375,7 +375,7 @@ if($action == 'confirm_valid')
|
|||||||
$newSolde = $soldeActuel - ($nbJour*$cp->getConfCP('nbHolidayDeducted'));
|
$newSolde = $soldeActuel - ($nbJour*$cp->getConfCP('nbHolidayDeducted'));
|
||||||
|
|
||||||
// On ajoute la modification dans le LOG
|
// 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
|
// Mise à jour du solde
|
||||||
$cp->updateSoldeCP($cp->fk_user,$newSolde);
|
$cp->updateSoldeCP($cp->fk_user,$newSolde);
|
||||||
@ -575,9 +575,9 @@ if ($action == 'confirm_cancel' && $_GET['confirm'] == 'yes')
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$form = new Form($db);
|
$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'));
|
llxHeader(array(),$langs->trans('CPTitreMenu'));
|
||||||
@ -859,12 +859,12 @@ else
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td width="25%">'.$langs->trans("Ref").'</td>';
|
print '<td width="25%">'.$langs->trans("Ref").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $form->showrefnav($cp, 'id', $linkback, 1, 'rowid', 'ref');
|
print $form->showrefnav($cp, 'id', $linkback, 1, 'rowid', 'ref');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$starthalfday=($cp->halfday == -1 || $cp->halfday == 2)?'afternoon':'morning';
|
$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) {
|
if(!$edit) {
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
@ -890,7 +890,7 @@ else
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans('DateFinCP').' ('.$langs->trans("LastDayOfHoliday").')</td>';
|
print '<td>'.$langs->trans('DateFinCP').' ('.$langs->trans("LastDayOfHoliday").')</td>';
|
||||||
print '<td>'.dol_print_date($cp->date_fin,'day');
|
print '<td>'.dol_print_date($cp->date_fin,'day');
|
||||||
print ' ';
|
print ' ';
|
||||||
print $langs->trans($listhalfday[$endhalfday]);
|
print $langs->trans($listhalfday[$endhalfday]);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -1026,10 +1026,10 @@ else
|
|||||||
{
|
{
|
||||||
print '<a href="fiche.php?id='.$_GET['id'].'&action=sendToValidate" class="butAction">'.$langs->trans("Validate").'</a>';
|
print '<a href="fiche.php?id='.$_GET['id'].'&action=sendToValidate" class="butAction">'.$langs->trans("Validate").'</a>';
|
||||||
}
|
}
|
||||||
if($user->rights->holiday->delete && $cp->statut == 1)
|
if($user->rights->holiday->delete && $cp->statut == 1)
|
||||||
{
|
{
|
||||||
print '<a href="fiche.php?id='.$_GET['id'].'&action=delete" class="butActionDelete">'.$langs->trans("DeleteCP").'</a>';
|
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é
|
// Si le statut est en attente de validation et que le valideur est connecté
|
||||||
if ($userID == $cp->fk_validator && $cp->statut == 2)
|
if ($userID == $cp->fk_validator && $cp->statut == 2)
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
# Dolibarr language file - en_US - holiday
|
# Dolibarr language file - en_US - holiday
|
||||||
CHARSET= UTF-8
|
CHARSET= UTF-8
|
||||||
|
|
||||||
|
Holidays=Holidays
|
||||||
CPTitreMenu=Holidays
|
CPTitreMenu=Holidays
|
||||||
MenuReportMonth=Monthly statement
|
MenuReportMonth=Monthly statement
|
||||||
MenuAddCP=Apply for holidays
|
MenuAddCP=Apply for holidays
|
||||||
@ -86,6 +87,8 @@ UserName=Name
|
|||||||
Employee=Employee
|
Employee=Employee
|
||||||
FirstDayOfHoliday=First day of holiday
|
FirstDayOfHoliday=First day of holiday
|
||||||
LastDayOfHoliday=Last day of holiday
|
LastDayOfHoliday=Last day of holiday
|
||||||
|
HolidaysMonthlyUpdate=Monthly update
|
||||||
|
ManualUpdate=Manual update
|
||||||
|
|
||||||
## Configuration du Module ##
|
## Configuration du Module ##
|
||||||
ConfCP=Configuration of holidays module
|
ConfCP=Configuration of holidays module
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
# Dolibarr language file - es_ES - holiday
|
# Dolibarr language file - es_ES - holiday
|
||||||
CHARSET= UTF-8
|
CHARSET= UTF-8
|
||||||
|
|
||||||
|
Holidays=Vacaciones
|
||||||
CPTitreMenu=Vacaciones
|
CPTitreMenu=Vacaciones
|
||||||
MenuReportMonth=Estado mensual
|
MenuReportMonth=Estado mensual
|
||||||
MenuAddCP=Nueva petición
|
MenuAddCP=Nueva petición
|
||||||
@ -88,6 +89,8 @@ FirstDayOfHoliday=Primer día libre
|
|||||||
LastDayOfHoliday=Último día libre
|
LastDayOfHoliday=Último día libre
|
||||||
Morning=Mañana
|
Morning=Mañana
|
||||||
Afternoon=Tarde
|
Afternoon=Tarde
|
||||||
|
HolidaysMonthlyUpdate=Actualización mensual
|
||||||
|
ManualUpdate=Actualización manual
|
||||||
|
|
||||||
## Configuration du Module ##
|
## Configuration du Module ##
|
||||||
ConfCP=Configuración del módulo Vacaciones
|
ConfCP=Configuración del módulo Vacaciones
|
||||||
@ -99,7 +102,7 @@ LastUpdateCP=Última actualización automática de vacaciones
|
|||||||
UpdateConfCPOK=Actualización efectuada correctamente.
|
UpdateConfCPOK=Actualización efectuada correctamente.
|
||||||
ErrorUpdateConfCP=Se ha producido un error durante la actualización, vuélvalo a intentar.
|
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>.
|
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
|
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
|
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
|
nbUserCP=Número de usuarios tomados en cuenta en el módulo vacaciones
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
# Dolibarr language file - fr_FR - holiday
|
# Dolibarr language file - fr_FR - holiday
|
||||||
CHARSET= UTF-8
|
CHARSET= UTF-8
|
||||||
|
|
||||||
|
Holidays=Congés
|
||||||
CPTitreMenu=Congés
|
CPTitreMenu=Congés
|
||||||
MenuReportMonth=Etat mensuel
|
MenuReportMonth=Etat mensuel
|
||||||
MenuAddCP=Nouvelle demande
|
MenuAddCP=Nouvelle demande
|
||||||
@ -86,6 +87,8 @@ UserName=Nom Prénom
|
|||||||
Employee=Salarié
|
Employee=Salarié
|
||||||
FirstDayOfHoliday=Premier jour de congès
|
FirstDayOfHoliday=Premier jour de congès
|
||||||
LastDayOfHoliday=Dernier jour de congès
|
LastDayOfHoliday=Dernier jour de congès
|
||||||
|
HolidaysMonthlyUpdate=Mise à jour mensuelle
|
||||||
|
ManualUpdate=Mise à jour manuelle
|
||||||
|
|
||||||
## Configuration du Module ##
|
## Configuration du Module ##
|
||||||
ConfCP=Configuration du module Congés
|
ConfCP=Configuration du module Congés
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user