diff --git a/core/core.php b/core/core.php index 8c2496ff..b04fc6ce 100644 --- a/core/core.php +++ b/core/core.php @@ -47,7 +47,7 @@ class common { // Numéro de version const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/'; - const ZWII_VERSION = '11.6.00-dev002'; + const ZWII_VERSION = '11.6.00-dev003'; const ZWII_UPDATE_CHANNEL = "test"; public static $actions = []; @@ -301,35 +301,6 @@ class common { $this->user = $this->getData(['user', $this->getInput('ZWII_USER_ID')]); } - /** - * Traduction du site par script - * Traduction par clic sur le drapeau OU - * Traduction automatisée - * - Exclure la traduction manuelle - * - La mangue du navigateur est lisible - * - L'auto-détection est active - */ - - if ( $this->getData(['config', 'i18n', 'enable']) === true - AND $this->getData(['config', 'i18n','scriptGoogle']) === true - AND $this->getData(['config', 'i18n','autoDetect']) === true - AND $this->getInput('ZWII_I18N_SITE') !== '' - AND !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) ) - { - /** - * Le cookie est prioritaire sur le navigateur - * la traduction est celle de la langue du drapeau - * */ - if ( $this->getInput('ZWII_I18N_SCRIPT') !== substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2 ) ) { - setrawcookie('googtrans', '/fr/'.substr( $_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2 ), time() + 3600, helper::baseUrl(false, false)); - } else { - // Langue du drapeau si elle est définie - if ( $this->getInput('ZWII_I18N_SCRIPT') !== '' ) { - // Paramètre du script - setrawcookie("googtrans", '/fr/'. $this->getInput('ZWII_I18N_SCRIPT') , time() + 3600, helper::baseUrl(false,false)); - } - } - } // Construit la liste des pages parents/enfants if($this->hierarchy['all'] === []) { @@ -1361,23 +1332,6 @@ class common { echo $this->output['content']; - /** - * Affiche les crédits, conditions requis : - * La traduction est active et le site n'est pas en français. - * La fonction est activée. - */ - if ( $this->getData(['config', 'i18n', 'enable']) === true - AND $this->getData(['config', 'i18n','scriptGoogle']) === true - AND $this->getData(['config', 'i18n','showCredits']) === true - AND - // et la traduction n'est pas manuelle - ( $this->getInput('ZWII_I18N_SCRIPT') - AND $this->getData(['config', 'i18n', $this->getInput('ZWII_I18N_SCRIPT')]) === 'script' - ) - ) - { - echo ''; - } } /** @@ -2164,25 +2118,12 @@ class common { public function showi18n() { foreach (self::$i18nList as $key => $value) { - if ($this->getData(['config', 'i18n', $key]) === 'site' - OR ( - // Le script de traduction est actif et la langue est traduite par script - $this->getData(['config', 'i18n','scriptGoogle']) === true - AND $this->getData(['config', 'i18n', $key]) === 'script' - // Le drapeau n'est pas actif pour les non admin en mode connecté. - AND - ( $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') - OR $this->getUser('group') === self::GROUP_ADMIN ) - ) - ) { + if ($this->getData(['config', 'i18n', $key]) === 'site' ) + { if ( (isset($_COOKIE['ZWII_I18N_SITE'] ) - AND $_COOKIE['ZWII_I18N_SITE'] === $key - ) - OR - ( isset($_COOKIE['ZWII_I18N_SCRIPT']) - AND $_COOKIE['ZWII_I18N_SCRIPT'] === $key - ) ) { + AND $_COOKIE['ZWII_I18N_SITE'] === $key ) + ) { $select = ' class="i18nFlagSelected" '; } else { $select = ' class="i18nFlag" '; @@ -2996,34 +2937,6 @@ class core extends common { } } - // Chargement de la bibliothèque googtrans - - // Le script de traduction est sélectionné - if ($this->getData(['config', 'i18n', 'enable']) === true) { - if ( $this->getData(['config', 'i18n','scriptGoogle']) === true - // et la traduction de la langue courante est automatique - AND ( $this->getInput('ZWII_I18N_SCRIPT') !== '' - // Ou traduction automatique - OR $this->getData(['config', 'i18n','autoDetect']) === true - ) - // Cas des pages d'administration - // Pas connecté - AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') - AND $this->getUrl(1) !== 'login' - // Ou connecté avec option active - OR ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD') - AND $this->getData(['config', 'i18n','admin']) === true - ) - - ) { - - // Chargement de la librairie - $this->addOutput([ - 'vendor' => array_merge($this->output['vendor'], ['i18n']) - ]); - - } - } // Erreurs if($access === 'login') { diff --git a/core/include/update.inc.php b/core/include/update.inc.php index 6fab14f9..f3ba5c53 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -865,6 +865,25 @@ if ($this->getData(['core', 'dataVersion']) < 11600) { $this->deleteData(['locale', 'cookies', 'gaLabel']); $this->deleteData(['locale', 'cookies', 'checkboxGaLabel']); + // Suppression Google Translate + helper::deleteCookie('ZWII_I18N_SCRIPT'); + $this->deleteData(['config','i18n', 'scriptGoogle']); + $this->deleteData(['config','i18n', 'showCredits']); + $this->deleteData(['config','i18n', 'autoDetect']); + $this->removeDir('core/vendor/i18n/css'); + // Nettoyage + if (file_exists('core/module/translate/ressource/googtrans.png')){ + unlink('core/module/translate/ressource/googtrans.png'); + } + if (file_exists('core/vendor/i18n/inc.json')){ + unlink('core/vendor/i18n/inc.json'); + } + if (file_exits('core/vendor/i18n/translate.js')){ + unlink('core/vendor/i18n/translate.js');} + if (file_exists('core/vendor/i18n/translation.js')){ + unlink('core/vendor/i18n/translation.js'); + } + // Mise à jour $this->setData(['core', 'dataVersion', 11600]); } diff --git a/core/layout/common.css b/core/layout/common.css index 16550540..65403513 100755 --- a/core/layout/common.css +++ b/core/layout/common.css @@ -1720,30 +1720,6 @@ th.col12 { } -/* Traduction auto */ -/* -* Supprimer Le tooltip Google -* -.goog-tooltip { - display: none !important; -} -.goog-tooltip:hover { - display: none !important; -} -.goog-text-highlight { - background-color: transparent !important; - border: none !important; - box-shadow: none !important; -} */ - -/* Emplacement des conditions d'utilisation */ -#googTransLogo { - float: right; -} -#googTransLogo img { - width: 60%; -} - /* Bannière masquable en petit écran*/ @media screen and (max-width: 768px) { .bannerDisplay{ diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index c41a1d47..73cc28e5 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -42,10 +42,6 @@ class init extends common { ], 'i18n' => [ 'enable'=> true, - 'scriptGoogle'=> false, - 'showCredits'=> false, - 'autoDetect'=> false, - 'admin'=> false, 'fr'=> 'none', 'de'=> 'none', 'en'=> 'none', diff --git a/core/module/translate/translate.php b/core/module/translate/translate.php index f929870a..f0992616 100644 --- a/core/module/translate/translate.php +++ b/core/module/translate/translate.php @@ -97,12 +97,6 @@ class translate extends common { // Soumission du formulaire if($this->isPost()) { - // Désactivation du script Google - $script = $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN); - if ($script === false) { - setrawcookie('googtrans', '/fr/fr', time() + 3600, helper::baseUrl(false,false)); - $_SESSION['googtrans'] = '/fr/fr'; - } // Edition des langues foreach (self::$i18nList as $keyi18n => $value) { if ($keyi18n === 'fr') continue; @@ -114,7 +108,6 @@ class translate extends common { $this->removeDir( self::DATA_DIR . $keyi18n); // Au cas ou la langue est sélectionnée helper::deleteCookie('ZWII_I18N_SITE'); - helper::deleteCookie('ZWII_I18N_SCRIPT'); } // Active le script si une langue est en trad auto @@ -127,10 +120,6 @@ class translate extends common { // Enregistrement des données $this->setData(['config','i18n', [ 'enable' => $this->getData(['config', 'i18n', 'enable']), - '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'), 'en' => $this->getInput('translateEN'), @@ -152,7 +141,6 @@ class translate extends common { if ($this->getData(['config','i18n',$key]) === 'site') { self::$translateOptions [$key] = [ 'none' => 'Drapeau masqué', - 'script' => 'Traduction automatique', 'site' => 'Traduction rédigée', 'delete' => 'Supprimer la traduction' ]; @@ -160,7 +148,6 @@ class translate extends common { } else { self::$translateOptions [$key] = [ 'none' => 'Drapeau masqué', - 'script' => 'Traduction automatique', 'site' => 'Traduction rédigée' ]; } @@ -183,18 +170,11 @@ class translate extends common { if ( $this->getInput('ZWII_I18N_' . strtoupper($this->getUrl(3))) !== $this->getUrl(2) ) { // Nettoyer et stocker le choix de l'utilisateur helper::deleteCookie('ZWII_I18N_SITE'); - helper::deleteCookie('ZWII_I18N_SCRIPT'); // Sélectionner setcookie('ZWII_I18N_' . strtoupper($this->getUrl(3)) , $this->getUrl(2), time() + 3600, helper::baseUrl(false, false) , '', helper::isHttps(), true); - setrawcookie('googtrans', '/fr/' . $this->getUrl(2), time() + 3600, helper::baseUrl(false,false)); - $_SESSION['googtrans'] = '/fr/' . $this->getUrl(2); // Désactivation du drapeau, langue FR par défaut } else { setcookie('ZWII_I18N_SITE' , 'fr', time() + 3600, helper::baseUrl(false, false) , '', helper::isHttps(), true); - helper::deleteCookie('ZWII_I18N_SCRIPT'); - // Désactivation du script Google - setrawcookie('googtrans', '/fr/fr', time() + 3600, helper::baseUrl(false,false)); - $_SESSION['googtrans'] = '/fr/fr'; } // Valeurs en sortie diff --git a/core/module/translate/view/index/index.php b/core/module/translate/view/index/index.php index fabc4e6a..9679894d 100644 --- a/core/module/translate/view/index/index.php +++ b/core/module/translate/view/index/index.php @@ -28,37 +28,6 @@ -
-
-
-

Traduction automatique

-
-
- $this->getData(['config','i18n', 'scriptGoogle']), - 'help' => 'Le script Google Translate assure la traduction automatique du site.' - ]); ?> -
-
- $this->getData(['config','i18n', 'autoDetect']), - 'class' => 'translateGoogleScriptOption', - 'help' => 'Détecte la langue du navigateur, dans ce mode il n\'est pas nécessaire d\'afficher les drapeaux.' - ]); ?> -
-
-
-
- $this->getData(['config','i18n', 'showCredits']), - 'class' => 'translateGoogleScriptOption', - 'help' => 'Option recommandée pour le respect du droit d\'auteur' - ]); ?> -
-
-
-
-
diff --git a/core/vendor/i18n/css/translateelement.css b/core/vendor/i18n/css/translateelement.css deleted file mode 100755 index 39f02047..00000000 --- a/core/vendor/i18n/css/translateelement.css +++ /dev/null @@ -1,990 +0,0 @@ -/* Copyright 2019 Google Inc. All Rights Reserved. */ - -body { - top: 0px !important; -} - -.goog-te-banner-frame { - left: 0px; - top: -50px !important; - height: 39px; - width: 100%; - z-index: 10000001; - position: fixed; - border: none !important; - border-bottom: 1px solid #6b90da; - margin: 0; - -moz-box-shadow: 0 0 8px 1px #999999; - -webkit-box-shadow: 0 0 8px 1px #999999; - box-shadow: 0 0 8px 1px #999999; - _position: absolute; -} - -.goog-te-menu-frame { - z-index: 10000002; - position: fixed; - border: none; - -moz-box-shadow: 0 3px 8px 2px #999999; - -webkit-box-shadow: 0 3px 8px 2px #999999; - box-shadow: 0 3px 8px 2px #999999; - _position: absolute; -} - -.goog-te-ftab-frame { - z-index: 10000000; - border: none; - margin: 0; -} - -.goog-te-gadget { - font-family: arial; - font-size: 0px !important; - color: transparent !important; - white-space: nowrap; -margin-right: 0px !important; -margin-top: 2px !important; -margin-bottom: 0px !important; -width: 160px; -margin-left: 15px; -padding-right: 5px; -} - -.goog-te-gadget img { - vertical-align: middle; - border: none; -} - -.goog-te-gadget-simple { - background-color: #fff; - border-left: 1px solid #d5d5d5; - border-top: 1px solid #9b9b9b; - border-bottom: 1px solid #e8e8e8; - border-right: 1px solid #d5d5d5; - font-size: 10pt; - display: inline-block; - padding-top: 1px; - padding-bottom: 2px; - cursor: pointer; - zoom: 1; - *display: inline; -} - -.goog-te-gadget-icon { - margin-left: 2px; - margin-right: 2px; - width: 19px; - height: 19px; - border: none; - vertical-align: middle; -} - -.goog-te-combo { - margin-left: 4px; - margin-right: 4px; - vertical-align: baseline; - *vertical-align: middle; -} - -.goog-te-gadget .goog-te-combo { - margin: 4px 0; - margin-left: 4px; -background-color: #d8d8d8; -} - -.goog-logo-link, -.goog-logo-link:link, -.goog-logo-link:visited, -.goog-logo-link:hover, -.goog-logo-link:active { - font-size: 12px; - font-weight: bold; - color: #444; - text-decoration: none; - display: none !important; -} - -.goog-te-banner .goog-logo-link, -.goog-close-link { - display: block; - margin: 0px 10px; -} - -.goog-te-banner .goog-logo-link { - padding-top: 2px; - padding-left: 4px; -} - -.goog-te-combo, -.goog-te-banner *, -.goog-te-ftab *, -.goog-te-menu *, -.goog-te-menu2 *, -.goog-te-balloon * { - font-family: arial; - font-size: 10pt; -} - -.goog-te-banner { - margin: 0; - background-color: #e4effb; - overflow: hidden; -} - -.goog-te-banner img { - border: none; -} - -.goog-te-banner-content { - color: #000; -} - -.goog-te-banner-content img { - vertical-align: middle -} - -.goog-te-banner-info { - color: #666; - vertical-align: top; - margin-top: 0px; - font-size: 7pt; -} - -.goog-te-banner-margin { - width: 8px; -} - -.goog-te-button { - border-color: #e7e7e7; - border-style: none solid solid none; - border-width: 0 1px 1px 0; -} - -.goog-te-button div { - border-color: #cccccc #999999 #999999 #cccccc; - border-right: 1px solid #999999; - border-style: solid; - border-width: 1px; - height: 20px; -} - -.goog-te-button button { - background: transparent; - border: none; - cursor: pointer; - height: 20px; - overflow: hidden; - margin: 0; - vertical-align: top; - white-space: nowrap; -} - -.goog-te-button button:active { - background: none repeat scroll 0 0 #cccccc; -} - -.goog-te-ftab { - margin: 0px; - background-color: #fff; - white-space: nowrap; -} - -.goog-te-ftab-link { - text-decoration: none; - font-weight: bold; - font-size: 10pt; - border: 1px outset #888; - padding: 6px 10px; - white-space: nowrap; - position: absolute; - left: 0px; - top: 0px; -} - -.goog-te-ftab-link img { - margin-left: 2px; - margin-right: 2px; - width: 19px; - height: 19px; - border: none; - vertical-align: middle; -} - -.goog-te-ftab-link span { - text-decoration: underline; - margin-left: 2px; - margin-right: 2px; - vertical-align: middle; -} - -.goog-float-top .goog-te-ftab-link { - padding: 2px 2px; - border-top-width: 0px; -} - -.goog-float-bottom .goog-te-ftab-link { - padding: 2px 2px; - border-bottom-width: 0px; -} - -.goog-te-menu-value { - text-decoration: none; - color: #0000cc; - white-space: nowrap; - margin-left: 4px; - margin-right: 4px; -} - -.goog-te-menu-value span { - text-decoration: underline -} - -.goog-te-menu-value img { - margin-left: 2px; - margin-right: 2px; -} - -.goog-te-gadget-simple .goog-te-menu-value { - color: #000; -} - -.goog-te-gadget-simple .goog-te-menu-value span { - text-decoration: none; -} - -.goog-te-menu { - background-color: #ffffff; - text-decoration: none; - border: 2px solid #c3d9ff; - overflow-y: scroll; - overflow-x: hidden; - position: absolute; - left: 0; - top: 0; -} - -.goog-te-menu-item { - padding: 3px; - text-decoration: none; -} - -.goog-te-menu-item, -.goog-te-menu-item:link { - color: #0000cc; - background: #ffffff; -} - -.goog-te-menu-item:visited { - color: #551a8b; -} - -.goog-te-menu-item:hover { - background: #c3d9ff; -} - -.goog-te-menu-item:active { - color: #0000cc; -} - -.goog-te-menu2 { - background-color: #ffffff; - text-decoration: none; - border: 1px solid #6b90da; - overflow: hidden; - padding: 4px; -} - -.goog-te-menu2-colpad { - width: 16px; -} - -.goog-te-menu2-separator { - margin: 6px 0; - height: 1px; - background-color: #aaa; - overflow: hidden; -} - -.goog-te-menu2-item div, -.goog-te-menu2-item-selected div { - padding: 4px; -} - -.goog-te-menu2-item .indicator { - display: none; -} - -.goog-te-menu2-item-selected .indicator { - display: auto; -} - -.goog-te-menu2-item-selected .text { - padding-left: 4px; - padding-right: 4px; -} - -.goog-te-menu2-item, -.goog-te-menu2-item-selected { - text-decoration: none; -} - -.goog-te-menu2-item div, -.goog-te-menu2-item:link div, -.goog-te-menu2-item:visited div, -.goog-te-menu2-item:active div { - color: #0000cc; - background: #ffffff; -} - -.goog-te-menu2-item:hover div { - color: #ffffff; - background: #3366cc; -} - -.goog-te-menu2-item-selected div, -.goog-te-menu2-item-selected:link div, -.goog-te-menu2-item-selected:visited div, -.goog-te-menu2-item-selected:hover div, -.goog-te-menu2-item-selected:active div { - color: #000; - font-weight: bold; -} - -.goog-te-balloon { - background-color: #ffffff; - overflow: hidden; - padding: 8px; - border: none; - -moz-border-radius: 10px; - border-radius: 10px; -} - -.goog-te-balloon-frame { - background-color: #ffffff; - border: 1px solid #6b90da; - -moz-box-shadow: 0 3px 8px 2px #999999; - -webkit-box-shadow: 0 3px 8px 2px #999999; - box-shadow: 0 3px 8px 2px #999999; - -moz-border-radius: 8px; - border-radius: 8px; -} - -.goog-te-balloon img { - border: none -} - -.goog-te-balloon-text { - margin-top: 6px; -} - -.goog-te-balloon-zippy { - margin-top: 6px; - white-space: nowrap; -} - -.goog-te-balloon-zippy * { - vertical-align: middle; -} - -.goog-te-balloon-zippy .minus { - background-image: url(//www.google.com/images/zippy_minus_sm.gif); -} - -.goog-te-balloon-zippy .plus { - background-image: url(//www.google.com/images/zippy_plus_sm.gif); -} - -.goog-te-balloon-zippy span { - color: #00c; - text-decoration: underline; - cursor: pointer; - margin: 0 4px; -} - -.goog-te-balloon-form { - margin: 6px 0 0 0; -} - -.goog-te-balloon-form form { - margin: 0; -} - -.goog-te-balloon-form form textarea { - margin-bottom: 4px; - width: 100%; -} - -.goog-te-balloon-footer { - margin: 6px 0 4px 0; -} - -.goog-te-spinner-pos { - z-index: 1000; - position: fixed; - transition-delay: 0.6s; - left: -1000px; - top: -1000px; -} - -.goog-te-spinner-animation { - background: #ccc; - display: flex; - align-items: center; - justify-content: center; - width: 104px; - height: 104px; - border-radius: 50px; - background: #fff url(//www.gstatic.com/images/branding/product/2x/translate_24dp.png) 50% 50% no-repeat; - transition: all 0.6s ease-in-out; - transform: scale(0.4); - opacity: 0; -} - -.goog-te-spinner-animation-show { - transform: scale(0.5); - opacity: 1; -} - -.goog-te-spinner { - margin: 2px 0 0 2px; - animation: goog-te-spinner-rotator 1.4s linear infinite; -} - -@keyframes goog-te-spinner-rotator { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(270deg); - } -} - -.goog-te-spinner-path { - stroke-dasharray: 187; - stroke-dashoffset: 0; - stroke: #4285f4; - transform-origin: center; - animation: goog-te-spinner-dash 1.4s ease-in-out infinite; -} - -@keyframes goog-te-spinner-dash { - 0% { - stroke-dashoffset: 187; - } - 50% { - stroke-dashoffset: 46.75; - transform: rotate(135deg) - } - 100% { - stroke-dashoffset: 187; - transform: rotate(450deg) - } -} - -#goog-gt-tt html, -#goog-gt-tt body, -#goog-gt-tt div, -#goog-gt-tt span, -#goog-gt-tt iframe, -#goog-gt-tt h1, -#goog-gt-tt h2, -#goog-gt-tt h3, -#goog-gt-tt h4, -#goog-gt-tt h5, -#goog-gt-tt h6, -#goog-gt-tt p, -#goog-gt-tt a, -#goog-gt-tt img, -#goog-gt-tt ol, -#goog-gt-tt ul, -#goog-gt-tt li, -#goog-gt-tt table, -#goog-gt-tt form, -#goog-gt-tt tbody, -#goog-gt-tt tr, -#goog-gt-tt td { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; - text-align: left; - line-height: normal; -display: none; -} - -#goog-gt-tt ol, -#goog-gt-tt ul { - list-style: none; -} - -#goog-gt-tt table { - border-collapse: collapse; - border-spacing: 0; -} - -#goog-gt-tt caption, -#goog-gt-tt th, -#goog-gt-tt td { - text-align: left; - font-weight: normal; -} - -#goog-gt-tt input::-moz-focus-inner { - border: 0; -} - - - -#goog-gt-tt .original-text, -.gt-hl-layer { - clear: both; - font-size: 10pt; - position: relative; - text-align: justify; - width: 100%; -} - -#goog-gt-tt .title { - color: #999; - font-family: arial, sans-serif; - margin: 4px 0; - text-align: left; -} - -#goog-gt-tt .close-button { - display: none; -} - -#goog-gt-tt .logo { - float: left; - margin: 0px; -} - -#goog-gt-tt .activity-links { - display: inline-block; -} - -#goog-gt-tt .started-activity-container { - display: none; - width: 100%; -} - -#goog-gt-tt .activity-root { - margin-top: 20px; -} - -#goog-gt-tt .left { - float: left; -} - -#goog-gt-tt .right { - float: right; -} - -#goog-gt-tt .bottom { - min-height: 15px; - position: relative; - height: 1%; -} - -#goog-gt-tt .status-message { - background: -moz-linear-gradient(top, #29910d 0%, #20af0e 100%); - background: -webkit-linear-gradient(top, #29910d 0%, #20af0e 100%); - background: -o-linear-gradient(top, #29910d 0%, #20af0e 100%); - background: -ms-linear-gradient(top, #29910d 0%, #20af0e 100%); - background: linear-gradient(top, #29910d 0%, #20af0e 100%); - background: #29910d; - border-radius: 4px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - box-shadow: inset 0px 2px 2px #1e6609; - -moz-box-shadow: inset 0px 2px 2px #1e6609; - -webkit-box-shadow: inset 0px 2px 2px #1e6609; - color: white; - font-size: 9pt; - font-weight: bolder; - margin-top: 12px; - padding: 6px; - text-shadow: 1px 1px 1px #1e6609; -} - -#goog-gt-tt .activity-link { - color: #1155cc; - cursor: pointer; - font-family: arial; - font-size: 11px; - margin-right: 15px; - text-decoration: none; -} - -#goog-gt-tt textarea { - font-family: arial; - resize: vertical; - width: 100%; - margin-bottom: 10px; - -webkit-border-radius: 1px; - -moz-border-radius: 1px; - border-radius: 1px; - border: 1px solid #d9d9d9; - border-top: 1px solid silver; - font-size: 13px; - height: auto; - overflow-y: auto; - padding: 1px; -} - -#goog-gt-tt textarea:focus { - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3); - -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3); - border: 1px solid #4d90fe; - outline: none; -} - -#goog-gt-tt .activity-cancel { - margin-right: 10px; -} - -#goog-gt-tt .translate-form { - min-height: 25px; - vertical-align: middle; - padding-top: 8px; -} - -#goog-gt-tt .translate-form .activity-form { - margin-bottom: 5px; - margin-bottom: 0px; -} - -#goog-gt-tt .translate-form .activity-form input { - display: inline-block; - min-width: 54px; - *min-width: 70px; - border: 1px solid #dcdcdc; - border: 1px solid rgba(0, 0, 0, 0.1); - text-align: center; - color: #444; - font-size: 11px; - font-weight: bold; - height: 27px; - outline: 0; - padding: 0 8px; - vertical-align: middle; - line-height: 27px; - margin: 0 16px 0 0; - box-shadow: 0 1px 2px rgba(0, 0, 0, .1); - -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .1); - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .1); - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - -webkit-transition: all 0.218s; - -moz-transition: all 0.218s; - -o-transition: all 0.218s; - transition: all 0.218s; - background-color: #f5f5f5; - background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#f1f1f1)); - background-image: -webkit-linear-gradient(top, #f5f5f5, #f1f1f1); - background-image: -moz-linear-gradient(top, #f5f5f5, #f1f1f1); - background-image: -ms-linear-gradient(top, #f5f5f5, #f1f1f1); - background-image: -o-linear-gradient(top, #f5f5f5, #f1f1f1); - background-image: linear-gradient(top, #f5f5f5, #f1f1f1); - -webkit-user-select: none; - -moz-user-select: none; - cursor: default; -} - -#goog-gt-tt .translate-form .activity-form input:hover { - border: 1px solid #c6c6c6; - color: #222; - -webkit-transition: all 0.0s; - -moz-transition: all 0.0s; - -o-transition: all 0.0s; - transition: all 0.0s; - background-color: #f8f8f8; - background-image: -webkit-gradient(linear, left top, left bottom, from(#f8f8f8), to(#f1f1f1)); - background-image: -webkit-linear-gradient(top, #f8f8f8, #f1f1f1); - background-image: -moz-linear-gradient(top, #f8f8f8, #f1f1f1); - background-image: -ms-linear-gradient(top, #f8f8f8, #f1f1f1); - background-image: -o-linear-gradient(top, #f8f8f8, #f1f1f1); - background-image: linear-gradient(top, #f8f8f8, #f1f1f1); -} - -#goog-gt-tt .translate-form .activity-form input:active { - border: 1px solid #c6c6c6; - color: #333; - background-color: #f6f6f6; - background-image: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#f1f1f1)); - background-image: -webkit-linear-gradient(top, #f6f6f6, #f1f1f1); - background-image: -moz-linear-gradient(top, #f6f6f6, #f1f1f1); - background-image: -ms-linear-gradient(top, #f6f6f6, #f1f1f1); - background-image: -o-linear-gradient(top, #f6f6f6, #f1f1f1); - background-image: linear-gradient(top, #f6f6f6, #f1f1f1); -} - -#goog-gt-tt .translate-form .activity-form input:focus #goog-gt-tt .translate-form .activity-form input.focus #goog-gt-tt .translate-form .activity-form input:active, -#goog-gt-tt .translate-form .activity-form input:focus:active, -#goog-gt-tt .translate-form .activity-form input:.focus:active { - box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5); - -webkit-box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5); - -moz-box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5); -} - -#goog-gt-tt .translate-form .activity-form input:focus, -#goog-gt-tt .translate-form .activity-form input.focus { - outline: none; - border: 1px solid #4d90fe; - z-index: 4!important; -} - -#goog-gt-tt .translate-form .activity-form input.selected { - background-color: #eeeeee; - background-image: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), to(#e0e0e0)); - background-image: -webkit-linear-gradient(top, #eeeeee, #e0e0e0); - background-image: -moz-linear-gradient(top, #eeeeee, #e0e0e0); - background-image: -ms-linear-gradient(top, #eeeeee, #e0e0e0); - background-image: -o-linear-gradient(top, #eeeeee, #e0e0e0); - background-image: linear-gradient(top, #eeeeee, #e0e0e0); - -webkit-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.1); - box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.1); - border: 1px solid #ccc; - color: #333; -} - -#goog-gt-tt .translate-form .activity-form input.activity-submit { - color: white; - border-color: #3079ed; - background-color: #4d90fe; - background-image: -webkit-gradient(linear, left top, left bottom, from(#4d90fe), to(#4787ed)); - background-image: -webkit-linear-gradient(top, #4d90fe, #4787ed); - background-image: -moz-linear-gradient(top, #4d90fe, #4787ed); - background-image: -ms-linear-gradient(top, #4d90fe, #4787ed); - background-image: -o-linear-gradient(top, #4d90fe, #4787ed); - background-image: linear-gradient(top, #4d90fe, #4787ed); -} - -#goog-gt-tt .translate-form .activity-form input.activity-submit:hover #goog-gt-tt .translate-form .activity-form input.activity-submit:focus, -#goog-gt-tt .translate-form .activity-form input.activity-submit.focus #goog-gt-tt .translate-form .activity-form input.activity-submit:active { - border-color: #3079ed; - background-color: #357ae8; - background-image: -webkit-gradient(linear, left top, left bottom, from(#4d90fe), to(#357ae8)); - background-image: -webkit-linear-gradient(top, #4d90fe, #357ae8); - background-image: -moz-linear-gradient(top, #4d90fe, #357ae8); - background-image: -ms-linear-gradient(top, #4d90fe, #357ae8); - background-image: -o-linear-gradient(top, #4d90fe, #357ae8); - background-image: linear-gradient(top, #4d90fe, #357ae8); -} - -#goog-gt-tt .translate-form .activity-form input.activity-submit:hover { - box-shadow: inset 0 0 0 1px #fff, 0px 1px 1px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0 0 0 1px #fff, 0px 1px 1px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0 0 0 1px #fff, 0px 1px 1px rgba(0, 0, 0, 0.1); -} - -#goog-gt-tt .translate-form .activity-form input:focus, -#goog-gt-tt .translate-form .activity-form input.focus, -#goog-gt-tt .translate-form .activity-form input:active, -#goog-gt-tt .translate-form .activity-form input:hover, -#goog-gt-tt .translate-form .activity-form input.activity-submit:focus, -#goog-gt-tt .translate-form .activity-form input.activity-submit.focus, -#goog-gt-tt .translate-form .activity-form input.activity-submit:active, -#goog-gt-tt .translate-form .activity-form input.activity-submit:hover { - border-color: #3079ed; -} - -#goog-gt-tt .gray { - color: #999; - font-family: arial, sans-serif -} - -#goog-gt-tt .alt-helper-text { - color: #999; - font-size: 11px; - font-family: arial, sans-serif; - margin: 15px 0px 5px 0px; -} - -#goog-gt-tt .alt-error-text { - color: #800; - display: none; - font-size: 9pt; -} - -.goog-text-highlight { - background-color: rgba(0,0,0,0); - -webkit-box-shadow: 2px 2px 4px rgba(0,0,0,0); - -moz-box-shadow: 2px 2px 4px rgba(0,0,0,0); - box-shadow: 2px 2px 4px rgba(0,0,0,0); - box-sizing: border-box; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - position: relative; -} - -#goog-gt-tt .alt-menu.goog-menu { - background: #ffffff; - border: 1px solid #dddddd; - -webkit-box-shadow: 0px 3px 3px #888; - -moz-box-shadow: 0px 2px 20px #888; - box-shadow: 0px 2px 4px #99a; - min-width: 0; - outline: none; - padding: 0; - position: absolute; - z-index: 2000; -} - -#goog-gt-tt .alt-menu .goog-menuitem { - cursor: pointer; - padding: 2px 5px 5px; - margin-right: 0px; - border-style: none; -} - -#goog-gt-tt .alt-menu div.goog-menuitem:hover { - background: #ddd; -} - -#goog-gt-tt .alt-menu .goog-menuitem h1 { - font-size: 100%; - font-weight: bold; - margin: 4px 0px; -} - -#goog-gt-tt .alt-menu .goog-menuitem strong { - color: #345aad -} - -#goog-gt-tt .goog-submenu-arrow { - text-align: right; - position: absolute; - right: 0; - left: auto; -} - -#goog-gt-tt .goog-menuitem-rtl .goog-submenu-arrow { - text-align: left; - position: absolute; - left: 0; - right: auto; -} - -#goog-gt-tt .gt-hl-text, -#goog-gt-tt .trans-target-highlight { - background-color: #f1ea00; - border-radius: 4px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - -moz-box-shadow: rgba(0, 0, 0, .5) 3px 3px 4px; - -webkit-box-shadow: rgba(0, 0, 0, .5) 3px 3px 4px; - box-shadow: rgba(0, 0, 0, .5) 3px 3px 4px; - box-sizing: border-box; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - color: #f1ea00; - cursor: pointer; - margin: -2px -2px -2px -3px; - padding: 2px 2px 2px 3px; - position: relative; -} - -#goog-gt-tt .trans-target-highlight { - color: #222; -} - -#goog-gt-tt .gt-hl-layer { - color: white; - position: absolute!important; -} - -#goog-gt-tt .trans-target, -#goog-gt-tt .trans-target .trans-target-highlight { - background-color: #c9d7f1; - border-radius: 4px 4px 0px 0px; - -webkit-border-radius: 4px 4px 0px 0px; - -moz-border-radius: 4px 4px 0px 0px; - -moz-box-shadow: rgba(0, 0, 0, .5) 3px 3px 4px; - -webkit-box-shadow: rgba(0, 0, 0, .5) 3px 3px 4px; - box-shadow: rgba(0, 0, 0, .5) 3px 3px 4px; - box-sizing: border-box; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - cursor: pointer; - margin: -2px -2px -2px -3px; - padding: 2px 2px 3px 3px; - position: relative; -} - -#goog-gt-tt span:focus { - outline: none; -} - -#goog-gt-tt .trans-edit { - background-color: transparent; - border: 1px solid #4d90fe; - border-radius: 0em; - -webkit-border-radius: 0em; - -moz-border-radius: 0em; - margin: -2px; - padding: 1px; -} - -#goog-gt-tt .gt-trans-highlight-l { - border-left: 2px solid red; - margin-left: -2px -} - -#goog-gt-tt .gt-trans-highlight-r { - border-right: 2px solid red; - margin-right: -2px; -} - -#goog-gt-tt #alt-input { - padding: 2px; -} - -#goog-gt-tt #alt-input-text { - font-size: 11px; - padding: 2px 2px 3px; - margin: 0; - background-color: #fff; - color: #333; - border: 1px solid #d9d9d9; - border-top: 1px solid #c0c0c0; - display: inline-block; - vertical-align: top; - height: 21px; - box-sizing: border-box; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-border-radius: 1px; -} - -#goog-gt-tt #alt-input-text:hover { - border: 1px solid #b9b9b9; - border-top: 1px solid #a0a0a0; - -webkit-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.1); - box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.1); -} - -#goog-gt-tt #alt-input-text:focus { - -webkit-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.3); - -moz-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.3); - box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.3); - outline: none; - border: 1px solid #4d90fe; -} - -#goog-gt-tt #alt-input-submit { - font-size: 11px; - padding: 2px 6px 3px; - margin: 0 0 0 2px; - height: 21px; -} - -#goog-gt-tt { - opacity: 0; -} \ No newline at end of file diff --git a/core/vendor/i18n/inc.json b/core/vendor/i18n/inc.json deleted file mode 100755 index 30853bf2..00000000 --- a/core/vendor/i18n/inc.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - "translate.js", - "translation.js", - "css/translateelement.css" -] \ No newline at end of file diff --git a/core/vendor/i18n/translate.js b/core/vendor/i18n/translate.js deleted file mode 100755 index e7447418..00000000 --- a/core/vendor/i18n/translate.js +++ /dev/null @@ -1,68 +0,0 @@ -(function () { - var gtConstEvalStartTime = new Date(); - - function d(b) { - var a = document.getElementsByTagName("head")[0]; - a || (a = document.body.parentNode.appendChild(document.createElement("head"))); - a.appendChild(b) - } - - function _loadJs(b) { - var a = document.createElement("script"); - a.type = "text/javascript"; - a.charset = "UTF-8"; - a.src = b; - d(a) - } - - function _loadCss(b) { - var a = document.createElement("link"); - a.type = "text/css"; - a.rel = "stylesheet"; - a.charset = "UTF-8"; - a.href = b; - d(a) - } - - function _isNS(b) { - b = b.split("."); - for (var a = window, c = 0; c < b.length; ++c) - if (!(a = a[b[c]])) return !1; - return !0 - } - - function _setupNS(b) { - b = b.split("."); - for (var a = window, c = 0; c < b.length; ++c) a.hasOwnProperty ? a.hasOwnProperty(b[c]) ? a = a[b[c]] : a = a[b[c]] = {} : a = a[b[c]] || (a[b[c]] = {}); - return a - } - window.addEventListener && "undefined" == typeof document.readyState && window.addEventListener("DOMContentLoaded", function () { - document.readyState = "complete" - }, !1); - if (_isNS('google.translate.Element')) { - return - }(function () { - var c = _setupNS('google.translate._const'); - c._cest = gtConstEvalStartTime; - gtConstEvalStartTime = undefined; - c._cl = 'fr'; - c._cuc = 'scriptGoogleElementInit'; - c._cac = ''; - c._cam = ''; - c._ctkk = '433074.3898829376'; - var h = 'translate.googleapis.com'; - var s = (true ? 'https' : window.location.protocol == 'https:' ? 'https' : 'http') + '://'; - var b = s + h; - c._pah = h; - c._pas = s; - c._pbi = b + '/translate_static/img/te_bk.gif'; - c._pci = b + '/translate_static/img/te_ctrl3.gif'; - c._pli = b + '/translate_static/img/loading.gif'; - c._plla = h + '/translate_a/l'; - c._pmi = b + '/translate_static/img/mini_google.png'; - c._ps = b + '/translate_static/css/translateelement.css'; - c._puh = 'translate.google.com'; - _loadCss(c._ps); - _loadJs(b + '/translate_static/js/element/main_fr.js'); - })(); -})(); \ No newline at end of file diff --git a/core/vendor/i18n/translation.js b/core/vendor/i18n/translation.js deleted file mode 100755 index 5d12ec31..00000000 --- a/core/vendor/i18n/translation.js +++ /dev/null @@ -1,5 +0,0 @@ -function scriptGoogleElementInit() { -new google.translate.TranslateElement({ -pageLanguage: 'fr' -}, 'google_translate_element'); -} diff --git a/module/search/search.php b/module/search/search.php index 353eeb64..36d6862e 100644 --- a/module/search/search.php +++ b/module/search/search.php @@ -170,43 +170,6 @@ class search extends common { // Variable de travail, on conserve la variable globale pour l'affichage du résultat $motclef = self::$motclef; - // Traduction du mot clé si le script Google Trad est actif - // Le multi langue est sélectionné - if ( $this->getData(['config','i18n','scriptGoogle']) === true - AND - // et la traduction de la langue courante est automatique - ( isset($_COOKIE['googtrans']) - AND ( $this->getData(['config','i18n', substr($_COOKIE['googtrans'],4,2)]) === 'script' - // Ou traduction automatique - OR $this->getData(['config','i18n','autoDetect']) === true ) - ) - // Cas des pages d'administration - // Pas connecté - AND ( $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') - // Ou connecté avec option active - OR ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD') - AND $this->getData(['config','i18n','admin']) === true - ) - ) - AND !isset($_COOKIE['ZWII_I18N_SITE']) - ) - { - // Découper la chaîne - $f = str_getcsv($motclef, ' '); - // Supprimer les espaces et les guillemets - $f = str_replace(' ','',$f); - $f = str_replace('"','',$f); - // Lire le cookie GoogTrans et déterminer les langues cibles - $language['origin'] = substr($_COOKIE['googtrans'],4,2); - $language['target'] = substr($_COOKIE['googtrans'],1,2); - if ($language['target'] !== $language['origin']) { - foreach ($f as $key => $value) { - $e = $this->translate($language['origin'],$language['target'],$value); - $motclef = str_replace($value,$e,$motclef); - } - } - } - // Suppression des mots < 3 caractères et des articles > 2 caractères de la chaîne $motclef $arraymotclef = explode(' ', $motclef); $motclef = '';