diff --git a/CHANGES.md b/CHANGES.md index a58edb0..57171c7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,7 +8,7 @@ - Editeur Tinymce : Tinymce passe en version 5.10.9. Les utlisateurs du module Snipcart devront faire une mise à jour vers Snipcart V30. - Corrections : - Menu : suppression de l'aléa lors du passage de petit écran à grand écran, - - Theme / Bannière / option contenu personnalisé : les couleurs dans l'éditeur Tinymce sont celles réglés dans cette option. + - Theme / Bannière / option contenu personnalisé : les couleurs dans l'éditeur Tinymce sont celles réglées dans cette option. - Sur le site : - Snipcart V30 : mise à jour indispensable pour compatibilité avec Deltacms 5.0.01 diff --git a/core/include/update.inc.php b/core/include/update.inc.php index 4db2346..c120415 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -180,13 +180,18 @@ if ($this->getData(['core', 'dataVersion']) < 4502) { $this->setData(['core', 'dataVersion', 4502]); } if ($this->getData(['core', 'dataVersion']) < 5001) { - $this->setData([ 'config', 'social', 'comment', 'button', '']); $this->setData([ 'config', 'social', 'comment', 'group', '']); $this->setData([ 'config', 'social', 'comment', 'user', '']); $this->setData([ 'config', 'social', 'comment', 'subject', '']); $this->setData([ 'config', 'social', 'comment', 'captcha', true]); $this->setData([ 'config', 'social', 'comment', 'nbItemPage', '3']); copy ('core/module/install/ressource/database_fr/base/comment.json', self::DATA_DIR . 'base' . '/comment.json'); + $this->setData(['locale', 'pageComment', 'writeComment', 'Ecrire un commentaire']); + $this->setData(['locale', 'pageComment', 'commentName', 'Nom ou pseudo']); + $this->setData(['locale', 'pageComment', 'comment', 'Commentaire']); + $this->setData(['locale', 'pageComment', 'submit', 'Envoyer']); + $this->setData(['locale', 'pageComment', 'link', ', le']); + $this->setData(['locale', 'pageComment', 'page', 'Page']); foreach( $this->getData(['config', 'i18n']) as $key => $value){ if( $value === 'site') copy ('core/module/install/ressource/database_fr/base/comment.json', self::DATA_DIR . $key . '/comment.json'); } diff --git a/core/module/config/config.php b/core/module/config/config.php index 0db4d2a..3fc0bfd 100644 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -501,7 +501,6 @@ class config extends common { 'githubId' => $this->getInput('socialGithubId'), 'headFacebook' => $this->getInput('socialHeadFacebook', helper::FILTER_BOOLEAN), 'comment' => [ - 'button' => $this->getInput('socialConfigButton'), 'group' => $this->getInput('socialConfigGroup'), 'user' => $this->getInput('socialConfigUser'), 'subject' => $this->getInput('socialConfigSubject'), diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index bbd3da1..543abf9 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -19,7 +19,6 @@ class init extends common { 'youtubeUserId' => '', 'githubId' => '', 'comment' => [ - 'button' => '', 'group' => '', 'user' => '', 'subject' => '', diff --git a/core/module/translate/lang/en/lex_translate.php b/core/module/translate/lang/en/lex_translate.php index 5af60da..9972274 100644 --- a/core/module/translate/lang/en/lex_translate.php +++ b/core/module/translate/lang/en/lex_translate.php @@ -7,7 +7,7 @@ $text['core_translate_view']['copy'][3] = 'Site copy (written translations)'; $text['core_translate_view']['copy'][4] = 'Pages and modules of'; $text['core_translate_view']['copy'][5] = 'to'; $text['core_translate_view']['copy'][6] = 'All pages'; -$text['core_translate_view']['copy'][7] = 'A page, subpage or bar'; +$text['core_translate_view']['copy'][7] = 'A page, subpage or bar of the site in language '; $text['core_translate_view']['copy'][8] = 'Page type: title in menu (full title - identifier). Copying an existing page to the target folder overwrites this page, read help.'; $text['core_translate_view']['copy'][9] = 'Copy the bars associated with the page'; $text['core_translate_view']['copy'][10] = 'Copying the bars of a page is a delicate operation, read the help'; diff --git a/core/module/translate/lang/es/lex_translate.php b/core/module/translate/lang/es/lex_translate.php index 0550855..905f823 100644 --- a/core/module/translate/lang/es/lex_translate.php +++ b/core/module/translate/lang/es/lex_translate.php @@ -7,7 +7,7 @@ $text['core_translate_view']['copy'][3] = 'Copia del sitio (traducciones redacta $text['core_translate_view']['copy'][4] = 'Páginas y módulos'; $text['core_translate_view']['copy'][5] = 'Para'; $text['core_translate_view']['copy'][6] = 'Todas las páginas'; -$text['core_translate_view']['copy'][7] = 'Una página, subpágina o barra'; +$text['core_translate_view']['copy'][7] = 'Una página, subpágina o barra del sitio en idioma '; $text['core_translate_view']['copy'][8] = 'Tipo de página: título en el menú (título completo - identificador). Copiar una página existente a la carpeta de destino sobrescribe esta página, lea la ayuda.'; $text['core_translate_view']['copy'][9] = 'Copiar las barras asociadas con la página'; $text['core_translate_view']['copy'][10] = 'Copiar las barras de una página es una operación delicada, lea la ayuda'; diff --git a/core/module/translate/lang/fr/lex_translate.php b/core/module/translate/lang/fr/lex_translate.php index 177600c..23bc522 100644 --- a/core/module/translate/lang/fr/lex_translate.php +++ b/core/module/translate/lang/fr/lex_translate.php @@ -8,7 +8,7 @@ $text['core_translate_view']['copy'][4] = 'Pages et les modules de'; $text['core_translate_view']['copy'][5] = 'Vers'; $text['core_translate_view']['copy'][6] = 'Toutes les pages'; -$text['core_translate_view']['copy'][7] = 'Une page, une sous-page ou une barre'; +$text['core_translate_view']['copy'][7] = 'Une page, une sous-page ou une barre du site en langue '; $text['core_translate_view']['copy'][8] = 'Type de page : titre dans le menu ( titre complet - identifiant). Copier une page existante dans le dossier cible écrase cette page, lire l\'aide.'; $text['core_translate_view']['copy'][9] = 'Copier les barres associées à la page'; $text['core_translate_view']['copy'][10] = 'Copier les barres d\'une page est une opération délicate, lire l\'aide'; diff --git a/core/module/translate/translate.php b/core/module/translate/translate.php index f3dee67..ae6244d 100644 --- a/core/module/translate/translate.php +++ b/core/module/translate/translate.php @@ -61,7 +61,16 @@ class translate extends common { if ($this->isPost()) { // Initialisation $success = false; - $copyFrom = $this->getInput('translateFormCopySource'); + if( $this->getInput('translateCopyAllPages') === '1'){ + $copyFrom = $this->getInput('translateFormCopySource'); + } else { + if( $this->getInput('DELTA_I18N_SITE') === '' || $this->getInput('DELTA_I18N_SITE')=== null || $this->getInput('DELTA_I18N_SITE') === 'base'){ + $copyFrom = 'base'; + } + else{ + $copyFrom = $this->getInput('DELTA_I18N_SITE'); + } + } $toCreate = $this->getInput('translateFormCopyTarget'); $this->setData([ 'config', 'i18n', 'CopyTarget', $toCreate]); // Tableau des langues installées @@ -184,8 +193,12 @@ class translate extends common { } } - // Langues cibles base en plus - self::$languagesInstalled = array_merge(['base' => $text['core_translate']['copy'][5] ],self::$languagesTarget); + // Langues cibles avec dossier existant et base en plus + $installed = self::$languagesTarget; + foreach( $installed as $key=>$value){ + if( ! is_dir( self::DATA_DIR.$key )) unset( $installed[$key]); + } + self::$languagesInstalled = array_merge(['base' => $text['core_translate']['copy'][5] ],$installed); // Valeurs en sortie $this->addOutput([ diff --git a/core/module/translate/view/copy/copy.js.php b/core/module/translate/view/copy/copy.js.php index 8f422a7..27df546 100644 --- a/core/module/translate/view/copy/copy.js.php +++ b/core/module/translate/view/copy/copy.js.php @@ -4,8 +4,11 @@ $('#translateCopyAllPages').on("change", function() { if($(this).is(":checked")) { $(".pagesList").css("display","none"); + $('.copyAll').css("display",""); } else { $(".pagesList").css("display",""); + $('.copyAll').css("display","none"); } -}).trigger("change"); \ No newline at end of file +}).trigger("change"); + diff --git a/core/module/translate/view/copy/copy.php b/core/module/translate/view/copy/copy.php index d200cdb..8fdc9dc 100644 --- a/core/module/translate/view/copy/copy.php +++ b/core/module/translate/view/copy/copy.php @@ -1,6 +1,14 @@ getData(['config', 'i18n', 'langAdmin']) . '/lex_translate.php'); + +// drapeau pour la langue d'origine ou la langue en traduction rédigée +if( $this->getInput('DELTA_I18N_SITE') === '' || $this->getInput('DELTA_I18N_SITE')=== null || $this->getInput('DELTA_I18N_SITE') === 'base'){ + $flag = $this->getData(['config', 'i18n', 'langBase']); +} +else{ + $flag = $this->getInput('DELTA_I18N_SITE'); +} ?>
@@ -31,11 +39,21 @@ include('./core/module/translate/lang/'. $this->getData(['config', 'i18n', 'lang
-
+
$text['core_translate_view']['copy'][4] ]); ?>
+
+ $text['core_translate_view']['copy'][7].template::flag($flag, '20px'), + 'selected' => '', + 'help' => $text['core_translate_view']['copy'][8], + 'ksort' => false + ]); ?> +
$text['core_translate_view']['copy'][5], @@ -49,16 +67,6 @@ include('./core/module/translate/lang/'. $this->getData(['config', 'i18n', 'lang 'checked' => '' ]); ?>
-
- $text['core_translate_view']['copy'][7], - 'selected' => '', - 'help' => $text['core_translate_view']['copy'][8], - 'ksort' => false - ]); ?> -
'',