From a2dcad788b8a663ea32486749d69c3c669b99eda Mon Sep 17 00:00:00 2001 From: Nathan <130627685+nathanpixodeo@users.noreply.github.com> Date: Sun, 28 Jun 2026 10:22:48 +0700 Subject: [PATCH 01/12] Autofill French VAT number from SIREN or SIRET (#38956) Co-authored-by: Laurent Destailleur --- htdocs/societe/card.php | 3 +++ htdocs/societe/class/societe.class.php | 17 ++++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index cd4f62f5abc..32c12ad3715 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -524,6 +524,9 @@ if (empty($reshook)) { $object->country_code = $tmparray['code']; $object->country = $tmparray['label']; } + if (empty($object->tva_intra)) { + $object->tva_intra = $object->calculateVATNumberFromProperties($object); + } } } diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 6e5a3caa6df..fbd33d6a524 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -5391,15 +5391,22 @@ class Societe extends CommonObject public function calculateVATNumberFromProperties($thirdparty) { if ($thirdparty->country_code == 'FR' && empty($thirdparty->tva_intra) && !empty($thirdparty->tva_assuj)) { - $siren = trim($thirdparty->idprof1); - if (empty($siren)) { - $siren = (int) substr(str_replace(' ', '', $thirdparty->idprof2), 0, 9); + require_once DOL_DOCUMENT_ROOT.'/core/lib/profid.lib.php'; + + $siren = preg_replace('/\s+/', '', (string) $thirdparty->idprof1); + $siret = preg_replace('/\s+/', '', (string) $thirdparty->idprof2); + if (!isValidSiren($siren)) { + if (!isValidSiret($siret)) { + return ''; + } + + $siren = substr($siret, 0, 9); } if (!empty($siren)) { // [FR + key code + SIREN number ] // Key VAT = [12 + 3 * (SIREN modulo 97)] modulo 97 - $cle = (12 + 3 * $siren % 97) % 97; - $tva_intra = 'FR' . $cle . $siren; + $cle = (12 + 3 * (((int) $siren) % 97)) % 97; + $tva_intra = 'FR' . str_pad((string) $cle, 2, '0', STR_PAD_LEFT) . $siren; } } From 16d5c3cc35f9c61f88bbec0f15c3aa4ff408098b Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 28 Jun 2026 05:38:14 +0200 Subject: [PATCH 02/12] FIX Product - Reference Objects - Problem of display (clumn offset) on total when we have a select column (#39002) --- htdocs/product/stats/facture.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index 1eb48544c50..110f627a1f7 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -1,11 +1,11 @@ - * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2014 Florian Henry - * Copyright (C) 2024 Frédéric France - * Copyright (C) 2026 Jon Bendtsen +/* Copyright (C) 2003-2007 Rodolphe Quiedeville + * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2014 Florian Henry + * Copyright (C) 2024 Frédéric France + * Copyright (C) 2026 Jon Bendtsen * * 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 @@ -447,12 +447,14 @@ if ($id > 0 || !empty($ref)) { print ''; $i = 0; + $colspan = 3; print '
'; - print ''; + print '
'; print ''; // Action column if ($conf->main_checkbox_left_column) { print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); + $colspan++; } print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "s.rowid", "", $option, '', $sortfield, $sortorder); print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", "", $option, '', $sortfield, $sortorder); @@ -547,7 +549,7 @@ if ($id > 0 || !empty($ref)) { } else { print ''; } - print ''; + print ''; print ''; print ''; print ''; From 79bc65b5264c0723271cf2989d8f4724f9cd445a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 28 Jun 2026 09:30:50 +0200 Subject: [PATCH 03/12] FIX: Translate French code comments to English in holiday, hrm and salaries modules --- htdocs/holiday/card.php | 8 ++++---- htdocs/holiday/card_group.php | 6 +++--- htdocs/holiday/class/holiday.class.php | 10 +++++----- htdocs/holiday/list.php | 4 ++-- htdocs/hrm/class/skill.class.php | 14 +++++++------- htdocs/hrm/evaluation_card.php | 2 +- htdocs/hrm/lib/hrm_skillrank.lib.php | 3 ++- htdocs/hrm/skill_card.php | 6 +++--- htdocs/hrm/skill_tab.php | 4 ++-- htdocs/salaries/card.php | 4 ++-- htdocs/salaries/class/api_salaries.class.php | 4 ++-- htdocs/salaries/class/paymentsalary.class.php | 6 +++--- htdocs/salaries/payment_salary.php | 8 ++++---- 13 files changed, 40 insertions(+), 39 deletions(-) diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index a53d25f0ab6..7bbdeaa4307 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -1096,7 +1096,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') { '."\n"; - // Formulaire de demande + // Leave request form print '
'."\n"; print ''."\n"; print ''."\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); } diff --git a/htdocs/holiday/card_group.php b/htdocs/holiday/card_group.php index c259d287f5d..e1c971112ae 100644 --- a/htdocs/holiday/card_group.php +++ b/htdocs/holiday/card_group.php @@ -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') { '."\n"; - // Formulaire de demande + // Leave request form print ''."\n"; print ''."\n"; print ''."\n"; @@ -570,7 +570,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') { print $form->textwithpicto($langs->trans("DateDebCP"), $langs->trans("FirstDayOfHoliday")); print ''; print '
'.$form->textwithpicto($langs->trans("Total"), $langs->trans("Totalforthispage")).''.$total_qty.''.price($total_ht).''; - // 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 { diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index c20af6a74cc..742dbe8d4e3 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -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) { diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index aac484b7d8f..167e30395c6 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -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); diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php index 7db7f5f6392..87190b6a4f4 100644 --- a/htdocs/hrm/class/skill.class.php +++ b/htdocs/hrm/class/skill.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2021 Greg Rastklan * Copyright (C) 2021 Jean-Pascal BOUDET * Copyright (C) 2021 Grégory BLEMAND - * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * Copyright (C) 2024-2026 MDW * * 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 $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 $arraydata Array of data + * @return string HTML Code for Kanban thumb. */ public function getKanbanView($option = '', $arraydata = null) { diff --git a/htdocs/hrm/evaluation_card.php b/htdocs/hrm/evaluation_card.php index dc8975821a5..ad349509b62 100644 --- a/htdocs/hrm/evaluation_card.php +++ b/htdocs/hrm/evaluation_card.php @@ -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 '
'; if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { diff --git a/htdocs/hrm/lib/hrm_skillrank.lib.php b/htdocs/hrm/lib/hrm_skillrank.lib.php index e89f43f24da..242904f7033 100644 --- a/htdocs/hrm/lib/hrm_skillrank.lib.php +++ b/htdocs/hrm/lib/hrm_skillrank.lib.php @@ -4,6 +4,7 @@ * Copyright (C) 2021 Jean-Pascal BOUDET * Copyright (C) 2021 Grégory BLEMAND * Copyright (C) 2024 MDW + * Copyright (C) 2026 Frédéric France * * 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).')'); diff --git a/htdocs/hrm/skill_card.php b/htdocs/hrm/skill_card.php index dbbb978fb94..106b1e6072f 100644 --- a/htdocs/hrm/skill_card.php +++ b/htdocs/hrm/skill_card.php @@ -4,7 +4,7 @@ * Copyright (C) 2021 Greg Rastklan * Copyright (C) 2021 Jean-Pascal BOUDET * Copyright (C) 2021 Grégory BLEMAND - * Copyright (C) 2023-2025 Frédéric France + * Copyright (C) 2023-2026 Frédéric France * Copyright (C) 2024-2026 MDW * * 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 '
' . "\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 ''; } else { print $objectline->showOutputField($val, $key, $objectline->$key, ''); diff --git a/htdocs/hrm/skill_tab.php b/htdocs/hrm/skill_tab.php index 4db0f4c5499..4f6dfc6055a 100644 --- a/htdocs/hrm/skill_tab.php +++ b/htdocs/hrm/skill_tab.php @@ -4,7 +4,7 @@ * Copyright (C) 2021 Greg Rastklan * Copyright (C) 2021 Jean-Pascal BOUDET * Copyright (C) 2021 Grégory BLEMAND - * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * Copyright (C) 2024 Alexandre Spangaro * Copyright (C) 2024-2026 MDW * @@ -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); diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php index e44dc8d2f58..6f09059997b 100644 --- a/htdocs/salaries/card.php +++ b/htdocs/salaries/card.php @@ -3,7 +3,7 @@ * Copyright (C) 2014-2020 Laurent Destailleur * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Charlie BENKE - * Copyright (C) 2018-2025 Frédéric France + * Copyright (C) 2018-2026 Frédéric France * Copyright (C) 2021 Gauthier VERDOL * Copyright (C) 2023 Maxime Nicolas * Copyright (C) 2023 Benjamin GREMBI @@ -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'); diff --git a/htdocs/salaries/class/api_salaries.class.php b/htdocs/salaries/class/api_salaries.class.php index d6cbc06a94b..2574466bc62 100644 --- a/htdocs/salaries/class/api_salaries.class.php +++ b/htdocs/salaries/class/api_salaries.class.php @@ -2,7 +2,7 @@ /* * Copyright (C) 2023 Marc Chenebaux * Copyright (C) 2025 MDW - * Copyright (C) 2025 Frédéric France + * Copyright (C) 2025-2026 Frédéric France * * 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. diff --git a/htdocs/salaries/class/paymentsalary.class.php b/htdocs/salaries/class/paymentsalary.class.php index 926a61da233..60132305412 100644 --- a/htdocs/salaries/class/paymentsalary.class.php +++ b/htdocs/salaries/class/paymentsalary.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2011-2024 Alexandre Spangaro * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2021 Gauthier VERDOL - * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * Copyright (C) 2024-2026 MDW * * 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) diff --git a/htdocs/salaries/payment_salary.php b/htdocs/salaries/payment_salary.php index 13972956654..629095a2566 100644 --- a/htdocs/salaries/payment_salary.php +++ b/htdocs/salaries/payment_salary.php @@ -1,6 +1,6 @@ - * Copyright (C) 2016-2025 Frédéric France + * Copyright (C) 2016-2026 Frédéric France * Copyright (C) 2021 Gauthier VERDOL * Copyright (C) 2024-2025 MDW * @@ -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 '
'; - // Bouton Save payment + // Save payment button print '
'; print '
'; print $form->buttonsSaveCancel("ToMakePayment", "Cancel", array(), true); From 470335046804fdef14cd1970c61969b694765ef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 28 Jun 2026 09:32:59 +0200 Subject: [PATCH 04/12] FIX: Fix mistranslation of 'null' as 'zero' in paymentsalary comment --- htdocs/salaries/class/paymentsalary.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/salaries/class/paymentsalary.class.php b/htdocs/salaries/class/paymentsalary.class.php index 60132305412..595c3b08454 100644 --- a/htdocs/salaries/class/paymentsalary.class.php +++ b/htdocs/salaries/class/paymentsalary.class.php @@ -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; - } // Negative amounts are accepted (for direct debit rejections) but not zero + } // Negative amounts are accepted (for direct debit rejections) but not null $this->db->begin(); From 54a5899a7fd6640ece581e8811a0bec743269f42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 28 Jun 2026 09:42:08 +0200 Subject: [PATCH 05/12] FIX: Translate French code comments to English in user, ticket, modulebuilder and compta modules --- htdocs/compta/bank/annuel.php | 10 +++++----- htdocs/compta/bank/graph.php | 8 ++++---- htdocs/compta/bank/releve.php | 4 ++-- htdocs/compta/facture/card.php | 8 ++++---- htdocs/compta/journal/purchasesjournal.php | 4 ++-- .../paiement/cheque/class/remisecheque.class.php | 6 +++--- .../sociales/class/paymentsocialcontribution.class.php | 4 ++-- htdocs/modulebuilder/index.php | 8 ++++---- .../template/class/actions_mymodule.class.php | 3 ++- htdocs/ticket/class/ticket.class.php | 4 ++-- htdocs/ticket/contact.php | 4 ++-- htdocs/user/document.php | 4 ++-- htdocs/user/home.php | 2 +- htdocs/user/ldap.php | 4 ++-- htdocs/user/param_ihm.php | 2 +- 15 files changed, 38 insertions(+), 37 deletions(-) diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 7ef6fa346b5..e53472cf70c 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -288,7 +288,7 @@ if ($result < 0) { $error++; setEventMessages($langs->trans("ErrorFailedToCreateDir"), null, 'errors'); } else { - // Calcul de $min et $max + // Calculate $min and $max $sql = "SELECT MIN(b.datev) as min, MAX(b.datev) as max"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; $sql .= ", ".MAIN_DB_PREFIX."bank_account as ba"; @@ -311,7 +311,7 @@ if ($result < 0) { } // CRED PART - // Chargement du tableau des années + // Load the year array $tblyear = array(); '@phan-var-force array> $tblyear'; $tblyear[0] = array(); @@ -347,7 +347,7 @@ if ($result < 0) { dol_print_error($db); } } - // Chargement de labels et data_xxx pour tableau 4 Movements + // Load labels and data_xxx for the 4 Movements chart $labels = array(); $data_year_0 = array(); $data_year_1 = array(); @@ -396,7 +396,7 @@ if ($result < 0) { unset($tblyear[2]); // DEDBT PART - // Chargement du tableau des années + // Load the year array $tblyear[0] = array(); $tblyear[1] = array(); $tblyear[2] = array(); @@ -431,7 +431,7 @@ if ($result < 0) { } } - // Chargement de labels et data_xxx pour tableau 4 Movements + // Load labels and data_xxx for the 4 Movements chart $labels = array(); $data_year_0 = array(); $data_year_1 = array(); diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index 593decf0a8f..f0f8d881c26 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -112,7 +112,7 @@ if ($result < 0) { $error++; setEventMessages($langs->trans("ErrorFailedToCreateDir"), null, 'errors'); } else { - // Calcul $min and $max + // Calculate $min and $max $sql = "SELECT MIN(b.datev) as min, MAX(b.datev) as max"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; $sql .= ", ".MAIN_DB_PREFIX."bank_account as ba"; @@ -470,7 +470,7 @@ if ($result < 0) { dol_print_error($db); } - // Calcul de $solde avant le debut du graphe + // Calculate $solde before the start of the graph $solde = 0; // Loading labels and datas for dashboard 3 @@ -561,7 +561,7 @@ if ($result < 0) { // Graph input/output - Credit/Debit for the month if ($mode == 'standard') { - // Chargement du tableau $credits, $debits + // Load the $credits, $debits arrays $credits = array(); $debits = array(); @@ -682,7 +682,7 @@ if ($result < 0) { // Tableau 4b - Credit/Debit if ($mode == 'standard') { - // Chargement du tableau $credits, $debits + // Load the $credits, $debits arrays $credits = array(); $debits = array(); $sql = "SELECT date_format(b.datev,'%m')"; diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 1fd629bb46a..9754031628e 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -6,7 +6,7 @@ * Copyright (C) 2017 Patrick Delcroix * Copyright (C) 2019 Nicolas ZABOURI * Copyright (C) 2022 Alexandre Spangaro - * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * Copyright (C) 2024-2026 MDW * * This program is free software; you can redistribute it and/or modify @@ -481,7 +481,7 @@ if (empty($numref)) { print ' '; print "\n"; - // Calcul du solde de depart du releve + // Calculate the opening balance of the statement $sql = "SELECT sum(b.amount) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; $sql .= " WHERE b.num_releve < '".$db->escape($numref)."'"; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 20553b7987d..eb15a2c0a2e 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1191,7 +1191,7 @@ if (empty($reshook)) { $discount->multicurrency_total_tva = -((float) $multicurrency_amount_tva[$tva_tx]); $discount->multicurrency_total_ttc = -((float) $multicurrency_amount_ttc[$tva_tx]); } else { - //We keep the absolute value to be consistent with the function used to create the discount in case of deposit in the “create” function of the Payment class + //We keep the absolute value to be consistent with the function used to create the discount in case of deposit in the "create" function of the Payment class $discount->amount_ht = abs((float) $amount_ht[$tva_tx]); $discount->amount_tva = abs((float) $amount_tva[$tva_tx]); $discount->amount_ttc = abs((float) $amount_ttc[$tva_tx]); @@ -3494,7 +3494,7 @@ if (empty($reshook)) { // Change each progression percent on each lines foreach ($object->lines as $line) { - // no traitement for special product + // no processing for special product if ($line->product_type == 9) { continue; } @@ -4788,7 +4788,7 @@ if ($action == 'create') { // TODO for compatibility if ($origin == 'contrat') { '@phan-var-force Contrat $objectsrc'; - // Calcul contrat->price (HT), contrat->total (TTC), contrat->tva + // Recalculate contrat->price (excl. VAT), contrat->total (incl. VAT), contrat->tva $objectsrc->update_price(1, 'auto', 1); } @@ -5578,7 +5578,7 @@ if ($action == 'create') { if (getDolGlobalString('INVOICE_POINTOFTAX_DATE')) { // Date invoice point of tax (Leistungsdatum / service date for tax). - // Only editable while the invoice is a draft — once validated, the + // Only editable while the invoice is a draft -- once validated, the // invoice is a legally issued document and date_pointoftax is the // basis for the VAT-return period assignment under accrual taxation // (Soll-Versteuerung). To correct, set the invoice back to draft or diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index 616073de7ee..7e972f33e0e 100644 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -5,7 +5,7 @@ * Copyright (C) 2012 Regis Houssin * Copyright (C) 2011-2025 Alexandre spangaro * Copyright (C) 2013 Marcos García - * Copyright (C) 2018-2025 Frédéric France + * Copyright (C) 2018-2026 Frédéric France * Copyright (C) 2024-2026 MDW * * This program is free software; you can redistribute it and/or modify @@ -166,7 +166,7 @@ if ($result) { $i = 0; while ($i < $num) { $obj = $db->fetch_object($result); - // contrôles + // checks $compta_soc = (($obj->code_compta_fournisseur != "") ? $obj->code_compta_fournisseur : $cptfour); $compta_prod = $obj->accountancy_code_buy; if (empty($compta_prod)) { diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 034ea5b649c..d639939ecbd 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2011-2016 Juanjo Menent * Copyright (C) 2015 Marcos García - * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -680,9 +680,9 @@ class RemiseCheque extends CommonObject } /** - * Mets a jour le montant total + * Update the total amount * - * @return int 0 en cas de success + * @return int 0 on success */ public function updateAmount() { diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index ae49ad112c2..f58ad04e1e1 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2002 Rodolphe Quiedeville * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2022 Alexandre Spangaro - * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * Copyright (C) 2024-2026 MDW * * This program is free software; you can redistribute it and/or modify @@ -242,7 +242,7 @@ class PaymentSocialContribution extends CommonObject if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."paiementcharge"); - // Insere tableau des montants / factures + // Insert amounts / invoices array foreach ($this->amounts as $key => $amount) { $contribid = $key; if (is_numeric($amount) && $amount != 0) { diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 7bc7be4bcb0..aba4ac253b7 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -3,7 +3,7 @@ * Copyright (C) 2018-2019 Nicolas ZABOURI * Copyright (C) 2023 Alexandre Janniaux * Copyright (C) 2024-2026 MDW - * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * * 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 @@ -279,7 +279,7 @@ function getLicenceHeader($user, $langs, $now) */ /** - * Post-generation validation — logs and displays a warning if residual myobject/mymodule tokens remain. + * Post-generation validation -- logs and displays a warning if residual myobject/mymodule tokens remain. * * @param string $destfile Path to the generated file * @param NamingContract $nc Contract used for generation @@ -439,7 +439,7 @@ if ($dirins && $action == 'initmodule' && $modulename) { // Test on permission '$this->picto = \'generic\';' => (empty($picto)) ? '$this->picto = \'generic\'' : '$this->picto = \'' . $picto . '\';', 'modulefamily' => $family, // Key '500000' would be cast to int(500000) by PHP, then renumbered to 0 by - // array_merge — causing str_replace to search for '0' instead of '500000'. + // array_merge -- causing str_replace to search for '0' instead of '500000'. // Use a string key that matches the exact assignment line to avoid this. '$this->numero = 500000' => '$this->numero = '.$idmodule, ] @@ -6236,7 +6236,7 @@ if ($module == 'initmodule') { value1 = $("#crud").val(); value2 = $("#permissionObj").val(); - // Vérifie si les deux sélections sont faites + // Check if both selections are made if (value1 && value2) { switch(value1.toLowerCase()){ case "read": diff --git a/htdocs/modulebuilder/template/class/actions_mymodule.class.php b/htdocs/modulebuilder/template/class/actions_mymodule.class.php index ffa49a32b3c..42b854cddad 100644 --- a/htdocs/modulebuilder/template/class/actions_mymodule.class.php +++ b/htdocs/modulebuilder/template/class/actions_mymodule.class.php @@ -1,6 +1,7 @@ * Copyright (C) ---Replace with your own copyright and developer email--- + * Copyright (C) 2026 Frédéric France * * 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 @@ -352,7 +353,7 @@ class ActionsMyModule extends CommonHookActions $counter = count($parameters['head']); $element = $parameters['object']->element; $id = $parameters['object']->id; - // verifier le type d'onglet comme member_stats où ça ne doit pas apparaitre + // check the tab type like member_stats where it should not appear // if (in_array($element, ['societe', 'member', 'contrat', 'fichinter', 'project', 'propal', 'commande', 'facture', 'order_supplier', 'invoice_supplier'])) { if (in_array($element, ['context1', 'context2'])) { $datacount = 0; diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 99e13e576bf..88bf860872a 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2016 Christophe Battarel - * Copyright (C) 2019-2025 Frédéric France + * Copyright (C) 2019-2026 Frédéric France * Copyright (C) 2020 Laurent Destailleur * Copyright (C) 2023-2025 Charlene Benke * Copyright (C) 2023-2024 Benjamin Falière @@ -1460,7 +1460,7 @@ class Ticket extends CommonObject } /** - * Charge dans cache la liste des sévérité de tickets (paramétrable dans dictionnaire) + * Load into cache the list of ticket severities (configurable in the dictionary) * * @return int Number of lines loaded, 0 if already loaded, <0 if KO */ diff --git a/htdocs/ticket/contact.php b/htdocs/ticket/contact.php index 2cdee73461a..fd19f868a9f 100644 --- a/htdocs/ticket/contact.php +++ b/htdocs/ticket/contact.php @@ -3,7 +3,7 @@ * Copyright (C) 2011 Regis Houssin * Copyright (C) 2016 Christophe Battarel * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * * 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 @@ -118,7 +118,7 @@ if ($action == 'addcontact' && $user->hasRight('ticket', 'write')) { $internal_contacts = $object->listeContact(-1, 'internal', 0, 'SUPPORTTEC'); foreach ($internal_contacts as $key => $contact) { if ($contact['id'] !== $contactid) { - //print "user à effacer : ".$useroriginassign; + //print "user to delete: ".$useroriginassign; $result = $object->delete_contact($contact['rowid']); if ($result < 0) { $error++; diff --git a/htdocs/user/document.php b/htdocs/user/document.php index 915259c18d4..aea3c228f36 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2015 Regis Houssin * Copyright (C) 2010 Juanjo Menent * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -69,7 +69,7 @@ if (getDolGlobalString('MAIN_USE_ADVANCED_PERMS')) { } // Define value to know what current user can do on properties of edited user if ($id) { - // $user est le user qui edite, $id est l'id de l'utilisateur edite + // $user is the user doing the edit, $id is the id of the user being edited $permissiontoedit = ((($user->id == $id) && $user->hasRight("user", "self", "write")) || (($user->id != $id) && $user->hasRight("user", "user", "write"))); $permissiontoeditpassword = ((($user->id == $id) && $user->hasRight("user", "self", "password")) || (($user->id != $id) && $user->hasRight("user", "user", "password"))); } diff --git a/htdocs/user/home.php b/htdocs/user/home.php index fcb829be61f..30d61a6090e 100644 --- a/htdocs/user/home.php +++ b/htdocs/user/home.php @@ -39,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'userhome'; // To manage different context of search if (!$user->hasRight('user', 'user', 'lire') && !$user->admin) { - // Redirection vers la page de l'utilisateur + // Redirect to the user's own page header("Location: card.php?id=".$user->id); exit; } diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index 615a96564c0..07277b5863e 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -2,7 +2,7 @@ /* Copyright (C) 2006-2012 Laurent Destailleur * Copyright (C) 2006-2021 Regis Houssin * Copyright (C) 2024 William Mead - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * * 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 @@ -21,7 +21,7 @@ /** * \file htdocs/user/ldap.php * \ingroup ldap - * \brief Page fiche LDAP utilisateur + * \brief LDAP user record page */ // Load Dolibarr environment diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 2490a5aeb83..241be182f7d 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -55,7 +55,7 @@ if (!isset($id) || empty($id)) { } '@phan-var-force int<1,max> $id'; -// $user est le user qui edite, $id est l'id de l'utilisateur edite +// $user is the user doing the edit, $id is the id of the user being edited $caneditfield = ((($user->id == $id) && $user->hasRight("user", "self", "write")) || (($user->id != $id) && $user->hasRight("user", "user", "write"))); From fc3956242cd2ef5cc5bbede96525fd6bc9684c06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 28 Jun 2026 09:51:09 +0200 Subject: [PATCH 06/12] FIX: Translate French code comments to English in accountancy, admin and ai modules --- .../class/accountancyexport.class.php | 24 +++++++++---------- htdocs/admin/mails_ingoing.php | 4 ++-- htdocs/admin/modules.php | 4 ++-- htdocs/ai/ajax/generate_content.php | 6 ++--- htdocs/ai/tools/products.class.php | 3 ++- 5 files changed, 21 insertions(+), 20 deletions(-) diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index db0569598b8..dba0486ab40 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -9,7 +9,7 @@ * Copyright (C) 2022 Lionel Vessiller * Copyright (C) 2013-2017 Olivier Geffroy * Copyright (C) 2017 Elarifr. Ari Elbaz - * Copyright (C) 2017-2024 Frédéric France + * Copyright (C) 2017-2026 Frédéric France * Copyright (C) 2017 André Schild * Copyright (C) 2020 Guillaume Alexandre * Copyright (C) 2022 Joachim Kueter @@ -2242,7 +2242,7 @@ class AccountancyExport foreach ($objectLines as $line) { // TYPE C if ($last_codeinvoice != $line->doc_ref) { - //recherche societe en fonction de son code client + //search company by customer code $sql = "SELECT code_client, fk_forme_juridique, nom, address, zip, town, fk_pays, phone, siret FROM ".MAIN_DB_PREFIX."societe"; $sql .= " WHERE code_client = '".$this->db->escape($line->thirdparty_code)."'"; $resql = $this->db->query($sql); @@ -2662,22 +2662,22 @@ class AccountancyExport } else { $tab[] = substr(length_accountg($line->numero_compte), 0, 15); } - //Libellé Auto + //Auto label $tab[] = ""; //print '"'.dol_trunc(str_replace('"', '', $line->label_operation),40,'right','UTF-8',1).'"'; - //Libellé manual + //Manual label $tab[] = dol_trunc(str_replace('"', '', $invoice_ref . (!empty($company_name) ? ' - ' : '') . $company_name), 40, 'right', 'UTF-8', 1); - //Numéro de pièce + //Document number $tab[] = dol_trunc(str_replace('"', '', (string) $line->piece_num), 10, 'right', 'UTF-8', 1); - //Devise + //Currency $tab[] = 'EUR'; //Amount $tab[] = price2num(abs($line->debit - $line->credit)); - //Sens + //Direction $tab[] = $line->sens; - //Code lettrage + //Matching code $tab[] = ""; - //Date Echéance + //Due date $tab[] = $date_echeance; $output = implode($separator, $tab).$end_line; @@ -2768,10 +2768,10 @@ class AccountancyExport // Convert the UTF-8 string in latin9 $tab[] = mb_convert_encoding(str_replace(' - Compte auxiliaire', '', $line->label_operation), "Windows-1252", 'UTF-8'); - //Calcul de la longueur des numéros de comptes + //Calculate account number length $taille_numero = strlen(length_accountg($line->numero_compte)); - //Création du numéro de client et fournisseur générique + //Build generic customer and supplier account number $numero_cpt_client = '411'; $numero_cpt_fourn = '401'; for ($i = 1; $i <= ($taille_numero - 3); $i++) { @@ -2779,7 +2779,7 @@ class AccountancyExport $numero_cpt_fourn .= '0'; } - //Création des comptes auxiliaire des clients et fournisseur + //Build auxiliary accounts for customers and suppliers if (length_accountg($line->numero_compte) == $numero_cpt_client || length_accountg($line->numero_compte) == $numero_cpt_fourn) { $tab[] = rtrim(length_accounta($line->subledger_account), "0"); } else { diff --git a/htdocs/admin/mails_ingoing.php b/htdocs/admin/mails_ingoing.php index 4011022b448..7e06faed3e2 100644 --- a/htdocs/admin/mails_ingoing.php +++ b/htdocs/admin/mails_ingoing.php @@ -3,7 +3,7 @@ * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2016 Jonathan TISSEAU - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * * 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 @@ -74,7 +74,7 @@ if (preg_match('/^mac/i', PHP_OS)) { } -//$wikihelp = 'EN:Setup_EMails|FR:Paramétrage_EMails|ES:Configuración_EMails'; +//$wikihelp = 'EN:Setup_EMails|FR:Parametrage_EMails|ES:Configuracion_EMails'; $wikihelp = ''; llxHeader('', $langs->trans("Setup"), $wikihelp, '', 0, 0, '', '', '', 'mod-admin page-mails_ingoing'); diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index abad013a078..839dc44755c 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -8,7 +8,7 @@ * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2018 Nicolas ZABOURI - * Copyright (C) 2021-2025 Frédéric France + * Copyright (C) 2021-2026 Frédéric France * Copyright (C) 2024 MDW * Copyright (C) 2026 Charlene Benke * @@ -1663,7 +1663,7 @@ if ($mode == 'deploy') { }); }); '."\n"; - // MAX_FILE_SIZE doit précéder le champ input de type file + // MAX_FILE_SIZE must come before the file input field print ''; } diff --git a/htdocs/ai/ajax/generate_content.php b/htdocs/ai/ajax/generate_content.php index b3fcaad82c1..ba3efd3c5d3 100644 --- a/htdocs/ai/ajax/generate_content.php +++ b/htdocs/ai/ajax/generate_content.php @@ -4,7 +4,7 @@ * Copyright (C) 2012 J. Fernando Lagrange * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2023 Eric Seigne - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * * 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 @@ -118,7 +118,7 @@ if (empty($instructions)) { print dolPrintHTML($generatedContent); // Note that common HTML tags are NOT escaped (but a sanitization is done) } else { // We must not use dolPrintText because dolPrintText format data including accent in htmlentities for a HTML output. We need a non formatted output. - //print dol_string_onlythesehtmltags('"Ça va" est une expression française et ceci une balise html', 1, 1, 1); + //print dol_string_onlythesehtmltags('"How are you" is a French expression and this is an HTML tag', 1, 1, 1); print dol_string_onlythesehtmltags($generatedContent, 1, 1, 1); //print dol_string_nohtmltag($generatedContent); } @@ -134,7 +134,7 @@ if (empty($instructions)) { print dolPrintHTML($generatedContent); } else { // We must not use dolPrintText because dolPrintText format data including accent in htmlentities for a HTML output. We need a non formatted output. - //print dol_string_onlythesehtmltags('"Ça va" est une expression française et ceci une balise html', 1, 1, 1); + //print dol_string_onlythesehtmltags('"How are you" is a French expression and this is an HTML tag', 1, 1, 1); print dol_string_onlythesehtmltags($generatedContent, 1, 1, 1); } } diff --git a/htdocs/ai/tools/products.class.php b/htdocs/ai/tools/products.class.php index a1a1d35693f..baeab9423f1 100644 --- a/htdocs/ai/tools/products.class.php +++ b/htdocs/ai/tools/products.class.php @@ -1,6 +1,7 @@ * Copyright (C) 2026 Nick Fragoulis + * Copyright (C) 2026 Frédéric France * * 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 @@ -659,7 +660,7 @@ class ToolProducts extends McpTool * * @param float $virtual_stock Current virtual stock (Physical + Incoming - Outgoing). * @param float $min_stock_alert Minimum stock alert level (Seuil alerte). - * @param float $desired_stock Desired stock level (Stock désiré). + * @param float $desired_stock Desired stock level. * @param float $dailyBurnRate Estimated daily consumption rate. * * @return array{action: string, urgency: string, suggested_qty: int, reason: string} From 669b398a06852fb2a6c28257a6216582fb4b95dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 28 Jun 2026 13:05:13 +0200 Subject: [PATCH 07/12] FIX: Translate French code comments to English in scripts/user --- scripts/user/migrate_picture_path.php | 4 ++-- scripts/user/sync_groups_ldap2dolibarr.php | 12 ++++++------ scripts/user/sync_users_ldap2dolibarr.php | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/user/migrate_picture_path.php b/scripts/user/migrate_picture_path.php index 54ba0ccf8b3..5c72162d2b4 100755 --- a/scripts/user/migrate_picture_path.php +++ b/scripts/user/migrate_picture_path.php @@ -3,7 +3,7 @@ /* * Copyright (C) 2007-2016 Laurent Destailleur * Copyright (C) 2015 Jean Heimburger - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -114,7 +114,7 @@ function migrate_user_filespath($u) { global $conf; - // Les fichiers implodets des users sont toujours sur l'entité 1 + // User files are always stored on entity 1 $dir = $conf->user->dir_output; $origin = $dir.'/'.get_exdir($u->id, 2, 0, 0, $u, 'user'); $destin = $dir.'/'.$u->id; diff --git a/scripts/user/sync_groups_ldap2dolibarr.php b/scripts/user/sync_groups_ldap2dolibarr.php index d81f27179af..37d3d13113c 100755 --- a/scripts/user/sync_groups_ldap2dolibarr.php +++ b/scripts/user/sync_groups_ldap2dolibarr.php @@ -4,7 +4,7 @@ * Copyright (C) 2005 Rodolphe Quiedeville * Copyright (C) 2006-2012 Laurent Destailleur * Copyright (C) 2013 Maxime Kohlhaas - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -198,11 +198,11 @@ if ($result >= 0) { if ($tmpkey === 'count') { // @phpstan-ignore-line continue; } - if (empty($userList[$userdn])) { // Récupération de l'utilisateur - // Schéma rfc2307: les membres sont listés dans l'attribut memberUid sous form de login uniquement + if (empty($userList[$userdn])) { // Fetch the user + // rfc2307 schema: members are listed in the memberUid attribute as login names only if (getDolGlobalString('LDAP_GROUP_FIELD_GROUPMEMBERS') === 'memberUid') { $userKey = array($userdn); - } else { // Pour les autres schémas, les membres sont listés sous forme de DN completes + } else { // For other schemas, members are listed as full DNs $userFilter = explode(',', $userdn); $userKey = $ldap->getAttributeValues('('.$userFilter[0].')', getDolGlobalString('LDAP_KEY_USERS')); } @@ -213,9 +213,9 @@ if ($result >= 0) { $fuser = new User($db); if (getDolGlobalString('LDAP_KEY_USERS') == getDolGlobalString('LDAP_FIELD_SID')) { - $fuser->fetch(0, '', $userKey[0]); // Chargement du user concerné par le SID + $fuser->fetch(0, '', $userKey[0]); // Load the user matched by SID } elseif (getDolGlobalString('LDAP_KEY_USERS') == getDolGlobalString('LDAP_FIELD_LOGIN')) { - $fuser->fetch(0, $userKey[0]); // Chargement du user concerné par le login + $fuser->fetch(0, $userKey[0]); // Load the user matched by login } $userList[$userdn] = $fuser; diff --git a/scripts/user/sync_users_ldap2dolibarr.php b/scripts/user/sync_users_ldap2dolibarr.php index 451c7b1d86c..1576d9b94c9 100755 --- a/scripts/user/sync_users_ldap2dolibarr.php +++ b/scripts/user/sync_users_ldap2dolibarr.php @@ -3,7 +3,7 @@ /** * Copyright (C) 2005 Rodolphe Quiedeville * Copyright (C) 2006-2012 Laurent Destailleur - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -204,9 +204,9 @@ if ($result >= 0) { $fuser = new User($db); if (getDolGlobalString('LDAP_KEY_USERS') == getDolGlobalString('LDAP_FIELD_SID')) { - $fuser->fetch(0, '', $ldapuser[getDolGlobalString('LDAP_KEY_USERS')]); // Chargement du user concerné par le SID + $fuser->fetch(0, '', $ldapuser[getDolGlobalString('LDAP_KEY_USERS')]); // Load the user matched by SID } elseif (getDolGlobalString('LDAP_KEY_USERS') == getDolGlobalString('LDAP_FIELD_LOGIN')) { - $fuser->fetch(0, $ldapuser[getDolGlobalString('LDAP_KEY_USERS')]); // Chargement du user concerné par le login + $fuser->fetch(0, $ldapuser[getDolGlobalString('LDAP_KEY_USERS')]); // Load the user matched by login } // Propriete membre From a02658b7095d0180a5cc028a44208111077919e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 28 Jun 2026 13:15:24 +0200 Subject: [PATCH 08/12] FIX: Translate French code comments to English in commande, contrat and datapolicy modules --- htdocs/commande/list.php | 4 ++-- htdocs/commande/list_det.php | 6 +++--- htdocs/contrat/card.php | 2 +- htdocs/contrat/ticket.php | 4 ++-- htdocs/datapolicy/class/datapolicycron.class.php | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 78523623d52..aff05be426c 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -6,7 +6,7 @@ * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2013 Christophe Battarel * Copyright (C) 2013 Cédric Salvado - * Copyright (C) 2015-2025 Frédéric France + * Copyright (C) 2015-2026 Frédéric France * Copyright (C) 2015 Marcos García * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016-2023 Ferran Marcet @@ -3013,7 +3013,7 @@ while ($i < $imaxinloop) { print ''; if (!empty($shippableInfos['warning'])) { - // On ne remonte plus le détail textwarning, mais on garde l’icône d’avertissement + // We no longer show the textwarning detail, but we keep the warning icon print $form->textwithtooltip('', $langs->trans("NotEnoughForAllOrders"), 2, 1, img_picto('', 'error', '', 0, 0, 0, '', '2'), '', 2); } } diff --git a/htdocs/commande/list_det.php b/htdocs/commande/list_det.php index 19ef329c270..eba54d979f0 100644 --- a/htdocs/commande/list_det.php +++ b/htdocs/commande/list_det.php @@ -190,7 +190,7 @@ if (empty($user->socid)) { $checkedtypetiers = 0; $arrayfields = array( - // Détail commande + // Order detail 'rowid' => array('label' => 'LineID', 'checked' => '-1', 'position' => 1, 'enabled' => '1'), 'c.ref' => array('label' => "RefOrder", 'checked' => '1', 'position' => 5), 'pr.ref' => array('label' => 'ProductRef', 'checked' => '1', 'position' => 6), @@ -754,7 +754,7 @@ if ($resql) { if ($search_id) { $param .= '&search_id='.urlencode($search_id); } - // Détail commande + // Order detail if ($search_refProduct) { $param .= '&search_refProduct='.urlencode($search_refProduct); } @@ -1511,7 +1511,7 @@ if ($resql) { $total_margin = 0; - // Détail commande + // Order detail $totalqty = 0; $oldref = null; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 7a28c26c9a9..0b7f12e0d59 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -380,7 +380,7 @@ if (empty($reshook)) { $product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0); if ($product_type == 1 || (getDolGlobalString('CONTRACT_SUPPORT_PRODUCTS') && in_array($product_type, array(0, 1)))) { // TODO Exclude also deee - // service prédéfini + // predefined service if ($lines[$i]->fk_product > 0) { $product_static = new Product($db); diff --git a/htdocs/contrat/ticket.php b/htdocs/contrat/ticket.php index 6a7f939c993..cd1e64a2973 100644 --- a/htdocs/contrat/ticket.php +++ b/htdocs/contrat/ticket.php @@ -4,7 +4,7 @@ * Copyright (C) 2012-2023 Charlene BENKE * Copyright (C) 2024 MDW * Copyright (C) 2024 Alexandre Spangaro - * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2024-2026 Frédéric France * * 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 @@ -188,7 +188,7 @@ print ''.$langs->trans("DateEnd").''; print ''.$langs->trans("Progress").''; print ''.$langs->trans("Status").''; print ''; -// on récupère la totalité des tickets liés au contrat +// retrieve all tickets linked to the contract $allticketarray = $object->getTicketsArray(); if (is_array($allticketarray) && count($allticketarray) > 0) { foreach ($allticketarray as $key => $value) { diff --git a/htdocs/datapolicy/class/datapolicycron.class.php b/htdocs/datapolicy/class/datapolicycron.class.php index 846325652cb..ab5e7e1900e 100644 --- a/htdocs/datapolicy/class/datapolicycron.class.php +++ b/htdocs/datapolicy/class/datapolicycron.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018-2025 Frédéric France + * Copyright (C) 2018-2026 Frédéric France * Copyright (C) 2024 William Mead * Copyright (C) 2024-2025 MDW * Copyright (C) 2025 Quentin VIAL--GOUTEYRON @@ -241,7 +241,7 @@ class DataPolicyCron 'sql_template' => $sqltemplate, 'class' => 'Adherent', 'file' => DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php', - 'anonymize_fields' => array('lastname' => 'MAKEANONYMOUS', 'firstname' => 'MAKEANONYMOUS', 'societe' => '---', 'address' => '---', 'town' => '---', 'zip' => '---', 'phone' => '---', 'phone_perso' => '---', 'phone_mobile' => '---', 'email' => 'anonymous+__ID__@example.com', 'birth' => dol_mktime(0, 0, 0, 1, 1, 1900), 'photo' => '', 'url' => '---', 'fax' => '---', 'socialnetworks' => [], 'ip' => '0.0.0.0', 'note_private' => '---', 'note_public' => '---', 'statut' => 0), // Force status to "canceled / résilié" + 'anonymize_fields' => array('lastname' => 'MAKEANONYMOUS', 'firstname' => 'MAKEANONYMOUS', 'societe' => '---', 'address' => '---', 'town' => '---', 'zip' => '---', 'phone' => '---', 'phone_perso' => '---', 'phone_mobile' => '---', 'email' => 'anonymous+__ID__@example.com', 'birth' => dol_mktime(0, 0, 0, 1, 1, 1900), 'photo' => '', 'url' => '---', 'fax' => '---', 'socialnetworks' => [], 'ip' => '0.0.0.0', 'note_private' => '---', 'note_public' => '---', 'statut' => 0), // Force status to "canceled" 'call_params' => array( 'delete' => array('user'), // $object->delete($user) 'update' => array('user') // $object->update($user) From d837298b1e7034d35ecf3158bd2a9558f49f579b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 28 Jun 2026 13:23:55 +0200 Subject: [PATCH 09/12] FIX: Cast db->user to string to fix Phan PhanTypeSuspiciousStringExpression in ldap sync scripts --- scripts/user/sync_groups_ldap2dolibarr.php | 13 ++++++------- scripts/user/sync_users_ldap2dolibarr.php | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/user/sync_groups_ldap2dolibarr.php b/scripts/user/sync_groups_ldap2dolibarr.php index 37d3d13113c..8d744bd0b2e 100755 --- a/scripts/user/sync_groups_ldap2dolibarr.php +++ b/scripts/user/sync_groups_ldap2dolibarr.php @@ -42,12 +42,6 @@ if (substr($sapi_type, 0, 3) == 'cgi') { } require_once $path."../../htdocs/master.inc.php"; -require_once DOL_DOCUMENT_ROOT.'/core/lib/functionscli.lib.php'; -require_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"; -require_once DOL_DOCUMENT_ROOT."/core/class/ldap.class.php"; -require_once DOL_DOCUMENT_ROOT."/user/class/user.class.php"; -require_once DOL_DOCUMENT_ROOT."/user/class/usergroup.class.php"; - /** * @var Conf $conf * @var DoliDB $db @@ -55,6 +49,11 @@ require_once DOL_DOCUMENT_ROOT."/user/class/usergroup.class.php"; * @var Translate $langs * @var User $user */ +require_once DOL_DOCUMENT_ROOT.'/core/lib/functionscli.lib.php'; +require_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"; +require_once DOL_DOCUMENT_ROOT."/core/class/ldap.class.php"; +require_once DOL_DOCUMENT_ROOT."/user/class/user.class.php"; +require_once DOL_DOCUMENT_ROOT."/user/class/usergroup.class.php"; $langs->loadLangs(array("main", "errors")); @@ -120,7 +119,7 @@ print "----- To Dolibarr database:\n"; print "type=".$conf->db->type."\n"; print "host=".$conf->db->host."\n"; print "port=".$conf->db->port."\n"; -print "login=".$conf->db->user."\n"; +print "login=".(string) $conf->db->user."\n"; print "database=".$conf->db->name."\n"; print "----- Options:\n"; print "commitiferror=".$forcecommit."\n"; diff --git a/scripts/user/sync_users_ldap2dolibarr.php b/scripts/user/sync_users_ldap2dolibarr.php index 1576d9b94c9..c975e2f2b69 100755 --- a/scripts/user/sync_users_ldap2dolibarr.php +++ b/scripts/user/sync_users_ldap2dolibarr.php @@ -138,7 +138,7 @@ print "----- To Dolibarr database:\n"; print "type=".$conf->db->type."\n"; print "host=".$conf->db->host."\n"; print "port=".$conf->db->port."\n"; -print "login=".$conf->db->user."\n"; +print "login=".(string) $conf->db->user."\n"; print "database=".$conf->db->name."\n"; print "----- Options:\n"; print "commitiferror=".$forcecommit."\n"; From 8223a28e99a397f194d83253d1daf408800c4cfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 28 Jun 2026 13:25:52 +0200 Subject: [PATCH 10/12] FIX: Translate French PHPDoc params to English in emailcollector lib --- htdocs/emailcollector/lib/emailcollector.lib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/emailcollector/lib/emailcollector.lib.php b/htdocs/emailcollector/lib/emailcollector.lib.php index 7eb58caa4ce..43f44c92bf4 100644 --- a/htdocs/emailcollector/lib/emailcollector.lib.php +++ b/htdocs/emailcollector/lib/emailcollector.lib.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2024-2026 Frédéric France * Copyright (C) 2024 MDW * * This program is free software: you can redistribute it and/or modify @@ -149,9 +149,9 @@ function getAttachments($jk, $mbox) /** * Get content of a joined file from its position into a given email * - * @param integer $jk numéro du mail - * @param string $fpos position de la pièce jointe - * @param integer $type type de la pièce jointe + * @param integer $jk mail number + * @param string $fpos attachment position + * @param integer $type attachment type * @param \IMAP\Connection $mbox object connection imap * @return string data */ From 6d6eabcbb4f7f070f045bd49f5e52ec91e4aaf16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 28 Jun 2026 13:28:32 +0200 Subject: [PATCH 11/12] FIX: Translate French code comments to English in expensereport, expedition and fichinter modules --- htdocs/expedition/dispatch.php | 4 +-- htdocs/expensereport/card.php | 26 +++++++++---------- .../class/expensereport.class.php | 6 ++--- htdocs/fichinter/card-rec.php | 2 +- htdocs/fichinter/class/fichinterrec.class.php | 6 ++--- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/htdocs/expedition/dispatch.php b/htdocs/expedition/dispatch.php index f2320c49163..86408126d02 100644 --- a/htdocs/expedition/dispatch.php +++ b/htdocs/expedition/dispatch.php @@ -7,7 +7,7 @@ * Copyright (C) 2014 Cedric Gross * Copyright (C) 2016 Florian Henry * Copyright (C) 2017-2022 Ferran Marcet - * Copyright (C) 2018-2025 Frédéric France + * Copyright (C) 2018-2026 Frédéric France * Copyright (C) 2019-2020 Christophe Battarel * Copyright (C) 2024-2026 MDW * @@ -1702,7 +1702,7 @@ if ($object->id > 0 || !empty($object->ref)) { print $formother->getHTMLScannerForm("barcodescannerjs", 'all', 1); } - // traitement entrepot par défaut + // default warehouse handling print '