FIX: Translate French code comments to English in holiday, hrm and salaries modules
This commit is contained in:
parent
16d5c3cc35
commit
79bc65b526
13 changed files with 40 additions and 39 deletions
|
|
@ -1096,7 +1096,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
|
|||
</script>'."\n";
|
||||
|
||||
|
||||
// Formulaire de demande
|
||||
// Leave request form
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" name="demandeCP">'."\n";
|
||||
print '<input type="hidden" name="token" value="'.newToken().'" />'."\n";
|
||||
print '<input type="hidden" name="action" value="add" />'."\n";
|
||||
|
|
@ -1589,18 +1589,18 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
|
|||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("TitleToValidCP"), $langs->trans("ConfirmToValidCP"), "confirm_send", '', 1, 1);
|
||||
}
|
||||
|
||||
// Si validation de la demande
|
||||
// If validating the request
|
||||
if ($action == 'valid') {
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("TitleValidCP"), $langs->trans("ConfirmValidCP"), "confirm_valid", '', 1, 1);
|
||||
}
|
||||
|
||||
// Si refus de la demande
|
||||
// If refusing the request
|
||||
if ($action == 'refuse') {
|
||||
$array_input = array(array('type' => "text", 'label' => $langs->trans('DetailRefusCP'), 'name' => "detail_refuse", 'size' => "50", 'value' => ""));
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&action=confirm_refuse", $langs->trans("TitleRefuseCP"), $langs->trans('ConfirmRefuseCP'), "confirm_refuse", $array_input, 1, 0);
|
||||
}
|
||||
|
||||
// Si annulation de la demande
|
||||
// If cancelling the request
|
||||
if ($action == 'cancel') {
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("TitleCancelCP"), $langs->trans("ConfirmCancelCP"), "confirm_cancel", '', 1, 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
}
|
||||
foreach ($TusersToProcess as $u) {
|
||||
// Check if there is already holiday for this period pour chaque user
|
||||
// Check if there is already holiday for this period for each user
|
||||
$verifCP = $object->verifDateHolidayCP($u, $date_debut, $date_fin, $halfday);
|
||||
if (!$verifCP) {
|
||||
//setEventMessages($langs->trans("alreadyCPexist"), null, 'errors');
|
||||
|
|
@ -483,7 +483,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
|
|||
</script>'."\n";
|
||||
|
||||
|
||||
// Formulaire de demande
|
||||
// Leave request form
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" name="demandeCP">'."\n";
|
||||
print '<input type="hidden" name="token" value="'.newToken().'" />'."\n";
|
||||
print '<input type="hidden" name="action" value="add" />'."\n";
|
||||
|
|
@ -570,7 +570,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
|
|||
print $form->textwithpicto($langs->trans("DateDebCP"), $langs->trans("FirstDayOfHoliday"));
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
// Si la demande ne vient pas de l'agenda
|
||||
// If the request does not come from the agenda
|
||||
if (!GETPOST('date_debut_')) {
|
||||
print $form->selectDate(-1, 'date_debut_', 0, 0, 0, '', 1, 1);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ class Holiday extends CommonObject
|
|||
}
|
||||
|
||||
/**
|
||||
* Créer un congés payés dans la base de données
|
||||
* Create a paid leave entry in the database
|
||||
*
|
||||
* @param User $user User that create
|
||||
* @param int $notrigger 0=launch triggers after, 1=disable triggers
|
||||
|
|
@ -544,7 +544,7 @@ class Holiday extends CommonObject
|
|||
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."holiday as cp, ".MAIN_DB_PREFIX."user as uu, ".MAIN_DB_PREFIX."user as ua";
|
||||
$sql .= " WHERE cp.entity IN (".getEntity('holiday').")";
|
||||
$sql .= " AND cp.fk_user = uu.rowid AND cp.fk_validator = ua.rowid"; // Hack pour la recherche sur le tableau
|
||||
$sql .= " AND cp.fk_user = uu.rowid AND cp.fk_validator = ua.rowid"; // Hack needed for search on the list
|
||||
$sql .= " AND cp.fk_user IN (".$this->db->sanitize($user_id).")";
|
||||
|
||||
// Selection filter
|
||||
|
|
@ -675,7 +675,7 @@ class Holiday extends CommonObject
|
|||
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."holiday as cp, ".MAIN_DB_PREFIX."user as uu, ".MAIN_DB_PREFIX."user as ua";
|
||||
$sql .= " WHERE cp.entity IN (".getEntity('holiday').")";
|
||||
$sql .= " AND cp.fk_user = uu.rowid AND cp.fk_validator = ua.rowid "; // Hack pour la recherche sur le tableau
|
||||
$sql .= " AND cp.fk_user = uu.rowid AND cp.fk_validator = ua.rowid "; // Hack needed for search on the list
|
||||
|
||||
// Selection filtering
|
||||
if (!empty($filter)) {
|
||||
|
|
@ -1600,7 +1600,7 @@ class Holiday extends CommonObject
|
|||
}
|
||||
|
||||
/**
|
||||
* Met à jour une option du module Holiday Payés
|
||||
* Update an option of the Holiday module
|
||||
*
|
||||
* @param string $name name settings parameter
|
||||
* @param string $value true if update OK else false
|
||||
|
|
@ -2291,7 +2291,7 @@ class Holiday extends CommonObject
|
|||
*
|
||||
* @param string $sqlorder SQL sort order
|
||||
* @param string $sqlwhere SQL where
|
||||
* @return int -1 si erreur, 1 si OK et 2 si pas de résultat
|
||||
* @return int -1 if error, 1 if OK, 2 if no result
|
||||
*/
|
||||
public function fetchLog($sqlorder, $sqlwhere)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ if ($id > 0) {
|
|||
$search_employee = $user_id;
|
||||
}
|
||||
|
||||
// Récupération des congés payés de l'utilisateur ou de tous les users de sa hierarchy
|
||||
// Retrieve paid leave for the current user or for all users in their hierarchy
|
||||
// Load array $object->holiday
|
||||
|
||||
$sql = "SELECT";
|
||||
|
|
@ -328,7 +328,7 @@ if (isset($extrafields->attributes[$object->table_element]['label']) && is_array
|
|||
}
|
||||
$sql .= ", ".MAIN_DB_PREFIX."user as uu, ".MAIN_DB_PREFIX."user as ua";
|
||||
$sql .= " WHERE cp.entity IN (".getEntity('holiday').")";
|
||||
$sql .= " AND cp.fk_user = uu.rowid AND cp.fk_validator = ua.rowid "; // Hack pour la recherche sur le tableau
|
||||
$sql .= " AND cp.fk_user = uu.rowid AND cp.fk_validator = ua.rowid "; // Hack needed for search on the list
|
||||
// Search all
|
||||
if (!empty($search_all)) {
|
||||
$sql .= natural_search(array_keys($fieldstosearchall), $search_all);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2021 Greg Rastklan <greg.rastklan@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Jean-Pascal BOUDET <jean-pascal.boudet@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Grégory BLEMAND <gregory.blemand@atm-consulting.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -1114,11 +1114,11 @@ class Skill extends CommonObject
|
|||
$result = '';
|
||||
switch ($code) {
|
||||
case 0: $result = $langs->trans("TypeKnowHow");
|
||||
break; //"Savoir Faire"
|
||||
break; // "Know-how"
|
||||
case 1: $result = $langs->trans("TypeHowToBe");
|
||||
break; // "Savoir être"
|
||||
break; // "Soft skills"
|
||||
case 9: $result = $langs->trans("TypeKnowledge");
|
||||
break; //"Savoir"
|
||||
break; // "Knowledge"
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
|
@ -1126,9 +1126,9 @@ class Skill extends CommonObject
|
|||
/**
|
||||
* Return clickable link of object (with eventually picto)
|
||||
*
|
||||
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
|
||||
* @param ?array<string,mixed> $arraydata Array of data
|
||||
* @return string HTML Code for Kanban thumb.
|
||||
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
|
||||
* @param ?array<string,mixed> $arraydata Array of data
|
||||
* @return string HTML Code for Kanban thumb.
|
||||
*/
|
||||
public function getKanbanView($option = '', $arraydata = null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -483,7 +483,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
|
||||
}
|
||||
|
||||
$conf->modules_parts['tpl']['hrm'] = '/hrm/core/tpl/'; // Pour utilisation du tpl hrm sur cet écran
|
||||
$conf->modules_parts['tpl']['hrm'] = '/hrm/core/tpl/'; // To use the hrm tpl on this screen
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2021 Jean-Pascal BOUDET <jean-pascal.boudet@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Grégory BLEMAND <gregory.blemand@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -112,7 +113,7 @@ function displayRankInfos($selected_rank, $fk_skill, $inputname = 'TNote', $mode
|
|||
require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/hrm/class/skilldet.class.php';
|
||||
|
||||
// On charge les différentes notes possibles pour la compétence $fk_skill
|
||||
// Load the different possible ratings for skill $fk_skill
|
||||
$skilldet = new Skilldet($db);
|
||||
$Lines = $skilldet->fetchAll('ASC', 'rankorder', 0, 0, '(fk_skill:=:'.((int) $fk_skill).')');
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2021 Greg Rastklan <greg.rastklan@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Jean-Pascal BOUDET <jean-pascal.boudet@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Grégory BLEMAND <gregory.blemand@atm-consulting.fr>
|
||||
* Copyright (C) 2023-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2023-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -274,7 +274,7 @@ if ($action == 'create') {
|
|||
|
||||
|
||||
// SKILLDET ADD
|
||||
//@todo je stop ici ... à continuer (affichage des 5 skilled input pour create action
|
||||
//@todo stopped here ... to be continued (display of the 5 skill input fields for create action
|
||||
//print $object->showInputField($val, $key, $value, '', '['']', '', 0);
|
||||
|
||||
print '</table>' . "\n";
|
||||
|
|
@ -782,7 +782,7 @@ if ($action != "create" && $action != "edit") {
|
|||
print $objectline->getLibStatut(5);
|
||||
} elseif ($key == 'rowid') {
|
||||
print $objectline->showOutputField($val, $key, (string) $objectline->id, '');
|
||||
// ajout pencil
|
||||
// add pencil icon
|
||||
print '<a class="timeline-btn" href="' . DOL_MAIN_URL_ROOT . '/comm/action/skilldet_card.php?action=edit&id=' . $objectline->id . '"><i class="fa fa-pencil" title="' . $langs->trans("Modify") . '" ></i></a>';
|
||||
} else {
|
||||
print $objectline->showOutputField($val, $key, $objectline->$key, '');
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2021 Greg Rastklan <greg.rastklan@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Jean-Pascal BOUDET <jean-pascal.boudet@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Grégory BLEMAND <gregory.blemand@atm-consulting.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
|
|
@ -606,7 +606,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
}
|
||||
|
||||
|
||||
// liste des evaluation liées
|
||||
// list of linked evaluations
|
||||
if ($objecttype == 'user' && $permissiontoadd) {
|
||||
$evaltmp = new Evaluation($db);
|
||||
$job = new Job($db);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2014-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Charlie BENKE <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2023 Maxime Nicolas <maxime@oarces.com>
|
||||
* Copyright (C) 2023 Benjamin GREMBI <benjamin@oarces.com>
|
||||
|
|
@ -296,7 +296,7 @@ if ($action == 'add' && empty($cancel) && $permissiontoadd) {
|
|||
$paiement->chid = $object->id; // deprecated
|
||||
$paiement->datep = $datep;
|
||||
$paiement->datev = $datev;
|
||||
$paiement->amounts = array($object->id => $amount); // Tableau de montant
|
||||
$paiement->amounts = array($object->id => $amount); // Amount array
|
||||
$paiement->fk_typepayment = $type_payment;
|
||||
$paiement->num_payment = GETPOST("num_payment", 'alphanohtml');
|
||||
$paiement->note_private = GETPOST("note", 'restricthtml');
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/*
|
||||
* Copyright (C) 2023 Marc Chenebaux <marc.chenebaux@maj44.com>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -334,7 +334,7 @@ class Salaries extends DolibarrApi
|
|||
*/
|
||||
public function getPayments($pid)
|
||||
{
|
||||
// A payment of salary can be done on different salaires of didderent user, so only users with permission
|
||||
// A payment of salary can be done on different salaries of different users, so only users with permission
|
||||
// to read all area allowed.
|
||||
// TODO To support read or readchild case, the get must be done with a SQL that include the paid user with
|
||||
// a where on current user and childids of current user.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2011-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -255,7 +255,7 @@ class PaymentSalary extends CommonObject
|
|||
$totalamount = (float) price2num($totalamount, 'MT'); // this is to ensure the following test is no biaised by a potential float equal to 0.0000000000001
|
||||
if ($totalamount == 0) {
|
||||
return -1;
|
||||
} // On accepte les montants negatifs pour les rejets de prelevement mais pas null
|
||||
} // Negative amounts are accepted (for direct debit rejections) but not zero
|
||||
|
||||
|
||||
$this->db->begin();
|
||||
|
|
@ -799,7 +799,7 @@ class PaymentSalary extends CommonObject
|
|||
public function LibStatut($status, $mode = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
|
||||
global $langs; // TODO Return the English label and translate at display time
|
||||
|
||||
$langs->load('compta');
|
||||
/*if ($mode == 0)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2016-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2016-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
|
|
@ -116,7 +116,7 @@ if (($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == '
|
|||
$paiement->fk_salary = $id;
|
||||
$paiement->chid = $id; // deprecated
|
||||
$paiement->datep = $datepaye;
|
||||
$paiement->amounts = $amounts; // Tableau de montant
|
||||
$paiement->amounts = $amounts; // Amount array
|
||||
$paiement->fk_typepayment = GETPOSTINT("paiementtype");
|
||||
$paiement->num_payment = GETPOST("num_payment", 'alphanohtml');
|
||||
$paiement->note = GETPOST("note", 'restricthtml');
|
||||
|
|
@ -164,7 +164,7 @@ llxHeader('', '', $help_url);
|
|||
$salary = $object;
|
||||
$sumpaid = 0.0;
|
||||
|
||||
// Formulaire de creation d'un paiement de charge
|
||||
// Payment creation form
|
||||
if ($action == 'create') {
|
||||
$salary->accountid = $salary->fk_account ? $salary->fk_account : $salary->accountid;
|
||||
$salary->fk_typepayment = $salary->mode_reglement_id ? $salary->mode_reglement_id : $salary->paiementtype;
|
||||
|
|
@ -328,7 +328,7 @@ if ($action == 'create') {
|
|||
|
||||
print '<br>';
|
||||
|
||||
// Bouton Save payment
|
||||
// Save payment button
|
||||
print '<div class="center">';
|
||||
print '<div class="paddingbottom"><input type="checkbox" checked name="closepaidsalary" id="closepaidsalary" class="marginrightonly"><label for="closepaidsalary" class="opacitymedium">'.$langs->trans("ClosePaidSalaryAutomatically").'</label></div>';
|
||||
print $form->buttonsSaveCancel("ToMakePayment", "Cancel", array(), true);
|
||||
|
|
|
|||
Loading…
Reference in a new issue