From 01abbb8af93cba72959e99656db607b1877608bb Mon Sep 17 00:00:00 2001 From: Frank Cools Date: Thu, 9 Oct 2025 00:21:28 +0200 Subject: [PATCH] Fix translation function - use dol_translate() instead of dol_gettext() - Replace dol_gettext() with dol_translate() which is the correct Dolibarr function - Fix fatal error: Call to undefined function dol_gettext() - Use proper Dolibarr translation function for journal labels --- core/class/declarationtva.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/class/declarationtva.class.php b/core/class/declarationtva.class.php index b4fbafb..e32f1da 100644 --- a/core/class/declarationtva.class.php +++ b/core/class/declarationtva.class.php @@ -1269,7 +1269,7 @@ class DeclarationTVA $journal_label_result = $this->db->query($journal_label_sql); if ($journal_label_result && $this->db->num_rows($journal_label_result) > 0) { $journal_label_obj = $this->db->fetch_object($journal_label_result); - $translated_label = dol_gettext($journal_label_obj->label); + $translated_label = dol_translate($journal_label_obj->label); $debit->journal_label = $translated_label; error_log("DEBUG: Retrieved journal label: " . $journal_label_obj->label . " -> " . $translated_label); } else { @@ -1324,7 +1324,7 @@ class DeclarationTVA $journal_label_result = $this->db->query($journal_label_sql); if ($journal_label_result && $this->db->num_rows($journal_label_result) > 0) { $journal_label_obj = $this->db->fetch_object($journal_label_result); - $translated_label = dol_gettext($journal_label_obj->label); + $translated_label = dol_translate($journal_label_obj->label); $credit->journal_label = $translated_label; error_log("DEBUG: Retrieved journal label: " . $journal_label_obj->label . " -> " . $translated_label); } else {