From 71f9b4f36b74446405f4486335305953642133da Mon Sep 17 00:00:00 2001 From: Alfredo Altamirano Date: Fri, 18 Oct 2019 12:55:21 -0500 Subject: [PATCH 1/4] Translation of parameter documentation --- htdocs/core/lib/functions.lib.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 8a17b961adb..979a99aa09f 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -45,9 +45,9 @@ include_once DOL_DOCUMENT_ROOT .'/core/lib/json.lib.php'; * * @param string $type Type of database (mysql, pgsql...) * @param string $host Address of database server - * @param string $user Nom de l'utilisateur autorise - * @param string $pass Mot de passe - * @param string $name Nom de la database + * @param string $user Authorized username + * @param string $pass Password + * @param string $name Name of database * @param int $port Port of database server * @return DoliDB A DoliDB instance */ @@ -3390,7 +3390,7 @@ function img_edit_remove($titlealt = 'default', $other = '') * Show logo editer/modifier fiche * * @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. - * @param integer $float Si il faut y mettre le style "float: right" + * @param integer $float If you have to put the style "float: right" * @param string $other Add more attributes on img * @return string Return tag img */ @@ -3407,7 +3407,7 @@ function img_edit($titlealt = 'default', $float = 0, $other = '') * Show logo view card * * @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. - * @param integer $float Si il faut y mettre le style "float: right" + * @param integer $float If you have to put the style "float: right" * @param string $other Add more attributes on img * @return string Return tag img */ @@ -3765,10 +3765,9 @@ function info_admin($text, $infoonimgalt = 0, $nodiv = 0, $admin = '1', $morecss /** - * Affiche message erreur system avec toutes les informations pour faciliter le diagnostic et la remontee des bugs. - * On doit appeler cette fonction quand une erreur technique bloquante est rencontree. - * Toutefois, il faut essayer de ne l'appeler qu'au sein de pages php, les classes devant - * renvoyer leur erreur par l'intermediaire de leur propriete "error". + * Displays error message system with all the information to facilitate the diagnosis and the escalation of the bugs. + * This function must be called when a blocking technical error is encountered. + * However, one must try to call it only within php pages, classes must return their error through their property "error". * * @param DoliDB $db Database handler * @param mixed $error String or array of errors strings to show From 1ede09c21ab32fd041c44015da6d5df56aa423e4 Mon Sep 17 00:00:00 2001 From: Alfredo Altamirano Date: Sat, 19 Oct 2019 11:17:53 -0500 Subject: [PATCH 2/4] Fix typo --- htdocs/core/class/html.form.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index e6a6a077cf8..61558434105 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -7129,8 +7129,8 @@ class Form // Left part of banner if ($morehtmlleft) { - if ($conf->browser->layout == 'phone') $ret.='
'.$morehtmlleft.'
'; // class="center" to have photo in middle - else $ret.='
'.$morehtmlleft.'
'; + if ($conf->browser->layout == 'phone') $ret.='
'.$morehtmlleft.'
'; // class="center" to have photo in middle + else $ret.='
'.$morehtmlleft.'
'; } //if ($conf->browser->layout == 'phone') $ret.='
'; From 3902e6ed1ee108592e12493b0ae208720d409ee6 Mon Sep 17 00:00:00 2001 From: Alfredo Altamirano Date: Sat, 19 Oct 2019 11:33:06 -0500 Subject: [PATCH 3/4] Translate documentation --- htdocs/core/class/commoninvoice.class.php | 36 +++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index eb53e327e93..488b7df9d1a 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -219,9 +219,9 @@ abstract class CommonInvoice extends CommonObject } /** - * Renvoie tableau des ids de facture avoir issus de la facture + * Returns array of invoice ids from the invoice * - * @return array Tableau d'id de factures avoirs + * @return array Invoice id array */ public function getListIdAvoirFromInvoice() { @@ -251,10 +251,10 @@ abstract class CommonInvoice extends CommonObject } /** - * Renvoie l'id de la facture qui la remplace + * Returns the id of the invoice that replaces it * - * @param string $option filtre sur statut ('', 'validated', ...) - * @return int <0 si KO, 0 si aucune facture ne remplace, id facture sinon + * @param string $option status filter ('', 'validated', ...) + * @return int <0 si KO, 0 if no invoice replaces it, id of invoice otherwise */ public function getIdReplacingInvoice($option = '') { @@ -264,10 +264,10 @@ abstract class CommonInvoice extends CommonObject $sql.= ' AND type < 2'; if ($option == 'validated') $sql.= ' AND fk_statut = 1'; // PROTECTION BAD DATA - // Au cas ou base corrompue et qu'il y a une facture de remplacement validee - // et une autre non, on donne priorite a la validee. - // Ne devrait pas arriver (sauf si acces concurrentiel et que 2 personnes - // ont cree en meme temps une facture de remplacement pour la meme facture) + // In case the database is corrupted and there is a valid replectement invoice + // and another no, priority is given to the valid one. + // Should not happen (unless concurrent access and 2 people have created a + // replacement invoice for the same invoice at the same time) $sql.= ' ORDER BY fk_statut DESC'; $resql=$this->db->query($sql); @@ -276,12 +276,12 @@ abstract class CommonInvoice extends CommonObject $obj = $this->db->fetch_object($resql); if ($obj) { - // Si il y en a + // If there is any return $obj->rowid; } else { - // Si aucune facture ne remplace + // If no invoice replaces it return 0; } } @@ -544,8 +544,8 @@ abstract class CommonInvoice extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Renvoi une date limite de reglement de facture en fonction des - * conditions de reglements de la facture et date de facturation. + * Returns an invoice payment deadline based on the invoice settlement + * conditions and billing date. * * @param integer $cond_reglement Condition of payment (code or id) to use. If 0, we use current condition. * @return integer Date limite de reglement si ok, <0 si ko @@ -589,14 +589,14 @@ abstract class CommonInvoice extends CommonObject /* Definition de la date limite */ - // 0 : ajout du nombre de jours + // 0 : adding the number of days if ($cdr_type == 0) { $datelim = $this->date + ($cdr_nbjour * 3600 * 24); $datelim += ($cdr_decalage * 3600 * 24); } - // 1 : application de la regle "fin de mois" + // 1 : application of the "end of the month" rule elseif ($cdr_type == 1) { $datelim = $this->date + ($cdr_nbjour * 3600 * 24); @@ -612,13 +612,13 @@ abstract class CommonInvoice extends CommonObject { $mois += 1; } - // On se deplace au debut du mois suivant, et on retire un jour + // We move at the beginning of the next month, and we take a day off $datelim=dol_mktime(12, 0, 0, $mois, 1, $annee); $datelim -= (3600 * 24); $datelim += ($cdr_decalage * 3600 * 24); } - // 2 : application de la règle, le N du mois courant ou suivant + // 2 : application of the rule, the N of the current or next month elseif ($cdr_type == 2 && !empty($cdr_decalage)) { include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -733,7 +733,7 @@ abstract class CommonInvoiceLine extends CommonObjectLine public $total_ttc; /** - * Liste d'options cumulables: + * List of cumulative options: * Bit 0: 0 si TVA normal - 1 si TVA NPR * Bit 1: 0 si ligne normal - 1 si bit discount (link to line into llx_remise_except) * @var int From 9d9961e9360a2aa2e2b8905e79a4d01f15249754 Mon Sep 17 00:00:00 2001 From: Alfredo Altamirano Date: Sat, 19 Oct 2019 11:33:06 -0500 Subject: [PATCH 4/4] Translate documentation --- htdocs/core/class/commoninvoice.class.php | 36 +++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index eb53e327e93..d834fcfe943 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -219,9 +219,9 @@ abstract class CommonInvoice extends CommonObject } /** - * Renvoie tableau des ids de facture avoir issus de la facture + * Returns array of credit note ids from the invoice * - * @return array Tableau d'id de factures avoirs + * @return array Array of credit note ids */ public function getListIdAvoirFromInvoice() { @@ -251,10 +251,10 @@ abstract class CommonInvoice extends CommonObject } /** - * Renvoie l'id de la facture qui la remplace + * Returns the id of the invoice that replaces it * - * @param string $option filtre sur statut ('', 'validated', ...) - * @return int <0 si KO, 0 si aucune facture ne remplace, id facture sinon + * @param string $option status filter ('', 'validated', ...) + * @return int <0 si KO, 0 if no invoice replaces it, id of invoice otherwise */ public function getIdReplacingInvoice($option = '') { @@ -264,10 +264,10 @@ abstract class CommonInvoice extends CommonObject $sql.= ' AND type < 2'; if ($option == 'validated') $sql.= ' AND fk_statut = 1'; // PROTECTION BAD DATA - // Au cas ou base corrompue et qu'il y a une facture de remplacement validee - // et une autre non, on donne priorite a la validee. - // Ne devrait pas arriver (sauf si acces concurrentiel et que 2 personnes - // ont cree en meme temps une facture de remplacement pour la meme facture) + // In case the database is corrupted and there is a valid replectement invoice + // and another no, priority is given to the valid one. + // Should not happen (unless concurrent access and 2 people have created a + // replacement invoice for the same invoice at the same time) $sql.= ' ORDER BY fk_statut DESC'; $resql=$this->db->query($sql); @@ -276,12 +276,12 @@ abstract class CommonInvoice extends CommonObject $obj = $this->db->fetch_object($resql); if ($obj) { - // Si il y en a + // If there is any return $obj->rowid; } else { - // Si aucune facture ne remplace + // If no invoice replaces it return 0; } } @@ -544,8 +544,8 @@ abstract class CommonInvoice extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Renvoi une date limite de reglement de facture en fonction des - * conditions de reglements de la facture et date de facturation. + * Returns an invoice payment deadline based on the invoice settlement + * conditions and billing date. * * @param integer $cond_reglement Condition of payment (code or id) to use. If 0, we use current condition. * @return integer Date limite de reglement si ok, <0 si ko @@ -589,14 +589,14 @@ abstract class CommonInvoice extends CommonObject /* Definition de la date limite */ - // 0 : ajout du nombre de jours + // 0 : adding the number of days if ($cdr_type == 0) { $datelim = $this->date + ($cdr_nbjour * 3600 * 24); $datelim += ($cdr_decalage * 3600 * 24); } - // 1 : application de la regle "fin de mois" + // 1 : application of the "end of the month" rule elseif ($cdr_type == 1) { $datelim = $this->date + ($cdr_nbjour * 3600 * 24); @@ -612,13 +612,13 @@ abstract class CommonInvoice extends CommonObject { $mois += 1; } - // On se deplace au debut du mois suivant, et on retire un jour + // We move at the beginning of the next month, and we take a day off $datelim=dol_mktime(12, 0, 0, $mois, 1, $annee); $datelim -= (3600 * 24); $datelim += ($cdr_decalage * 3600 * 24); } - // 2 : application de la règle, le N du mois courant ou suivant + // 2 : application of the rule, the N of the current or next month elseif ($cdr_type == 2 && !empty($cdr_decalage)) { include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -733,7 +733,7 @@ abstract class CommonInvoiceLine extends CommonObjectLine public $total_ttc; /** - * Liste d'options cumulables: + * List of cumulative options: * Bit 0: 0 si TVA normal - 1 si TVA NPR * Bit 1: 0 si ligne normal - 1 si bit discount (link to line into llx_remise_except) * @var int