From 804341de2df3608f176e3ff13ae11320f1c40e62 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 4 Jun 2021 17:59:21 +0200 Subject: [PATCH] Supp dossier translate --- core/module/translate/ressource/de.png | Bin 119 -> 0 bytes core/module/translate/ressource/en.png | Bin 1208 -> 0 bytes core/module/translate/ressource/es.png | Bin 287 -> 0 bytes core/module/translate/ressource/fr.png | Bin 96 -> 0 bytes core/module/translate/ressource/googtrans.png | Bin 3511 -> 0 bytes core/module/translate/ressource/it.png | Bin 96 -> 0 bytes core/module/translate/ressource/nl.png | Bin 108 -> 0 bytes core/module/translate/ressource/pt.png | Bin 395 -> 0 bytes core/module/translate/translate.php | 110 ---------------- core/module/translate/view/index/index.css | 20 --- core/module/translate/view/index/index.php | 124 ------------------ 11 files changed, 254 deletions(-) delete mode 100755 core/module/translate/ressource/de.png delete mode 100755 core/module/translate/ressource/en.png delete mode 100755 core/module/translate/ressource/es.png delete mode 100755 core/module/translate/ressource/fr.png delete mode 100755 core/module/translate/ressource/googtrans.png delete mode 100755 core/module/translate/ressource/it.png delete mode 100755 core/module/translate/ressource/nl.png delete mode 100755 core/module/translate/ressource/pt.png delete mode 100755 core/module/translate/translate.php delete mode 100755 core/module/translate/view/index/index.css delete mode 100755 core/module/translate/view/index/index.php diff --git a/core/module/translate/ressource/de.png b/core/module/translate/ressource/de.png deleted file mode 100755 index cf8cf1589b7215fddb2054909c41fadc7cd88216..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 119 zcmeAS@N?(olHy`uVBq!ia0vp^azHG?!2~2lPfAS&Qk(@Ik;M!Q+(IDCcpJYDq*vRCwC8Rc%aLWfVTW_m;^ZON@5AX#8O!`iB^(7}3bUvA_mq z%sIozf-_?i0TYK?~7dt+r4UKO#CtbX*YN zyjO1c@voK(*NI?o@Q6eH({Y4}Vu@BdLbRu(&gQxL-7t|YNw3(Qbo=?|th%RNon1h` zzv4Z8s#lVZ5*27PMI5^5;m|BV!~P&YYTL(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zWv9B z-}k2zsOKoc`;R$BK_IYXD2-F3@y|zm?<$T_n)LJCGfSA`+dlX2v4OQ-{~GSIeokYh z!yj2IX3k=Zme`LCab-5Vn_`7HzmI@{pSv>6$fO+fk7(yy`MPB z*4LlSCrV@Vk-U4j#~1z;xjU{K4mLCJ@0t7@_IegTe~DWM4fcb^-< diff --git a/core/module/translate/ressource/nl.png b/core/module/translate/ressource/nl.png deleted file mode 100755 index aeb72b664a768827bd8ca879d0c904b5b34831c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 108 zcmeAS@N?(olHy`uVBq!ia0vp^azHG?!2~2lPfAS&QpTPxjv*e$lOxm@J1QSB$ojIu z;8#ePV6VX8`dN*Ei`&~T?p!-NvqeJW?yk%hw_Z6hH)e(}^DgQ<>FNIf)Xw1P>gTe~ HDWM4f7d9gV diff --git a/core/module/translate/ressource/pt.png b/core/module/translate/ressource/pt.png deleted file mode 100755 index e0619bc9f66ec02e64f3a4f5dda366c0d3d5dbac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 395 zcmV;60d)R}P)f#6Rw}a*Dzy=wXC@zQ!&RBi(iO%@k - * @copyright Copyright (C) 2008-2018, Rémi Jean - * @author Frédéric Tempez - * @copyright Copyright (C) 2018-2021, Frédéric Tempez - * @license GNU General Public License, version 3 - * @link http://zwiicms.fr/ - */ - -class translate extends common { - - public static $actions = [ - /*'config' => self::GROUP_MODERATOR,*/ - 'index' => self::GROUP_MODERATOR, - 'language' => self::GROUP_VISITOR - ]; - - /** - * Configuration - */ - public function index() { - - // Soumission du formulaire - if($this->isPost()) { - // Edtion des langues - foreach (self::$i18nList as $keyi18n => $value) { - if ($keyi18n === 'fr') {continue;} - // Effacement d'une langue installée (dossier plus option désactivée précédemment) - if ( is_dir( self::DATA_DIR . $keyi18n ) === true - AND $this->getInput('translateSiteFlag' . strtoupper($keyi18n) , helper::FILTER_BOOLEAN) === false ) - { - $this->removeDir( self::DATA_DIR . $keyi18n); - } - // Installation d'une langue - if ( $this->getInput('translateSiteFlag' . strtoupper($keyi18n) , helper::FILTER_BOOLEAN) === true ) - { - // Créer le dossier - if (is_dir( self::DATA_DIR . $keyi18n ) === false ) { - mkdir( self::DATA_DIR . $keyi18n); - } - // Charger les modèles - require_once('core/module/install/ressource/defaultdata.php'); - // Nouvelle instance des pages, module, locale - $files = ['page','module','locale']; - foreach ($files as $keyFile) { - echo $keyFile; - $e = new \Prowebcraft\JsonDb([ - 'name' => $keyFile . '.json', - 'dir' => $this->dataPath ($keyFile,$keyi18n) - ]);; - $e->set($keyFile, init::$defaultData[$keyFile]); - $e->save(); - } - } - } - - // Enregistrement des données - $this->setData(['config','translate', [ - 'scriptGoogle' => $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN), - 'showCredits' => $this->getInput('translateCredits', helper::FILTER_BOOLEAN) ? $this->getInput('translateCredits', helper::FILTER_BOOLEAN) : false, - 'autoDetect' => $this->getInput('translateAutoDetect', helper::FILTER_BOOLEAN), - 'admin' => $this->getInput('translateAdmin', helper::FILTER_BOOLEAN), - 'scriptFR' => $this->getInput('translateScriptFlagFR', helper::FILTER_BOOLEAN), - 'scriptDE' => $this->getInput('translateScriptFlagDE', helper::FILTER_BOOLEAN), - 'scriptEN' => $this->getInput('translateScriptFlagEN', helper::FILTER_BOOLEAN), - 'scriptES' => $this->getInput('translateScriptFlagES', helper::FILTER_BOOLEAN), - 'scriptIT' => $this->getInput('translateScriptFlagIT', helper::FILTER_BOOLEAN), - 'scriptNL' => $this->getInput('translateScriptFlagNL', helper::FILTER_BOOLEAN), - 'scriptPT' => $this->getInput('translateScriptFlagPT', helper::FILTER_BOOLEAN), - 'site' => $this->getInput('translateSite', helper::FILTER_BOOLEAN), - 'siteFR' => $this->getInput('translateSiteFlagFR', helper::FILTER_BOOLEAN), - 'siteDE' => $this->getInput('translateSiteFlagDE', helper::FILTER_BOOLEAN), - 'siteEN' => $this->getInput('translateSiteFlagEN', helper::FILTER_BOOLEAN), - 'siteES' => $this->getInput('translateSiteFlagES', helper::FILTER_BOOLEAN), - 'siteIT' => $this->getInput('translateSiteFlagIT', helper::FILTER_BOOLEAN), - 'siteNL' => $this->getInput('translateSiteFlagNL', helper::FILTER_BOOLEAN), - 'sitePT' => $this->getInput('translateSiteFlagPT', helper::FILTER_BOOLEAN) - ]]); - // Valeurs en sortie - $this->addOutput([ - 'redirect' => helper::baseUrl() . $this->getUrl(), - 'notification' => 'Modifications enregistrées', - 'state' => true - ]); - } - // Valeurs en sortie - $this->addOutput([ - 'title' => 'Paramètres', - 'view' => 'index' - ]); - } - - /* - * Traitement du changement de langues - */ - public function language() { - // Transmettre le choix au noyau - setcookie('ZWII_USER_I18N', $this->getUrl(2), time() + 3600, helper::baseUrl(false, false) , '', helper::isHttps(), true); - // Valeurs en sortie sans post - $this->addOutput([ - 'redirect' => helper::baseUrl() . $this->getUrl(3) - ]); - } -} \ No newline at end of file diff --git a/core/module/translate/view/index/index.css b/core/module/translate/view/index/index.css deleted file mode 100755 index 88fe3629..00000000 --- a/core/module/translate/view/index/index.css +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file is part of Zwii. - * - * For full copyright and license information, please see the LICENSE - * file that was distributed with this source code. - * - * @author Rémi Jean - * @copyright Copyright (C) 2008-2018, Rémi Jean - * @author Frédéric Tempez - * @copyright Copyright (C) 2018-2021, Frédéric Tempez - * @license GNU General Public License, version 3 - * @link http://zwiicms.fr/ - */ - - -/** @import url("site/data/admin.css"); */ - -/** NE PAS EFFACER -* admin.css -*/ \ No newline at end of file diff --git a/core/module/translate/view/index/index.php b/core/module/translate/view/index/index.php deleted file mode 100755 index 1dd188b6..00000000 --- a/core/module/translate/view/index/index.php +++ /dev/null @@ -1,124 +0,0 @@ - -
-
- 'buttonGrey', - 'href' => helper::baseUrl(), - 'ico' => 'left', - 'value' => 'Retour' - ]); ?> -
-
- -
-
-
-
-
-

