[10.0.63.dev] Petites corrections
This commit is contained in:
parent
489980fd0d
commit
70bb0c90a9
|
@ -51,7 +51,7 @@ class common {
|
||||||
'bg' => 'Bulgare (bg)',
|
'bg' => 'Bulgare (bg)',
|
||||||
'dk' => 'Danois (dk)',
|
'dk' => 'Danois (dk)',
|
||||||
'es' => 'Espagnol (es)',
|
'es' => 'Espagnol (es)',
|
||||||
'fi' => 'Finois (fi)',
|
'fi' => 'Finnois (fi)',
|
||||||
'fr' => 'Français (fr)',
|
'fr' => 'Français (fr)',
|
||||||
'is' => 'Islandais (is)',
|
'is' => 'Islandais (is)',
|
||||||
'it' => 'Italien (it)',
|
'it' => 'Italien (it)',
|
||||||
|
@ -2420,8 +2420,8 @@ class layout extends common {
|
||||||
// Menu de langues
|
// Menu de langues
|
||||||
if (sizeof($this->i18nInstalled()) > 1) {
|
if (sizeof($this->i18nInstalled()) > 1) {
|
||||||
$items .= '<li><form method="POST" action="' . helper::baseUrl() . 'i18n/lang" id="barFormSelectLanguage">';
|
$items .= '<li><form method="POST" action="' . helper::baseUrl() . 'i18n/lang" id="barFormSelectLanguage">';
|
||||||
$items .= '<input type="image" alt="'.$this->geti18n().'" class="flag flagSelected"';
|
$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="'. $this->geti18n() .'" />';
|
$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>';
|
$items .= '</form></li>';
|
||||||
foreach ($this->i18nInstalled() as $itemKey => $item) {
|
foreach ($this->i18nInstalled() as $itemKey => $item) {
|
||||||
if ($this->geti18n() !== $itemKey ) {
|
if ($this->geti18n() !== $itemKey ) {
|
||||||
|
|
|
@ -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 . '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;
|
$success = (copy ($copyFrom . 'page.json', self::DATA_DIR . $this->getInput('i18nLanguageAdd') . '/page.json') === true && $success === true) ? true : false;
|
||||||
} else {
|
} else {
|
||||||
$notification = $create . ' est déjà installée';
|
$notification = $create . ' est déjà ajoutée.';
|
||||||
$success = false;
|
$success = false;
|
||||||
}
|
}
|
||||||
// Valeurs en sortie
|
// 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 {
|
} else {
|
||||||
$notification = 'Veuillez choisir une langue';
|
$notification = 'Veuillez choisir une langue.';
|
||||||
$success = false;
|
$success = false;
|
||||||
}
|
}
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
|
@ -100,13 +100,13 @@ class i18n extends common {
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'redirect' => helper::baseUrl() . 'i18n',
|
'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') {
|
} elseif ( $this->getUrl(2) === 'fr') {
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'redirect' => helper::baseUrl() . 'i18n',
|
'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 {
|
} else {
|
||||||
// Le dossier existe ?
|
// Le dossier existe ?
|
||||||
|
@ -118,7 +118,7 @@ class i18n extends common {
|
||||||
$success = false;
|
$success = false;
|
||||||
}
|
}
|
||||||
// Valeurs en sortie
|
// 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([
|
$this->addOutput([
|
||||||
'notification' => $notification,
|
'notification' => $notification,
|
||||||
'redirect' => helper::baseUrl() . 'i18n',
|
'redirect' => helper::baseUrl() . 'i18n',
|
||||||
|
|
Loading…
Reference in New Issue