changeset 187:7539d98e1d08

components (menu): disable cache when importing "menu_labels": When using cache, first translation was used whatever locale was used after that.
author Goffi <goffi@goffi.org>
date Sun, 14 Apr 2019 08:09:40 +0200
parents 23ba0f7fc205
children e85122a39e8f
files sat_templates/templates/default/components/common.html
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sat_templates/templates/default/components/common.html	Sun Apr 14 08:09:21 2019 +0200
+++ b/sat_templates/templates/default/components/common.html	Sun Apr 14 08:09:40 2019 +0200
@@ -1,4 +1,5 @@
-{% import 'components/menu_labels.html' as ml %}
+{% import 'components/menu_labels.html' as ml with context %}
+{# we need to use "with context" to disable cache, needed for i18n #}
 
 {% macro menu(menus, class='') %}
     <nav class="menu {{class}}">