From fbb26ef2563ed42690db95fbeaba0a1c0066960f Mon Sep 17 00:00:00 2001 From: Ilya Prokopenko Date: Sun, 6 Nov 2022 10:20:00 +0700 Subject: [PATCH] Display the first three languages in the footer I also changed the flag for English to Great Britain Closes #769 --- Web/Presenters/AboutPresenter.php | 3 +++ Web/Presenters/templates/@layout.xml | 10 +++++++++- Web/Presenters/templates/About/Language.xml | 2 +- locales/list.yml | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Web/Presenters/AboutPresenter.php b/Web/Presenters/AboutPresenter.php index dd503aff..1070f56b 100644 --- a/Web/Presenters/AboutPresenter.php +++ b/Web/Presenters/AboutPresenter.php @@ -76,6 +76,9 @@ final class AboutPresenter extends OpenVKPresenter $this->assertNoCSRF(); setLanguage($_GET['lg']); } + + if(!is_null($_GET['jReturnTo'])) + $this->redirect(rawurldecode($_GET['jReturnTo'])); } function renderExportJSLanguage($lg = NULL): void diff --git a/Web/Presenters/templates/@layout.xml b/Web/Presenters/templates/@layout.xml index 8fe554c7..df163417 100644 --- a/Web/Presenters/templates/@layout.xml +++ b/Web/Presenters/templates/@layout.xml @@ -263,9 +263,17 @@ {_footer_blog} {_footer_help} {_footer_developers} - {_footer_choose_language} {_footer_privacy} +

+ {var $currentUrl = $_SERVER["REQUEST_URI"]} + {foreach array_slice(getLanguages(), 0, 3) as $language} + + {$language['native_name']} + + {/foreach} + all languages » +

OpenVK {php echo OPENVK_VERSION} | PHP: {phpversion()} | DB: {$dbVersion}

{php echo OPENVK_ROOT_CONF["openvk"]["appearance"]["motd"]} diff --git a/Web/Presenters/templates/About/Language.xml b/Web/Presenters/templates/About/Language.xml index 05aa90c7..a55bda3d 100644 --- a/Web/Presenters/templates/About/Language.xml +++ b/Web/Presenters/templates/About/Language.xml @@ -40,7 +40,7 @@ {var $result = preg_match("/(.+)\((.+)\)/", $language['native_name'], $name)} -

+
{$language['native_name']}

{if $result == 1} {$name[1]} diff --git a/locales/list.yml b/locales/list.yml index b6ff0a44..042651c2 100644 --- a/locales/list.yml +++ b/locales/list.yml @@ -5,7 +5,7 @@ list: native_name: "Русский" author: "OpenVK Team" - code: "en" - flag: "us" + flag: "gb" name: "English" native_name: "English" author: "OpenVK Team"