Langues supportées

-
-
- Traduction automatique : -
- $this->getData(['config','translate', 'scriptDE']) - ]); ?> -
-
- $this->getData(['config','translate', 'scriptEN']) - ]); ?> -
-
- $this->getData(['config','translate', 'scriptES']) - ]); ?> -
-
- $this->getData(['config','translate', 'scriptIT']) - ]); ?> -
-
- $this->getData(['config','translate', 'scriptNL']) - ]); ?> -
-
- $this->getData(['config','translate', 'scriptPT']) - ]); ?> -
-
- $this->getData(['config','translate', 'autoDetect']), - 'help' => 'Détecte la langue du navigateur.' - ]); ?> - -
-
-
- Traduction rédigée : -
- $this->getData(['config', 'translate', 'siteEN']) - ]); ?> -
-
- $this->getData(['config', 'translate', 'siteDE']) - ]); ?> -
-
- $this->getData(['config', 'translate', 'siteES']) - ]); ?> -
-
- $this->getData(['config', 'translate', 'siteIT']) - ]); ?> -
-
- $this->getData(['config', 'translate', 'siteNL']) - ]); ?> -
-
- $this->getData(['config', 'translate', 'sitePT']) - ]); ?> -
-
-
-
-
-
-
-
-
-

Paramètres de traduction automatique

-
-
- $this->getData(['config','translate', 'scriptGoogle']) - ]); ?> -
-
- $this->getData(['config','translate', 'admin']), - 'help' => 'Traduction automatique du site et de l\'interface du CMS' - ]); ?> -
-
- $this->getData(['config','translate', 'showCredits']), - 'help' => 'Option vivement recommandée pour le respect du droit d\'auteur' - ]); ?> -
-
-
-
-
- - \ No newline at end of file