diff --git a/core/include/comment.inc.php b/core/include/comment.inc.php index e5165cb..9fc5aba 100644 --- a/core/include/comment.inc.php +++ b/core/include/comment.inc.php @@ -83,11 +83,11 @@ if($this->isPost() && isset($_POST['commentPageFormSubmit']) ) { $content = ''; $file_name = ''; // Mail - if( $valueText !== '') $content .= '' . $text['core']['showComment'][9] . ' : ' . $valueText . '
'; - if( $valueTextarea !== '') $content .= '' . $text['core']['showComment'][10] . ' : ' . $valueTextarea . '
'; + if( $valueText !== '') $content .= '' . $this->getData(['locale', 'pageComment', 'commentName']) . ' : ' . $valueText . '
'; + if( $valueTextarea !== '') $content .= '' . $this->getData(['locale', 'pageComment', 'comment']) . ' : ' . $valueTextarea . '
'; // Données - $data[$text['core']['showComment'][9]] = $valueText; - $data[$text['core']['showComment'][10]] = $valueTextarea; + $data[$this->getData(['locale', 'pageComment', 'commentName'])] = $valueText; + $data[$this->getData(['locale', 'pageComment', 'comment'])] = $valueTextarea; // Bot présumé, la page sera actualisée avec l'affichage du captcha complet if( $detectBot === 'bot') $notice = $text['core']['showComment'][1]; @@ -203,7 +203,7 @@ if ( NULL !== $dataPage && is_array($dataPage) && $dataPage !== [] ) { for($i = $pagination['first']; $i < $pagination['last']; $i++) { $content = ''; $dataKeys = array_keys($dataPage[$i]); - $content .= '
'. $dataPage[$i][$dataKeys[0]] . $text['core']['showComment'][12] . $dataPage[$i][$dataKeys[2]] .'
'; + $content .= '
'. $dataPage[$i][$dataKeys[0]] . $this->getData(['locale', 'pageComment', 'link']). ' ' . $dataPage[$i][$dataKeys[2]] .'
'; $content .= '
' . $dataPage[$i][$dataKeys[1]] . '

'; $data[] = [$content]; } @@ -240,7 +240,7 @@ echo '';
$text['core']['showComment'][0], + 'value' => $this->getData(['locale', 'pageComment', 'writeComment']), 'ico' => 'pencil' ]); ?>
@@ -253,12 +253,12 @@ echo template::formOpenFile('commentPageFormForm', $action);
'commentPageFormInput_0', - 'label' => $text['core']['showComment'][9], + 'label' => $this->getData(['locale', 'pageComment', 'commentName']), 'value' => $_SESSION['draftPage']['text'] ]); echo template::textarea('commentPageFormInput[1]', [ 'id' => 'commentPageFormInput_1', - 'label' => $text['core']['showComment'][10], + 'label' => $this->getData(['locale', 'pageComment', 'comment']), 'value' => $_SESSION['draftPage']['textarea'], 'class' => 'editorWysiwygComment', 'noDirty' => true @@ -292,7 +292,7 @@ echo template::formOpenFile('commentPageFormForm', $action);
$this->getData(['config', 'social', 'comment', 'button']) ? $this->getData(['config', 'social', 'comment', 'button']) : $text['core']['showComment'][8], + 'value' => $this->getData(['locale', 'pageComment', 'submit']), 'ico' => '' ]); ?>
@@ -329,7 +329,7 @@ if($pagesComment && $nbPage > 1){ ?> 'commentPageButtonPageNb', 'disabled' => true, - 'value' => $text['core']['showComment'][11].$_SESSION[$commentNumPage].'/'.$nbPage + 'value' => $this->getData(['locale', 'pageComment', 'page']).' '.$_SESSION[$commentNumPage].'/'.$nbPage ]); ?> 'commentPageButtonPrevNext', diff --git a/core/lang/en/lex_core.php b/core/lang/en/lex_core.php index 17c0540..1c001d2 100644 --- a/core/lang/en/lex_core.php +++ b/core/lang/en/lex_core.php @@ -31,18 +31,12 @@ $text['core']['router'][3] = 'Access denied'; $text['core']['router'][4] = 'You are not authorised to view this page (error 403)'; $text['core']['router'][5] = 'Page unavailable'; $text['core']['router'][6] = 'The requested page does not exist or cannot be found (error 404)'; -$text['core']['showComment'][0] = 'Write a comment'; $text['core']['showComment'][1] = 'Robot detected'; $text['core']['showComment'][2] = 'Subject'; $text['core']['showComment'][3] = 'Comment on the page '; $text['core']['showComment'][4] = 'Form submitted'; $text['core']['showComment'][5] = 'Failed to submit form'; $text['core']['showComment'][6] = 'No comments yet'; -$text['core']['showComment'][8] = 'Send'; -$text['core']['showComment'][9] = 'Name or nickname'; -$text['core']['showComment'][10] = 'Comment'; -$text['core']['showComment'][11] = 'Page '; -$text['core']['showComment'][12] = ' on '; // core.js.php $text['core_js'][0] = "Updating ?"; // Select File diff --git a/core/lang/es/lex_core.php b/core/lang/es/lex_core.php index 9fa605e..820e9d0 100644 --- a/core/lang/es/lex_core.php +++ b/core/lang/es/lex_core.php @@ -31,18 +31,12 @@ $text['core']['router'][3] = 'Acceso denegado'; $text['core']['router'][4] = 'No está autorizado para ver esta página (error 403)'; $text['core']['router'][5] = 'Página no disponible'; $text['core']['router'][6] = 'La página solicitada no existe o no se encuentra (error 404)'; -$text['core']['showComment'][0] = 'Escribir un comentario'; $text['core']['showComment'][1] = 'Robot detectado'; $text['core']['showComment'][2] = 'Asunto'; $text['core']['showComment'][3] = 'Comentar en la página '; $text['core']['showComment'][4] = 'Formulario enviado'; $text['core']['showComment'][5] = 'Error al enviar el formulario'; $text['core']['showComment'][6] = 'Aún no hay comentarios'; -$text['core']['showComment'][8] = 'Enviar'; -$text['core']['showComment'][9] = 'Nombre o apodo'; -$text['core']['showComment'][10] = 'Comentario'; -$text['core']['showComment'][11] = 'Página '; -$text['core']['showComment'][12] = ' en '; // core.js.php $text['core_js'][0] = "¿Realizar actualización?"; // Seleccione Archivo diff --git a/core/lang/fr/lex_core.php b/core/lang/fr/lex_core.php index 7ae89a7..bec920d 100644 --- a/core/lang/fr/lex_core.php +++ b/core/lang/fr/lex_core.php @@ -31,19 +31,12 @@ $text['core']['router'][3] = 'Accès interdit'; $text['core']['router'][4] = 'Vous n\'êtes pas autorisé à consulter cette page (erreur 403)'; $text['core']['router'][5] = 'Page indisponible'; $text['core']['router'][6] = 'La page demandée n\'existe pas ou est introuvable (erreur 404)'; -$text['core']['showComment'][0] = 'Ecrire un commentaire'; $text['core']['showComment'][1] = 'Robot détecté'; $text['core']['showComment'][2] = 'Sujet'; $text['core']['showComment'][3] = 'Commentaire sur la page '; $text['core']['showComment'][4] = 'Formulaire soumis'; $text['core']['showComment'][5] = 'Echec d\'envoi du formulaire'; $text['core']['showComment'][6] = 'Pas encore de commentaire'; -$text['core']['showComment'][8] = 'Envoyer'; -$text['core']['showComment'][9] = 'Nom ou pseudo'; -$text['core']['showComment'][10] = 'Commentaire'; -$text['core']['showComment'][11] = 'Page '; -$text['core']['showComment'][12] = ' le '; - // core.js.php $text['core_js'][0] = "Effectuer la mise à jour ?"; // Select File diff --git a/core/module/config/config.php b/core/module/config/config.php index dbed71a..0db4d2a 100644 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -463,6 +463,14 @@ class config extends common { 'cookiesCheckboxExtText' => $this->getInput('localeCookiesCheckboxExtText', helper::FILTER_STRING_SHORT), 'cookiesFooterText' => $this->getInput('localeCookiesFooterText', helper::FILTER_STRING_SHORT, $this->getData(['config', 'cookieConsent'])), 'cookiesButtonText' =>$this->getInput('localeCookiesButtonText', helper::FILTER_STRING_SHORT, $this->getData(['config', 'cookieConsent'])) + ], + 'pageComment' => [ + 'writeComment' => $this->getInput('localeConfigWriteComment', helper::FILTER_STRING_SHORT), + 'commentName' => $this->getInput('localeConfigCommentName', helper::FILTER_STRING_SHORT), + 'comment' => $this->getInput('localeConfigCommentComment', helper::FILTER_STRING_SHORT), + 'submit' => $this->getInput('localeConfigCommentSubmit', helper::FILTER_STRING_SHORT), + 'link' => $this->getInput('localeConfigCommentLink', helper::FILTER_STRING_SHORT), + 'page' => $this->getInput('localeConfigCommentPage', helper::FILTER_STRING_SHORT) ] ] ]); diff --git a/core/module/config/lang/en/lex_config.php b/core/module/config/lang/en/lex_config.php index f49dfed..1b8dd88 100644 --- a/core/module/config/lang/en/lex_config.php +++ b/core/module/config/lang/en/lex_config.php @@ -98,6 +98,14 @@ $text['core_config_view']['locale'][49] = 'Member'; $text['core_config_view']['locale'][50] = 'Editor'; $text['core_config_view']['locale'][51] = 'Moderator'; $text['core_config_view']['locale'][52] = 'Administrator'; +$text['core_config_view']['locale'][53] = 'Submit button text'; +$text['core_config_view']['locale'][54] = 'Page comments '; +$text['core_config_view']['locale'][55] = 'Write a comment'; +$text['core_config_view']['locale'][56] = 'Name or nickname'; +$text['core_config_view']['locale'][57] = 'Comment'; +$text['core_config_view']['locale'][58] = 'Link between name and date'; +$text['core_config_view']['locale'][59] = 'Page'; + $text['core_config_view']['network'][0] = 'Settings'; $text['core_config_view']['network'][1] = 'Proxy type'; $text['core_config_view']['network'][2] = 'Proxy address'; @@ -183,8 +191,6 @@ $text['core_config_view']['social'][17] = 'Insert in the head of the page the me $text['core_config_view']['social'][18] = 'Youtube channel'; $text['core_config_view']['social'][19] = 'Footer comments'; $text['core_config_view']['social'][20] = 'Configuration'; -$text['core_config_view']['social'][21] = 'Leave empty to keep the default text.'; -$text['core_config_view']['social'][22] = 'Submit button text'; $text['core_config_view']['social'][23] = 'Send the entered data by email:'; $text['core_config_view']['social'][24] = 'Select at least one group or one user. Your server must allow email sending.'; $text['core_config_view']['social'][25] = 'Leave empty to keep the default text.'; @@ -197,6 +203,7 @@ $text['core_config_view']['social'][32] = 'Reply to sender from notification ema $text['core_config_view']['social'][33] = 'This option allows you to respond directly to the sender of the message if they have indicated a valid email.'; $text['core_config_view']['social'][37] = 'Number of comments displayed on a page'; $text['core_config_view']['social'][40] = 'Validate a captcha in order to submit the form'; +$text['core_config_view']['social'][21] = 'Texts should be put in the language of your visitors in the "Location" tab'; $text['core_config']['generateFiles'][0] = 'Updated sitemap and robots.txt files'; $text['core_config']['generateFiles'][1] = 'Writing failure, site map not updated'; $text['core_config']['backup'][0] = 'Save'; diff --git a/core/module/config/lang/es/lex_config.php b/core/module/config/lang/es/lex_config.php index 9848e9a..fe4cf45 100644 --- a/core/module/config/lang/es/lex_config.php +++ b/core/module/config/lang/es/lex_config.php @@ -40,7 +40,7 @@ $text['core_config_view']['index'][0] = 'Inicio'; $text['core_config_view']['index'][1] = 'Ayuda'; $text['core_config_view']['index'][2] = 'Configuración'; $text['core_config_view']['index'][3] = 'Guardar'; -$text['core_config_view']['index'][4] = 'Ubicación'; +$text['core_config_view']['index'][4] = 'Localización'; $text['core_config_view']['index'][5] = 'Social'; $text['core_config_view']['index'][6] = 'Conexión'; $text['core_config_view']['index'][7] = 'Red'; @@ -98,6 +98,14 @@ $text['core_config_view']['locale'][49] = 'Miembro'; $text['core_config_view']['locale'][50] = 'Editor'; $text['core_config_view']['locale'][51] = 'Moderador'; $text['core_config_view']['locale'][52] = 'Administrador'; +$text['core_config_view']['locale'][53] = 'Submit button text'; +$text['core_config_view']['locale'][54] = 'Comentarios de la página '; +$text['core_config_view']['locale'][55] = 'Escribir un comentario'; +$text['core_config_view']['locale'][56] = 'Nombre o apodo'; +$text['core_config_view']['locale'][57] = 'Comentario'; +$text['core_config_view']['locale'][58] = 'Vínculo entre nombre y fecha'; +$text['core_config_view']['locale'][59] = 'Página'; + $text['core_config_view']['network'][0] = 'Configuración'; $text['core_config_view']['network'][1] = 'Tipo de proxy'; $text['core_config_view']['network'][2] = 'Dirección de proxy'; @@ -183,8 +191,6 @@ $text['core_config_view']['social'][17] = 'Insertar metapropiedades específicas $text['core_config_view']['social'][18] = 'Canal de Youtube'; $text['core_config_view']['social'][19] = 'Comentarios de pie de página'; $text['core_config_view']['social'][20] = 'Configuración'; -$text['core_config_view']['social'][21] = 'Déjelo vacío para mantener el texto predeterminado.'; -$text['core_config_view']['social'][22] = 'Enviar texto del botón'; $text['core_config_view']['social'][23] = 'Enviar los datos ingresados ​​por correo electrónico:'; $text['core_config_view']['social'][24] = 'Seleccione al menos un grupo o un usuario. Su servidor debe permitir el envío de correo electrónico.'; $text['core_config_view']['social'][25] = 'Déjelo vacío para mantener el texto predeterminado.'; @@ -197,7 +203,7 @@ $text['core_config_view']['social'][32] = 'Responder al remitente desde el corre $text['core_config_view']['social'][33] = 'Esta opción le permite responder directamente al remitente del mensaje si ha indicado un correo electrónico válido.'; $text['core_config_view']['social'][37] = 'Número de comentarios mostrados en una página'; $text['core_config_view']['social'][40] = 'Validar un captcha para enviar el formulario'; - +$text['core_config_view']['social'][21] = 'Los textos deben colocarse en el idioma de sus visitantes en la pestaña "Localización"'; $text['core_config']['generateFiles'][0] = 'Mapa del sitio actualizado y archivos robots.txt'; $text['core_config']['generateFiles'][1] = 'No se pudo escribir, el mapa del sitio no se actualizó'; $text['core_config']['backup'][0] = 'Backup'; diff --git a/core/module/config/lang/fr/lex_config.php b/core/module/config/lang/fr/lex_config.php index e5ecd7f..614230b 100644 --- a/core/module/config/lang/fr/lex_config.php +++ b/core/module/config/lang/fr/lex_config.php @@ -98,6 +98,14 @@ $text['core_config_view']['locale'][49] = 'Membre'; $text['core_config_view']['locale'][50] = 'Editeur'; $text['core_config_view']['locale'][51] = 'Modérateur'; $text['core_config_view']['locale'][52] = 'Administrateur'; +$text['core_config_view']['locale'][53] = 'Texte du bouton de soumission'; +$text['core_config_view']['locale'][54] = 'Commentaires de page '; +$text['core_config_view']['locale'][55] = 'Ecrire un commentaire'; +$text['core_config_view']['locale'][56] = 'Nom ou pseudo'; +$text['core_config_view']['locale'][57] = 'Commentaire'; +$text['core_config_view']['locale'][58] = 'Liaison entre nom et date'; +$text['core_config_view']['locale'][59] = 'Page'; + $text['core_config_view']['network'][0] = 'Paramètres'; $text['core_config_view']['network'][1] = 'Type de proxy'; $text['core_config_view']['network'][2] = 'Adresse du proxy'; @@ -183,8 +191,6 @@ $text['core_config_view']['social'][17] = 'Insère dans le head de la page les p $text['core_config_view']['social'][18] = 'Chaîne Youtube'; $text['core_config_view']['social'][19] = 'Commentaires de bas de page'; $text['core_config_view']['social'][20] = 'Configuration'; -$text['core_config_view']['social'][21] = 'Laissez vide afin de conserver le texte par défaut.'; -$text['core_config_view']['social'][22] = 'Texte du bouton de soumission'; $text['core_config_view']['social'][23] = 'Envoyer par mail les données saisies :'; $text['core_config_view']['social'][24] = 'Sélectionnez au moins un groupe ou un utilisateur. Votre serveur doit autoriser les envois de mail.'; $text['core_config_view']['social'][25] = 'Laissez vide afin de conserver le texte par défaut.'; @@ -197,7 +203,7 @@ $text['core_config_view']['social'][32] = 'Répondre à l\'expéditeur depuis le $text['core_config_view']['social'][33] = 'Cette option permet de répondre directement à l\'expéditeur du message si celui-ci a indiqué un email valide.'; $text['core_config_view']['social'][37] = 'Nombre de commentaires affichés sur une page'; $text['core_config_view']['social'][40] = 'Valider un captcha afin de soumettre le formulaire'; - +$text['core_config_view']['social'][21] = 'Des textes sont à mettre dans la langue de vos visiteurs dans l\'onglet "Localisation"'; $text['core_config']['generateFiles'][0] = 'Mises à jour des fichiers sitemap et robots.txt'; $text['core_config']['generateFiles'][1] = 'Echec d\'écriture, le site map n\'a pas été mis à jour'; $text['core_config']['backup'][0] = 'Sauvegarder'; diff --git a/core/module/config/view/locale/locale.php b/core/module/config/view/locale/locale.php index 5b4e6d7..77491b2 100644 --- a/core/module/config/view/locale/locale.php +++ b/core/module/config/view/locale/locale.php @@ -220,6 +220,59 @@ else{
+
+
+
+
+ + + + + +
+
+
+ $text['core_config_view']['locale'][55], + 'value' => $this->getData(['locale', 'pageComment', 'writeComment']) + ]); ?> +
+
+ $text['core_config_view']['locale'][56], + 'value' => $this->getData(['locale', 'pageComment', 'commentName']) + ]); ?> +
+
+ $text['core_config_view']['locale'][57], + 'value' => $this->getData(['locale', 'pageComment', 'comment']) + ]); ?> +
+
+
+
+ $text['core_config_view']['locale'][53], + 'value' => $this->getData(['locale', 'pageComment', 'submit']) + ]); ?> +
+
+ $text['core_config_view']['locale'][58], + 'value' => $this->getData(['locale', 'pageComment', 'link']) + ]); ?> +
+
+ $text['core_config_view']['locale'][59], + 'value' => $this->getData(['locale', 'pageComment', 'page']) + ]); ?> +
+
+
+
+
diff --git a/core/module/config/view/social/social.php b/core/module/config/view/social/social.php index 823849f..5f93198 100644 --- a/core/module/config/view/social/social.php +++ b/core/module/config/view/social/social.php @@ -63,16 +63,10 @@ include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdm
-
- $text['core_config_view']['social'][21], - 'label' => $text['core_config_view']['social'][22], - 'value' => $this->getData(['config', 'social', 'comment', 'button']) - ]); ?>
(bool) $this->getData(['config', 'social', 'comment', 'group']) || @@ -123,6 +117,10 @@ include('./core/module/config/lang/'. $this->getData(['config', 'i18n', 'langAdm 'selected' => $this->getData(['config', 'social', 'comment', 'nbItemPage']) ]); ?>
+
+ +
diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index 731fe36..bbd3da1 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -112,6 +112,14 @@ class init extends common { 'cookiesFooterText' => 'Cookies', 'cookiesButtonText' => 'J\'ai compris' ], + 'pageComment' => [ + 'writeComment' => 'Ecrire un commentaire', + 'commentName' => 'Nom ou pseudo', + 'comment' => 'Commentaire', + 'submit' => 'Envoyer', + 'link' => ', le', + 'page' => 'Page' + ], 'menuBurger' => [ 'burgerLeftIconLink' => 'accueil', 'burgerCenterIconLink' => 'recherche' diff --git a/core/module/translate/translate.php b/core/module/translate/translate.php index cb65edc..f3dee67 100644 --- a/core/module/translate/translate.php +++ b/core/module/translate/translate.php @@ -63,6 +63,7 @@ class translate extends common { $success = false; $copyFrom = $this->getInput('translateFormCopySource'); $toCreate = $this->getInput('translateFormCopyTarget'); + $this->setData([ 'config', 'i18n', 'CopyTarget', $toCreate]); // Tableau des langues installées foreach ($i18nList as $key => $value) { if ($this->getData(['config','i18n', $key]) === 'site') { diff --git a/core/module/translate/view/copy/copy.php b/core/module/translate/view/copy/copy.php index 41b9ecb..d200cdb 100644 --- a/core/module/translate/view/copy/copy.php +++ b/core/module/translate/view/copy/copy.php @@ -38,7 +38,8 @@ include('./core/module/translate/lang/'. $this->getData(['config', 'i18n', 'lang
$text['core_translate_view']['copy'][5] + 'label' => $text['core_translate_view']['copy'][5], + 'selected' => $this->getData([ 'config', 'i18n', 'CopyTarget']) ]); ?>