summaryrefslogtreecommitdiff
path: root/talermerchantdemos/survey
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-04-22 14:10:48 +0200
committerFlorian Dold <florian@dold.me>2021-04-22 14:10:48 +0200
commit48d3aec35315fe5a77dd46dbfb3d70c3340fda0b (patch)
tree7296a76d1b41ca62c79f259f22b71023dd3ec871 /talermerchantdemos/survey
parent4b4dcb6a0d359ddbed41a6de14b1b33d3518824f (diff)
downloadtaler-merchant-demos-48d3aec35315fe5a77dd46dbfb3d70c3340fda0b.tar.gz
taler-merchant-demos-48d3aec35315fe5a77dd46dbfb3d70c3340fda0b.tar.bz2
taler-merchant-demos-48d3aec35315fe5a77dd46dbfb3d70c3340fda0b.zip
missing import
Diffstat (limited to 'talermerchantdemos/survey')
-rw-r--r--talermerchantdemos/survey/survey.py13
1 files changed, 1 insertions, 12 deletions
diff --git a/talermerchantdemos/survey/survey.py b/talermerchantdemos/survey/survey.py
index d583114..b5ea9c8 100644
--- a/talermerchantdemos/survey/survey.py
+++ b/talermerchantdemos/survey/survey.py
@@ -36,6 +36,7 @@ from ..httpcommon import (
self_localized,
BackendException,
make_utility_processor,
+ get_locale,
)
import sys
@@ -81,18 +82,6 @@ LOGGER.info(
app.add_template_global(self_localized)
-@babel.localeselector
-def get_locale():
- parts = request.path.split("/", 2)
- if 2 >= len(parts):
- # Totally unexpected path format, do not localize
- return "en"
- lang = parts[1]
- if lang in translations:
- return lang
- return "en"
-
-
# Add context processor that will make additional variables
# and functions available in the template.
app.context_processor(make_utility_processor("survey"))