diff options
author | Nicolas Lœuillet <nicolas@loeuillet.org> | 2017-11-20 21:08:02 +0100 |
---|---|---|
committer | Nicolas Lœuillet <nicolas@loeuillet.org> | 2017-12-12 20:45:22 +0100 |
commit | 9d5f120e4345e3b3714641b89dcd23ed754ec5ef (patch) | |
tree | 83c0c487dd2725bba7c86072a271e966bd84db1b | |
parent | dd50f50597720af7d39708a847b7e8604fd9d341 (diff) | |
download | wallabag-change-locale-register.tar.gz wallabag-change-locale-register.tar.zst wallabag-change-locale-register.zip |
Fixed @j0k3r's reviewchange-locale-register
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/ConfigController.php | 2 | ||||
-rw-r--r-- | src/Wallabag/UserBundle/Resources/views/layout.html.twig | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index 7fc8fb69..822130ae 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php | |||
@@ -437,7 +437,7 @@ class ConfigController extends Controller | |||
437 | */ | 437 | */ |
438 | public function setLocaleAction(Request $request, $language = null) | 438 | public function setLocaleAction(Request $request, $language = null) |
439 | { | 439 | { |
440 | if ($language != null) { | 440 | if ($language !== null) { |
441 | $this->get('session')->set('_locale', $language); | 441 | $this->get('session')->set('_locale', $language); |
442 | } | 442 | } |
443 | 443 | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/layout.html.twig b/src/Wallabag/UserBundle/Resources/views/layout.html.twig index d2f8df85..3a25bd32 100644 --- a/src/Wallabag/UserBundle/Resources/views/layout.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/layout.html.twig | |||
@@ -10,14 +10,16 @@ | |||
10 | {% block content %} | 10 | {% block content %} |
11 | <main class="valign-wrapper"> | 11 | <main class="valign-wrapper"> |
12 | <div class="valign row"> | 12 | <div class="valign row"> |
13 | <a href="{{ path('changeLocale', {'language': 'de'}) }}">DE</a> | ||
14 | <a href="{{ path('changeLocale', {'language': 'en'}) }}">EN</a> | ||
15 | <a href="{{ path('changeLocale', {'language': 'fr'}) }}">FR</a> | ||
16 | <div class="card sw"> | 13 | <div class="card sw"> |
17 | <div class="center"><img src="{{ asset('wallassets/themes/_global/img/logo-other_themes.png') }}" alt="wallabag logo" /></div> | 14 | <div class="center"><img src="{{ asset('wallassets/themes/_global/img/logo-other_themes.png') }}" alt="wallabag logo" /></div> |
18 | {% block fos_user_content %} | 15 | {% block fos_user_content %} |
19 | {% endblock fos_user_content %} | 16 | {% endblock fos_user_content %} |
20 | </div> | 17 | </div> |
18 | <div class="center"> | ||
19 | <a href="{{ path('changeLocale', {'language': 'de'}) }}">Deutsch</a> | ||
20 | <a href="{{ path('changeLocale', {'language': 'en'}) }}">English</a> | ||
21 | <a href="{{ path('changeLocale', {'language': 'fr'}) }}">Français</a> | ||
22 | </div> | ||
21 | </div> | 23 | </div> |
22 | </main> | 24 | </main> |
23 | {% endblock %} | 25 | {% endblock %} |