Merge branch '12309' into 12400

This commit is contained in:
Fred Tempez 2023-04-26 22:57:30 +02:00
commit 85789361f2
6 changed files with 37 additions and 7 deletions

View File

@ -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.

View File

@ -280,7 +280,8 @@ class layout extends common
// Affichage de motorisé par
$items .= '<span id="footerDisplayCopyright" ';
$items .= $this->getData(['theme', 'footer', 'displayCopyright']) === false ? 'class="displayNone"' : '';
$items .= '>'.sprintf('%s ', helper::translate('Motorisé par')) . '</span>';
$label = empty($this->getData(['locale', 'poweredPageLabel'])) ? 'Motorisé par' : $this->getData(['locale', 'poweredPageLabel']);
$items .= '><wbr>&nbsp;' . $label . '&nbsp;</span>';
// Toujours afficher le nom du CMS
$items .= '<span id="footerZwiiCMS">';
$items .= '<a href="https://zwiicms.fr/" onclick="window.open(this.href);return false" >ZwiiCMS</a>';

View File

@ -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) {

View File

@ -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',

View File

@ -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),

View File

@ -113,14 +113,21 @@
</span>-->
</h4>
<div class="row">
<div class="col6">
<div class="col4">
<?php echo template::text('localePoweredPageLabel', [
'label' => 'Motorisé par',
'placeholder' => 'Motorisé par',
'value' => $module::$locales[$this->getUrl(2)]['locale']['poweredPageLabel']
]); ?>
</div>
<div class="col4">
<?php echo template::text('localeLegalPageLabel', [
'label' => 'Mentions légales',
'placeholder' => 'Mentions légales',
'value' => $module::$locales[$this->getUrl(2)]['locale']['legalPageLabel']
]); ?>
</div>
<div class="col6">
<div class="col4">
<?php echo template::text('localeSearchPageLabel', [
'label' => 'Rechercher',
'placeholder' => 'Rechercher',
@ -129,14 +136,14 @@
</div>
</div>
<div class="row">
<div class="col6">
<div class="col4 offset2">
<?php echo template::text('localeSitemapPageLabel', [
'label' => 'Plan du site',
'placeholder' => 'Plan du site',
'value' => $module::$locales[$this->getUrl(2)]['locale']['sitemapPageLabel'],
]); ?>
</div>
<div class="col6">
<div class="col4">
<?php echo template::text('localeCookiesFooterText', [
'label' => 'Cookies',
'value' => $module::$locales[$this->getUrl(2)]['locale']['cookies']['cookiesFooterText'],