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] 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}