diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2018-09-03 09:45:51 +0200 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2018-09-03 09:45:51 +0200 |
commit | bf0ee5b6a14d512d98cb659607ffb44c68ae6705 (patch) | |
tree | 1aa0337ffaf2ad8ee42e453b85b0c9e10412c6e2 | |
parent | 397462bf4c02ac05f7913e05c5cca0ac7dcf6d4c (diff) | |
download | backoffice-bf0ee5b6a14d512d98cb659607ffb44c68ae6705.tar.gz backoffice-bf0ee5b6a14d512d98cb659607ffb44c68ae6705.tar.bz2 backoffice-bf0ee5b6a14d512d98cb659607ffb44c68ae6705.zip |
Include .mo(s) among prefix-installed bundle.
-rwxr-xr-x | setup.py | 7 | ||||
-rw-r--r-- | talerbackoffice/backoffice/backoffice.py | 8 | ||||
-rw-r--r-- | talerbackoffice/backoffice/templates/backoffice.html | 2 |
3 files changed, 12 insertions, 5 deletions
@@ -18,6 +18,13 @@ setup(name='talerbackoffice', "backoffice/static/*.css", "backoffice/static/*.svg", "backoffice/templates/*.html", + "backoffice/templates/translations/it/LC_MESSAGES/messages.mo", + "backoffice/templates/translations/en/LC_MESSAGES/messages.mo", + "backoffice/templates/translations/de/LC_MESSAGES/messages.mo", + "backoffice/templates/translations/es/LC_MESSAGES/messages.mo", + "backoffice/templates/translations/pt/LC_MESSAGES/messages.mo", + "backoffice/templates/translations/fr/LC_MESSAGES/messages.mo", + "backoffice/templates/translations/ru/LC_MESSAGES/messages.mo", "backoffice/static/web-common/*.png", "backoffice/static/web-common/*.css", "backoffice/static/web-common/*.js", diff --git a/talerbackoffice/backoffice/backoffice.py b/talerbackoffice/backoffice/backoffice.py index e828310..206e527 100644 --- a/talerbackoffice/backoffice/backoffice.py +++ b/talerbackoffice/backoffice/backoffice.py @@ -60,10 +60,10 @@ LANGUAGES = { @babel.localeselector def get_locale(): - # Locale extraction should be made from the URL. - return "en" - - # To be activated once the i18n machinery is up. + return "it" + + # BUG: qs is always empty. + print("get_locale dead code") qs = get_query_string().decode("utf-8") for token in qs.split("/"): if "" == token: diff --git a/talerbackoffice/backoffice/templates/backoffice.html b/talerbackoffice/backoffice/templates/backoffice.html index 063a28f..324779a 100644 --- a/talerbackoffice/backoffice/templates/backoffice.html +++ b/talerbackoffice/backoffice/templates/backoffice.html @@ -11,7 +11,7 @@ <br /> <div> - <span style="margin-right: 10px;">Current instance:</span> + <span style="margin-right: 10px;">{% trans %}Current instance:{% endtrans %}</span> <select id="instance" onchange="change_instance();"> {% for instance in instances %} <option value="{{ instance }}">{{ instance }}</option> |