diff options
Diffstat (limited to 'talerbackoffice/backoffice')
-rw-r--r-- | talerbackoffice/backoffice/backoffice.py | 7 | ||||
-rw-r--r-- | talerbackoffice/backoffice/templates/Makefile | 2 | ||||
-rw-r--r-- | talerbackoffice/backoffice/templates/translations/babel.map | 11 |
3 files changed, 7 insertions, 13 deletions
diff --git a/talerbackoffice/backoffice/backoffice.py b/talerbackoffice/backoffice/backoffice.py index ce2858e..e828310 100644 --- a/talerbackoffice/backoffice/backoffice.py +++ b/talerbackoffice/backoffice/backoffice.py @@ -26,7 +26,7 @@ import os import base64 import requests import flask -from flask.ext.babel import Babel +from flask_babel import Babel from talerbackoffice.talerconfig import TalerConfig from ..helpers import (join_urlparts, \ get_query_string, backend_error) @@ -80,8 +80,9 @@ def utility_processor(): @app.route("/<lang>/") -@app.route("/") -def index(): +@app.route("/", defaults={"lang": "en"}) +def index(lang): + # 'lang' parameter not used. return flask.render_template("templates/backoffice.html", instances=INSTANCES.split()) @app.route("/javascript") diff --git a/talerbackoffice/backoffice/templates/Makefile b/talerbackoffice/backoffice/templates/Makefile index b25897d..ba531d1 100644 --- a/talerbackoffice/backoffice/templates/Makefile +++ b/talerbackoffice/backoffice/templates/Makefile @@ -7,7 +7,7 @@ all: locale # Extract translateable strings from jinja2 templates. locale/messages.pot: *.html - env PYTHONPATH="." pybabel extract -F translations/babel.map -o translations/messages.pot . + pybabel extract -F translations/babel.map -o translations/messages.pot . # Update translation (.po) files with new strings. locale-update: locale/messages.pot diff --git a/talerbackoffice/backoffice/templates/translations/babel.map b/talerbackoffice/backoffice/templates/translations/babel.map index d596257..609bc8e 100644 --- a/talerbackoffice/backoffice/templates/translations/babel.map +++ b/talerbackoffice/backoffice/templates/translations/babel.map @@ -1,9 +1,2 @@ -[extractors] -jinja2 = i18nfix:babel_extract - -[python: **.py] - -[jinja2: **/templates/**.html] -encoding = utf-8 -lstrip_blocks = True -trim_blocks = True +[jinja2: **.html] +extensions=jinja2.ext.autoescape,jinja2.ext.with_ |