diff --git a/core/core.php b/core/core.php index 1c6483d9..83e9091a 100644 --- a/core/core.php +++ b/core/core.php @@ -49,7 +49,7 @@ class common // Numéro de version const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/'; - const ZWII_VERSION = '12.0.00-dev011'; + const ZWII_VERSION = '12.0.00-dev012'; const ZWII_UPDATE_CHANNEL = "test"; public static $actions = []; diff --git a/core/module/translate/translate.php b/core/module/translate/translate.php index ec224e54..a03d33ab 100644 --- a/core/module/translate/translate.php +++ b/core/module/translate/translate.php @@ -420,6 +420,11 @@ class translate extends common // Construction du formulaire + // Chargement des dialogue de la langue cible + if (!isset($data)) { + $data = json_decode(file_get_contents(self::I18N_DIR . $this->getUrl(2) . '.json'), true); + } + // Ajout des champs absents selon la langue de référence $dataFr = json_decode(file_get_contents(self::I18N_DIR . 'fr_FR.json'), true); foreach($dataFr as $key => $value) { @@ -430,9 +435,6 @@ class translate extends common file_put_contents (self::I18N_DIR . $this->getUrl(2) . '.json', json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT), LOCK_EX); // Tableau des chaines à traduire dans la langue sélectionnée - if (!isset($data)) { - $data = json_decode(file_get_contents(self::I18N_DIR . $this->getUrl(2) . '.json'), true); - } foreach ($data as $key => $value) { self::$languagesUiInstalled[$key] = $value; }