From 389b3f42fa5fea2ab34ec9698be534fe196dff93 Mon Sep 17 00:00:00 2001 From: Nicolas CHARLOT Date: Mon, 9 Jan 2017 18:01:47 +0100 Subject: [PATCH] Fixed i18n extension test (https://github.com/alexandrevicenzi/Flex/issues/74) --- templates/base.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/base.html b/templates/base.html index 9110592..6037e92 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,5 +1,4 @@ -{% if 'jinja2.ext.i18n' not in JINJA_EXTENSIONS %} - {% macro _(msg) %} +{% if JINJA_ENVIRONMENT is defined and 'jinja2.ext.i18n' not in JINJA_ENVIRONMENT['extensions'] or JINJA_ENVIRONMENT is not defined and 'jinja2.ext.i18n' not in JINJA_EXTENSIONS %} {% macro _(msg) %} {{ msg % kwargs }} {% endmacro %} {% endif %}