diff --git a/core/core.php b/core/core.php index 5f308f20..771ffa53 100755 --- a/core/core.php +++ b/core/core.php @@ -44,7 +44,7 @@ class common { const ACCESS_TIMER = 1800; // Numéro de version - const ZWII_VERSION = '10.4.00.009'; + const ZWII_VERSION = '10.4.00.010'; const ZWII_UPDATE_CHANNEL = "v10"; public static $actions = []; diff --git a/core/module/translate/translate.php b/core/module/translate/translate.php index d8a2a86a..576ac36a 100755 --- a/core/module/translate/translate.php +++ b/core/module/translate/translate.php @@ -38,6 +38,7 @@ class translate extends common { setrawcookie('googtrans', '/fr/fr', time() + 3600, helper::baseUrl()); $_SESSION['googtrans'] = '/fr/fr'; } + $script = $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN); // Edition des langues foreach (self::$i18nList as $keyi18n => $value) { if ($keyi18n === 'fr') {continue;} @@ -68,21 +69,25 @@ class translate extends common { } } } + // Active le script si une langue est en trad auto + if ($script === false + AND $this->getInput('translate'. strtoupper($keyi18n)) === 'script') { + $script = true; + } } - // Enregistrement des données $this->setData(['config','translate', [ - 'scriptGoogle' => $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN), + 'scriptGoogle' => $script, 'showCredits' => $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN) ? $this->getInput('translateCredits', helper::FILTER_BOOLEAN) : false, 'autoDetect' => $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN) ? $this->getInput('translateAutoDetect', helper::FILTER_BOOLEAN) : false, 'admin' => $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN) ? $this->getInput('translateAdmin', helper::FILTER_BOOLEAN) : false, - 'fr' => $this->getInput('translateFR'), - 'de' => ($this->getInput('translateDE') === 'script' AND $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN) === false) ? 'none' : $this->getInput('translateDE'), - 'en' => ($this->getInput('translateEN') === 'script' AND $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN) === false) ? 'none' : $this->getInput('translateEN'), - 'es' => ($this->getInput('translateES') === 'script' AND $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN) === false) ? 'none' : $this->getInput('translateES'), - 'it' => ($this->getInput('translateIT') === 'script' AND $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN) === false) ? 'none' : $this->getInput('translateIT'), - 'nl' => ($this->getInput('translateNL') === 'script' AND $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN) === false) ? 'none' : $this->getInput('translateNL'), - 'pt' => ($this->getInput('translatePT') === 'script' AND $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN) === false) ? 'none' : $this->getInput('translatePT') + 'fr' => $this->getInput('translateFR'), + 'de' => $this->getInput('translateDE'), + 'en' => $this->getInput('translateEN'), + 'es' => $this->getInput('translateES'), + 'it' => $this->getInput('translateIT'), + 'nl' => $this->getInput('translateNL'), + 'pt' => $this->getInput('translatePT') ]]); // Valeurs en sortie @@ -94,7 +99,7 @@ class translate extends common { } // Valeurs en sortie $this->addOutput([ - 'title' => 'Paramètres', + 'title' => 'Gestion des langues', 'view' => 'index' ]); } diff --git a/core/module/translate/view/index/index.php b/core/module/translate/view/index/index.php index b7fe378d..832bdbc9 100755 --- a/core/module/translate/view/index/index.php +++ b/core/module/translate/view/index/index.php @@ -15,41 +15,7 @@