From 8cf721bfe7a932d40cc752d3c1608db4f385318c Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Wed, 28 Sep 2022 15:13:42 +0200 Subject: [PATCH] Drapeaux dans la table --- core/class/template.class.php | 8 ++++---- core/module/translate/translate.php | 3 ++- core/module/translate/view/index/index.php | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core/class/template.class.php b/core/class/template.class.php index 8da55f2c..c741d9a2 100644 --- a/core/class/template.class.php +++ b/core/class/template.class.php @@ -474,7 +474,7 @@ class template { /** * Crée un drapeau du site courante * @param string $langId Id de la langue à affiche ou selected pour la langue courante - * @param string $margin Ajoute un margin autour de l'icône (choix : left, right, all) + * @param string size en pixels ou en rem * @return string */ public static function flag($langId, $size = 'auto') { @@ -493,11 +493,11 @@ class template { $lang = 'fr_FR'; } } - return '(' . $lang . ')'; + title="' . $langId .'" + alt="(' . $langId . ')"/>'; } /** diff --git a/core/module/translate/translate.php b/core/module/translate/translate.php index 5f2c9106..ca480287 100644 --- a/core/module/translate/translate.php +++ b/core/module/translate/translate.php @@ -128,6 +128,7 @@ class translate extends common { // tableau des langues installées if (is_dir(self::DATA_DIR . $keyi18n) ) { self::$languagesInstalled [] = [ + template::flag($keyi18n, '50%') , $value . ' (' . $keyi18n . ')' , self::$i18nUI === $keyi18n ? '(langue de l\'interface)' : '', '', @@ -209,7 +210,7 @@ class translate extends common { // Valeurs en sortie $this->addOutput([ - 'redirect' => helper::baseUrl() . $this->getUrl(), + 'redirect' => helper::baseUrl() . 'translate', 'notification' => 'Modifications enregistrées', 'state' => true ]); diff --git a/core/module/translate/view/index/index.php b/core/module/translate/view/index/index.php index dc41dd2d..b4741814 100644 --- a/core/module/translate/view/index/index.php +++ b/core/module/translate/view/index/index.php @@ -72,7 +72,7 @@
- +