gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-backoffice] branch master updated (397462b -> 9c7b98


From: gnunet
Subject: [GNUnet-SVN] [taler-backoffice] branch master updated (397462b -> 9c7b98a)
Date: Mon, 03 Sep 2018 15:32:11 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a change to branch master
in repository backoffice.

    from 397462b  Fix babel.map
     new bf0ee5b  Include .mo(s) among prefix-installed bundle.
     new 9c7b98a  fix translations paths.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 setup.py                                             | 8 ++++++++
 talerbackoffice/backoffice/backoffice.py             | 9 +++++----
 talerbackoffice/backoffice/templates/backoffice.html | 2 +-
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/setup.py b/setup.py
index b898565..e4f4ecf 100755
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,15 @@ setup(name='talerbackoffice',
               "backoffice/static/*.js",
               "backoffice/static/*.css",
               "backoffice/static/*.svg",
+              "backoffice/trans_dirs.cfg",
               "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..5f81602 100644
--- a/talerbackoffice/backoffice/backoffice.py
+++ b/talerbackoffice/backoffice/backoffice.py
@@ -38,6 +38,7 @@ BASE_DIR = os.path.dirname(os.path.abspath(__file__))
 app = flask.Flask(__name__, template_folder=BASE_DIR)
 app.debug = True
 app.secret_key = base64.b64encode(os.urandom(64)).decode('utf-8')
+app.config.from_pyfile("trans_dirs.cfg")
 babel = Babel(app)
 
 TC = TalerConfig.from_env()
@@ -60,10 +61,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>  

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]