diff --git a/CHANGES.md b/CHANGES.md index 6e087311..673739ff 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,6 +9,7 @@ - Corrige le filtrage des modules orphelins. - Autorise la modification de la langue du site par défaut. - Installation en langue étrangère non prise en compte depuis 12.3.08 +- Traduction de "Motorisé par" dans la personnalisation des données de la langue de l'UI. ## Version 12.3.08 - Amélioration du code liée à la traduction du contenu du CMS. diff --git a/core/class/layout.class.php b/core/class/layout.class.php index b165f9f2..163d6240 100644 --- a/core/class/layout.class.php +++ b/core/class/layout.class.php @@ -280,7 +280,8 @@ class layout extends common // Affichage de motorisé par $items .= 'getData(['theme', 'footer', 'displayCopyright']) === false ? 'class="displayNone"' : ''; - $items .= '>'.sprintf('%s ', helper::translate('Motorisé par')) . ''; + $label = empty($this->getData(['locale', 'poweredPageLabel'])) ? 'Motorisé par' : $this->getData(['locale', 'poweredPageLabel']); + $items .= '> ' . $label . ' '; // Toujours afficher le nom du CMS $items .= ''; $items .= 'ZwiiCMS'; diff --git a/core/include/update.inc.php b/core/include/update.inc.php index 215abcb6..ef959cd6 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -956,16 +956,34 @@ if ($this->getData(['core', 'dataVersion']) < 12308) { 'es' => 'Español', ]; foreach ($l as $key => $value) { - if (is_dir(self::DATA_DIR . $key )) { + if (is_dir(self::DATA_DIR . $key)) { touch(self::DATA_DIR . $key . '/.default'); break; } } - + // Mise à jour $this->setData(['core', 'dataVersion', 12308]); } +// Version 12.3.09 +if ($this->getData(['core', 'dataVersion']) < 12309) { + + // Mettre à jour les locales + foreach (self::$languages as $key => $value) { + // tableau des langues installées + if (is_dir(self::DATA_DIR . $key)) { + $d = json_decode(file_get_contents(self::DATA_DIR . $key . '/locale.json'), true); + $d = array_merge($d['locale'],['poweredPageLabel' => 'Motorisé par']); + $t ['locale'] = $d; + file_put_contents(self::DATA_DIR . $key . '/locale.json', json_encode($t)); + } + } + + // Mise à jour + $this->setData(['core', 'dataVersion', 12309]); +} + // Version 12.4.00 if ($this->getData(['core', 'dataVersion']) < 12400) { diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index 7bc5e798..ca59eaeb 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -546,6 +546,7 @@ class init extends common 'searchPageId' => 'none', 'searchPageLabel' => 'none', 'sitemapPageLabel' => 'none', + 'poweredPageLabel'=> 'Powered by', 'legalPageLabel' => 'legals', 'metaDescription' => 'Zwii is a database-free CMS that makes it easy to create and manage a website without any programming knowledge.', 'title' => 'Your site in a few clicks!', @@ -1221,6 +1222,7 @@ class init extends common 'page404' => 'none', 'legalPageId' => 'none', 'searchPageId' => 'none', + 'poweredPageLabel'=> 'Motorisé par', 'searchPageLabel' => 'Rechercher', 'sitemapPageLabel' => 'Plan du site', 'legalPageLabel' => 'Mentions légales', diff --git a/core/module/translate/translate.php b/core/module/translate/translate.php index 4ee0f15b..c771a12b 100644 --- a/core/module/translate/translate.php +++ b/core/module/translate/translate.php @@ -368,6 +368,7 @@ class translate extends common 'page302' => $this->getInput('localePage302'), 'legalPageId' => $this->getInput('localeLegalPageId'), 'searchPageId' => $this->getInput('localeSearchPageId'), + 'poweredPageLabel' => empty($this->getInput('localePoweredPageLabel', helper::FILTER_STRING_SHORT)) ? 'Motorisé par' : $this->getInput('localePoweredPageLabel', helper::FILTER_STRING_SHORT), 'searchPageLabel' => empty($this->getInput('localeSearchPageLabel', helper::FILTER_STRING_SHORT)) ? 'Rechercher' : $this->getInput('localeSearchPageLabel', helper::FILTER_STRING_SHORT), 'legalPageLabel' => empty($this->getInput('localeLegalPageLabel', helper::FILTER_STRING_SHORT)) ? 'Mentions légales' : $this->getInput('localeLegalPageLabel', helper::FILTER_STRING_SHORT), 'sitemapPageLabel' => empty($this->getInput('localeSitemapPageLabel', helper::FILTER_STRING_SHORT)) ? 'Plan du site' : $this->getInput('localeSitemapPageLabel', helper::FILTER_STRING_SHORT), diff --git a/core/module/translate/view/locale/locale.php b/core/module/translate/view/locale/locale.php index 87b187c6..573b9fe4 100644 --- a/core/module/translate/view/locale/locale.php +++ b/core/module/translate/view/locale/locale.php @@ -113,14 +113,21 @@ -->
-
+
+ 'Motorisé par', + 'placeholder' => 'Motorisé par', + 'value' => $module::$locales[$this->getUrl(2)]['locale']['poweredPageLabel'] + ]); ?> +
+
'Mentions légales', 'placeholder' => 'Mentions légales', 'value' => $module::$locales[$this->getUrl(2)]['locale']['legalPageLabel'] ]); ?>
-
+
'Rechercher', 'placeholder' => 'Rechercher', @@ -129,14 +136,14 @@
-
+
'Plan du site', 'placeholder' => 'Plan du site', 'value' => $module::$locales[$this->getUrl(2)]['locale']['sitemapPageLabel'], ]); ?>
-
+
'Cookies', 'value' => $module::$locales[$this->getUrl(2)]['locale']['cookies']['cookiesFooterText'],