[10.0.118.dev] corrections diverses + chargement des scripst google translate si nécessaire
This commit is contained in:
parent
b2fc224cee
commit
564ff0424d
|
@ -32,7 +32,7 @@ class common {
|
|||
const I18N_DIR = 'site/i18n/';
|
||||
|
||||
// Numéro de version
|
||||
const ZWII_VERSION = '10.0.116.dev';
|
||||
const ZWII_VERSION = '10.0.117.dev';
|
||||
|
||||
public static $actions = [];
|
||||
public static $coreModuleIds = [
|
||||
|
@ -393,6 +393,7 @@ class common {
|
|||
}
|
||||
if ($this->getdata(['config','i18n',$lan,'autoTranslate']) === true &&
|
||||
$lan !== 'fr') {
|
||||
// Charge la librairie Google Translate
|
||||
setrawcookie("googtrans", '/fr/'. $lan, time() + 3600, helper::baseUrl());
|
||||
} else {
|
||||
setrawcookie("googtrans", '/fr/fr', time() + 3600, helper::baseUrl());
|
||||
|
@ -2861,6 +2862,12 @@ class layout extends common {
|
|||
// Librairies
|
||||
$moduleId = $this->getData(['page', $this->getUrl(0), 'moduleId']);
|
||||
foreach($this->core->output['vendor'] as $vendorName) {
|
||||
// Chargement des scripts Google Translate si option active
|
||||
if ( $vendorName === 'translate' &&
|
||||
$this->geti18n() !== 'fr' &&
|
||||
$this->getData(['config','i18n',$this->geti18n(),'autoTranslate']) === false) {
|
||||
continue;
|
||||
}
|
||||
// Coeur
|
||||
if(file_exists('core/vendor/' . $vendorName . '/inc.json')) {
|
||||
$vendorPath = 'core/vendor/' . $vendorName . '/';
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php echo template::checkbox('i18AutoTranslation', true, 'Traduction automatique'); ?>
|
||||
<?php echo template::checkbox('i18AutoTranslation', true, 'Traduction automatique par '); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<a href="//policies.google.com/terms#toc-content" data-lity><img src="core/module/i18n/ressource/googtrans.png" /></a>
|
||||
|
|
|
@ -172,7 +172,7 @@ tinymce.init({
|
|||
{
|
||||
title: "Paragraphe non traduit",
|
||||
url: baseUrl + "core/vendor/tinymce/templates/googtrans.html",
|
||||
description: "Empêche par la traduction automatique par le traducteur Google."
|
||||
description: "Empêche la traduction automatique par Google Traduction."
|
||||
}
|
||||
]
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="notranslate">
|
||||
<p>Saississez ou copiez la traduction manuelle.</p>
|
||||
<p>Saisissez ou copiez le passage à préserver.</p>
|
||||
</div>
|
||||
<style type="text/css">#googTransLogo {display:None;}</style>
|
Loading…
Reference in New Issue