[10.0.63.dev] Petites corrections

This commit is contained in:
fredtempez 2019-11-03 09:01:09 +01:00
parent 489980fd0d
commit 70bb0c90a9
2 changed files with 9 additions and 9 deletions

View File

@ -51,7 +51,7 @@ class common {
'bg' => 'Bulgare (bg)',
'dk' => 'Danois (dk)',
'es' => 'Espagnol (es)',
'fi' => 'Finois (fi)',
'fi' => 'Finnois (fi)',
'fr' => 'Français (fr)',
'is' => 'Islandais (is)',
'it' => 'Italien (it)',
@ -2420,8 +2420,8 @@ class layout extends common {
// Menu de langues
if (sizeof($this->i18nInstalled()) > 1) {
$items .= '<li><form method="POST" action="' . helper::baseUrl() . 'i18n/lang" id="barFormSelectLanguage">';
$items .= '<input type="image" alt="'.$this->geti18n().'" class="flag flagSelected"';
$items .= ' name="'.$this->geti18n().'" src="' . helper::baseUrl(false) .'core/vendor/icon-flags/png/'. $this->geti18n() .'.png" data-tippy-content="'. $this->geti18n() .'" />';
$items .= '<input type="image" alt="' . self::$i18nList[$this->geti18n()] . '(' . $this->geti18n() . ')' . '" class="flag flagSelected"';
$items .= ' name="'.$this->geti18n().'" src="' . helper::baseUrl(false) .'core/vendor/icon-flags/png/'. $this->geti18n() .'.png" data-tippy-content="' . self::$i18nList[$this->geti18n()] . '" />';
$items .= '</form></li>';
foreach ($this->i18nInstalled() as $itemKey => $item) {
if ($this->geti18n() !== $itemKey ) {

View File

@ -47,13 +47,13 @@ class i18n extends common {
$success = (copy ($copyFrom . 'module.json', self::DATA_DIR . $this->getInput('i18nLanguageAdd') . '/module.json') === true && $success === true) ? true : false;
$success = (copy ($copyFrom . 'page.json', self::DATA_DIR . $this->getInput('i18nLanguageAdd') . '/page.json') === true && $success === true) ? true : false;
} else {
$notification = $create . ' est déjà installée';
$notification = $create . ' est déjà ajoutée.';
$success = false;
}
// Valeurs en sortie
$notification = $success === true ? self::$i18nList[$this->getInput('i18nLanguageAdd')] . ' installée' : self::$i18nList[create] . ' déjà installée' ;
$notification = $success === true ? self::$i18nList[$this->getInput('i18nLanguageAdd')] . ' ajoutée' : self::$i18nList[create] . ' déjà ajooutée.' ;
} else {
$notification = 'Veuillez choisir une langue';
$notification = 'Veuillez choisir une langue.';
$success = false;
}
$this->addOutput([
@ -100,13 +100,13 @@ class i18n extends common {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'i18n',
'notification' => 'Vous ne pouvez pas supprimer la langue courante'
'notification' => 'Vous ne pouvez pas supprimer la langue courante.'
]);
} elseif ( $this->getUrl(2) === 'fr') {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'i18n',
'notification' => 'Vous ne pouvez pas supprimer la langue par défaut'
'notification' => 'Vous ne pouvez pas supprimer la langue par défaut.'
]);
} else {
// Le dossier existe ?
@ -118,7 +118,7 @@ class i18n extends common {
$success = false;
}
// Valeurs en sortie
$notification = $success === true ? 'Langue ' . $this->getUrl(2) .' effacée' : 'Langue ' . $this->getUrl(2) . ' n\'existe pas' ;
$notification = $success === true ? 'Langue ' . $this->getUrl(2) .' supprimée' : 'Langue ' . $this->getUrl(2) . ' n\'existe pas.' ;
$this->addOutput([
'notification' => $notification,
'redirect' => helper::baseUrl() . 'i18n',