From a984947846c7b83d3151fc4987ca615edcb168ef Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 11 Oct 2020 15:05:16 +0200 Subject: i18n for survey --- .gitignore | 1 + Makefile | 16 +- babel.cfg | 2 +- bin/taler-merchant-demos | 21 ++- setup.py | 6 +- talermerchantdemos/blog/blog.py | 17 +- talermerchantdemos/blog/templates/base.html.j2 | 9 +- .../blog/templates/confirm_refund.html.j2 | 2 +- talermerchantdemos/donations/translations | 1 + talermerchantdemos/survey/survey.py | 60 ++++-- talermerchantdemos/survey/templates/base.html | 59 ------ talermerchantdemos/survey/templates/base.html.j2 | 115 +++++++++++ talermerchantdemos/survey/templates/error.html | 22 --- talermerchantdemos/survey/templates/error.html.j2 | 24 +++ talermerchantdemos/survey/templates/index.html | 26 --- talermerchantdemos/survey/templates/index.html.j2 | 26 +++ .../survey/templates/survey_stats.html | 15 -- talermerchantdemos/survey/translations | 1 + translations/de/LC_MESSAGES/messages.po | 210 +++++++++++---------- translations/messages.pot | 122 +----------- 20 files changed, 384 insertions(+), 371 deletions(-) create mode 120000 talermerchantdemos/donations/translations delete mode 100644 talermerchantdemos/survey/templates/base.html create mode 100644 talermerchantdemos/survey/templates/base.html.j2 delete mode 100644 talermerchantdemos/survey/templates/error.html create mode 100644 talermerchantdemos/survey/templates/error.html.j2 delete mode 100644 talermerchantdemos/survey/templates/index.html create mode 100644 talermerchantdemos/survey/templates/index.html.j2 delete mode 100644 talermerchantdemos/survey/templates/survey_stats.html create mode 120000 talermerchantdemos/survey/translations diff --git a/.gitignore b/.gitignore index 79ece56..65d5b00 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ talermerchantdemos/static/*.css talermerchantdemos/static/navbar.css.map translations/de/LC_MESSAGES/messages.mo +config.mk diff --git a/Makefile b/Makefile index ad285a9..47e0399 100644 --- a/Makefile +++ b/Makefile @@ -8,17 +8,17 @@ all: .PHONY: install ifeq ($(install_global), true) -install: install-global compile sass-build +install: install-global else -install: install-local compile sass-build +install: install-local endif .PHONY: install-global -install-global: +install-global: compile sass-build pip3 install . .PHONY: install-local -install-local: +install-local: compile sass-build pip3 install . --user # run testcases @@ -48,32 +48,40 @@ extract: # Add new language as follows: # pybabel init -i locale/messages.pot -d locale/ -l de +.PHONY: compile compile: update pybabel compile -d translations/ +.PHONY: update update: extract pybabel update -i translations/messages.pot -d translations/ # SASS/SCSS +.PHONY: sass-setup sass-setup: @echo "This is the initial sass-installation/setup script." @echo "This setup must run as root, on a machine that has NPM installed!" @echo "If your password is requested (for escalation), please enter it." sudo npm install -g sass +.PHONY: scss-setup scss-setup: sass-setup +.PHONY: sass-build sass-build: @echo "Warning: If Sass/Scss is not installed, please run \`make sass-setup\` first!" @echo "This script will only convert files inside /static" sass talermerchantdemos/static:talermerchantdemos/static +.PHONY: scss-build scss-build: sass-build +.PHONY: sass-autobuild sass-autobuild: @echo "Warning: If Sass/Scss is not installed, please run \`make sass-setup\` first!" @echo "This script will automatically build sass/scss files in the static directory!" sass --watch talermerchantdemos/static:talermerchantdemos/static +.PHONY: scss-autobuild scss-autobuild: sass-autobuild diff --git a/babel.cfg b/babel.cfg index cbe8963..339b5df 100644 --- a/babel.cfg +++ b/babel.cfg @@ -1,2 +1,2 @@ -[jinja2: **/templates/**.j2] +[jinja2: **/templates/**.j2 **/*.py] extensions=jinja2.ext.autoescape,jinja2.ext.with_ diff --git a/bin/taler-merchant-demos b/bin/taler-merchant-demos index f2318bf..e4286a2 100755 --- a/bin/taler-merchant-demos +++ b/bin/taler-merchant-demos @@ -73,11 +73,10 @@ def handle_serve_uwsgi(config, whichShop): # @param args command line options. def handle_serve_http(config, whichShop, port=None): if port is None: - try: - port = config[whichShop]["http_port"].value_int(required=True) - except ConfigurationError as ce: - print(ce) - exit(1) + port = config[whichShop]["http_port"].value_int(required=True) + if port is None: + print("'http_port' configuration option is missing") + exit(1) spec = ":%d" % (port,) try: os.execlp("uwsgi", "uwsgi", @@ -91,10 +90,14 @@ def handle_serve_http(config, whichShop, port=None): sys.exit(1) def handle_serve_from_config(config_obj, which_shop): - if config_obj.value_string("blog", "serve", required=True).lower() == "http": - http_port = config_obj.value_int(which_shop, "port") - return handle_serve_http(config_obj, which_shop, http_port) - handle_serve_uwsgi(config_obj, which_shop) + try: + if config_obj.value_string(which_shop, "serve", required=True).lower() == "http": + http_port = config_obj.value_int(which_shop, "port") + return handle_serve_http(config_obj, which_shop, http_port) + handle_serve_uwsgi(config_obj, which_shop) + except ConfigurationError as ce: + print(ce) + exit(1) @click.command("Global shop launcher") @click.option("--config", help="Configuration file", required=False) diff --git a/setup.py b/setup.py index aff081e..ba647d9 100755 --- a/setup.py +++ b/setup.py @@ -21,14 +21,18 @@ setup(name='talermerchantdemos', # Blog files "blog/templates/*.html", "blog/templates/*.j2", + "blog/static/favicon.ico", "blog/articles/*/*", + "blog/translations/*/LC_MESSAGES/*.mo", "blog/data/*", # Donation files "donations/templates/*.html", + "donations/translations/*/LC_MESSAGES/*.mo", # Survey files - "survey/templates/*.html", + "survey/templates/*.j2", "survey/static/favicon.ico", "survey/static/*.js", + "survey/translations/*/LC_MESSAGES/*.mo", ] }, scripts=['./bin/taler-merchant-demos'], diff --git a/talermerchantdemos/blog/blog.py b/talermerchantdemos/blog/blog.py index 7112b33..ba6571b 100644 --- a/talermerchantdemos/blog/blog.py +++ b/talermerchantdemos/blog/blog.py @@ -61,6 +61,7 @@ BASE_DIR = os.path.dirname(os.path.abspath(__file__)) app = flask.Flask( __name__, template_folder=BASE_DIR, static_folder=BASE_DIR + "/../static/" ) +app.debug = True app.secret_key = base64.b64encode(os.urandom(64)).decode("utf-8") LOGGER = logging.getLogger(__name__) @@ -81,7 +82,8 @@ babel = Babel(app) print("Using translations from:") print(list(babel.translation_directories)) translations = [str(translation) for translation in babel.list_translations()] -translations.append('en') +if not 'en' in translations: + translations.append('en') print("Operating with the following translations available:") print(translations) @@ -126,6 +128,19 @@ def index(): target = flask.request.accept_languages.best_match(translations, default) return flask.redirect("/" + target + "/", code=302) +## +# Serve the /favicon.ico requests. +# +# @return the favicon.ico file. +@app.route("/favicon.ico") +def favicon(): + LOGGER.info("will look into: " + os.path.join(app.root_path, 'static')) + return flask.send_from_directory( + os.path.join(app.root_path, 'static'), + "favicon.ico", + mimetype="image/vnd.microsoft.ico" + ) + @babel.localeselector def get_locale(): parts = request.path.split('/', 2) diff --git a/talermerchantdemos/blog/templates/base.html.j2 b/talermerchantdemos/blog/templates/base.html.j2 index 58ce857..1303276 100644 --- a/talermerchantdemos/blog/templates/base.html.j2 +++ b/talermerchantdemos/blog/templates/base.html.j2 @@ -69,8 +69,8 @@
-

Taler Demo

-

Shop

+

{{ gettext("Taler Demo")}}

+

{{ gettext("Shop") }}

{{ gettext("On this page you can buy articles using an imaginary currency.") + "
" + gettext("The articles are chapters from Richard Stallman's book "Free Software, Free Society".") + "
" + @@ -82,9 +82,9 @@

-
{% block main %} diff --git a/talermerchantdemos/blog/templates/confirm_refund.html.j2 b/talermerchantdemos/blog/templates/confirm_refund.html.j2 index 09f3730..a371645 100644 --- a/talermerchantdemos/blog/templates/confirm_refund.html.j2 +++ b/talermerchantdemos/blog/templates/confirm_refund.html.j2 @@ -17,6 +17,6 @@
- +
{% endblock main %} diff --git a/talermerchantdemos/donations/translations b/talermerchantdemos/donations/translations new file mode 120000 index 0000000..0a951f7 --- /dev/null +++ b/talermerchantdemos/donations/translations @@ -0,0 +1 @@ +../../translations/ \ No newline at end of file diff --git a/talermerchantdemos/survey/survey.py b/talermerchantdemos/survey/survey.py index b6a5ceb..140088d 100644 --- a/talermerchantdemos/survey/survey.py +++ b/talermerchantdemos/survey/survey.py @@ -1,6 +1,6 @@ ## # This file is part of GNU TALER. -# Copyright (C) 2017 Taler Systems SA +# Copyright (C) 2017, 2020 Taler Systems SA # # TALER is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free Software @@ -23,9 +23,14 @@ import base64 import logging from urllib.parse import urljoin import flask +from flask import request +from flask_babel import Babel +from flask_babel import refresh +from flask_babel import force_locale +from flask_babel import gettext import traceback from taler.util.talerconfig import TalerConfig, ConfigurationError -from ..httpcommon import backend_get, backend_post, fallback_404 +from ..httpcommon import backend_get, backend_post, self_localized import sys if not sys.version_info.major == 3 and sys.version_info.minor >= 6: @@ -37,6 +42,8 @@ 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') + +LOGGER = logging.getLogger(__name__) TC = TalerConfig.from_env() try: BACKEND_URL = TC["frontends"]["backend"].value_string(required=True) @@ -47,9 +54,30 @@ except ConfigurationError as ce: exit(1) app.config.from_object(__name__) -LOGGER = logging.getLogger(__name__) +babel = Babel(app) INSTANCED_URL = urljoin(BACKEND_URL, f"instances/survey/") +print("Using translations from:") +print(list(babel.translation_directories)) +translations = [str(translation) for translation in babel.list_translations()] +if not 'en' in translations: + translations.append('en') +print("Operating with the following translations available:") +print(translations) + +app.jinja_env.globals.update(self_localized=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" + ## # Make the environment available into templates. # @@ -80,8 +108,8 @@ def utility_processor(): @app.errorhandler(Exception) def internal_error(e): return flask.render_template( - "templates/error.html", - message="Internal error", + "templates/error.html.j2", + message=gettext("Internal error"), stack=traceback.format_exc() ) @@ -92,7 +120,7 @@ def internal_error(e): # @return the favicon.ico file. @app.route("/favicon.ico") def favicon(): - print("will look into: " + os.path.join(app.root_path, 'static')) + LOGGER.info("will look into: " + os.path.join(app.root_path, 'static')) return flask.send_from_directory( os.path.join(app.root_path, 'static'), "favicon.ico", @@ -105,7 +133,7 @@ def favicon(): # @param abort_status_code status code to return along the response. # @param params _kw_ arguments to passed verbatim to the templating engine. def err_abort(abort_status_code, **params): - t = flask.render_template("templates/error.html", **params) + t = flask.render_template("templates/error.html.j2", **params) flask.abort(flask.make_response(t, abort_status_code)) ## @@ -127,16 +155,26 @@ def submit_survey(): return flask.redirect(backend_resp["tip_status_url"]) ## -# Serve the main index page. +# Serve the main index page, redirecting to // # # @return response object of the index page. -@app.route("/", methods=["GET"]) +@app.route("/") def index(): + default = 'en' + target = flask.request.accept_languages.best_match(translations, default) + return flask.redirect("/" + target + "/", code=302) + +## +# Serve the internationalized main index page. +# +# @return response object of the index page. +@app.route("//", methods=["GET"]) +def start(lang): return flask.render_template( - "templates/index.html", merchant_currency=CURRENCY + "templates/index.html.j2", merchant_currency=CURRENCY, lang=lang ) @app.errorhandler(404) def handler(e): return flask.render_template( - "templates/error.html", message="Page not found") + "templates/error.html.j2", message=gettext("Page not found")) diff --git a/talermerchantdemos/survey/templates/base.html b/talermerchantdemos/survey/templates/base.html deleted file mode 100644 index 2eeace1..0000000 --- a/talermerchantdemos/survey/templates/base.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - Taler Survey Demo - - - - {% block styles %}{% endblock %} - {% block scripts %}{% endblock %} - - - -
-

Taler Demo

-

Survey

-

This is the survey page, which demonatrates how merchants can reward their users by paying directly into their wallet.

- -

You can learn more about Taler on our main website.

-
- -
-

Taler Survey Demo

- {% block main %} - This is the main content of the page. - {% endblock %} -
- -
- - diff --git a/talermerchantdemos/survey/templates/base.html.j2 b/talermerchantdemos/survey/templates/base.html.j2 new file mode 100644 index 0000000..b6d1c62 --- /dev/null +++ b/talermerchantdemos/survey/templates/base.html.j2 @@ -0,0 +1,115 @@ + + + + + + {{ gettext("Taler Survey Demo") }} + + + + + + {% block styles %}{% endblock %} + {% block scripts %}{% endblock %} + + + +
+

{{ gettext("Taler Demo") }}

+

{{ gettext("Survey") }}

+

{{ + gettext("This is the Taler survey demonstration.") + "
" + + gettext("It demonatrates how merchants can reward their users by granting tips.") + "
" + + gettext("Tipping is a way for offer cash rewards that go directly into a user's wallet.") + }} +

+
+ + +
+ {% block main %} + This is the main content of the page. + {% endblock %} +
+
+

{{ gettext('You can learn more about Taler on our main website.').format(site="https://taler.net/") }}

+
+

Copyright © 2014—2020 Taler Systems SA

+
+
+ + diff --git a/talermerchantdemos/survey/templates/error.html b/talermerchantdemos/survey/templates/error.html deleted file mode 100644 index 0d4bd02..0000000 --- a/talermerchantdemos/survey/templates/error.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends "templates/base.html" %} -{% block main %} -

An Error Occurred

- -

{{ message }}

- - {% if status_code %} -

The backend returned status code {{ status_code }}.

- {% endif %} - - {% if json %} -

Backend Response:

-
{{ json }}
- {% endif %} - - {% if stack %} -

Stack trace:

-
-    {{ stack }}
-  
- {% endif %} -{% endblock main %} diff --git a/talermerchantdemos/survey/templates/error.html.j2 b/talermerchantdemos/survey/templates/error.html.j2 new file mode 100644 index 0000000..ffc2e1f --- /dev/null +++ b/talermerchantdemos/survey/templates/error.html.j2 @@ -0,0 +1,24 @@ +{% extends "templates/base.html.j2" %} +{% block main %} +

{{ gettext("Error encountered") }}

+ +

{{ message }}

+ + {% if status_code %} +

+ {{ gettext ("The backend returned status code {code}.").format(code=status_code) }}. +

+ {% endif %} + + {% if json %} +

{{gettext("Backend response:")}}

+
{{ json }}
+ {% endif %} + + {% if stack %} +

{{gettext("Stack trace:")}}

+
+    {{ stack }}
+  
+ {% endif %} +{% endblock main %} diff --git a/talermerchantdemos/survey/templates/index.html b/talermerchantdemos/survey/templates/index.html deleted file mode 100644 index f40c235..0000000 --- a/talermerchantdemos/survey/templates/index.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends "templates/base.html" %} - -{% block main %} -
-

- In this page, you can participate in our survey about payment systems - and get a nice tip - via your Taler wallet - from this shop! -

-
-
-
- What do you prefer? -
- - -
- -
-
-{% endblock %} diff --git a/talermerchantdemos/survey/templates/index.html.j2 b/talermerchantdemos/survey/templates/index.html.j2 new file mode 100644 index 0000000..9c9df5b --- /dev/null +++ b/talermerchantdemos/survey/templates/index.html.j2 @@ -0,0 +1,26 @@ +{% extends "templates/base.html.j2" %} +{% block main %} +
+

+ {{ + gettext("On this page, you can participate in our survey about payment systems and receive a tip in return.") + }} +

+
+
+
+ {{ gettext("Which payment system do you prefer?") }} +
+ + +
+ +
+
+{% endblock %} diff --git a/talermerchantdemos/survey/templates/survey_stats.html b/talermerchantdemos/survey/templates/survey_stats.html deleted file mode 100644 index 41cb437..0000000 --- a/talermerchantdemos/survey/templates/survey_stats.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "templates/base.html" %} - -{% block main %} -
-

This page shows information about the tipping configuration of the - merchant. Usually this should not be visible to users.

-
    -
  • Reserve pub: {{ stats['reserve_pub'] }}
  • -
  • Reserve expiration: {{ prettydate(stats['reserve_expiration']) }}
  • -
  • Amount available {{ stats['amount_available'] }}
  • -
  • Amount picked up {{ stats['amount_picked_up'] }}
  • -
  • Amount authorized {{ stats['amount_authorized'] }}
  • -
      -
-{% endblock %} diff --git a/talermerchantdemos/survey/translations b/talermerchantdemos/survey/translations new file mode 120000 index 0000000..0a951f7 --- /dev/null +++ b/talermerchantdemos/survey/translations @@ -0,0 +1 @@ +../../translations/ \ No newline at end of file diff --git a/translations/de/LC_MESSAGES/messages.po b/translations/de/LC_MESSAGES/messages.po index e88de1e..b7a78fc 100644 --- a/translations/de/LC_MESSAGES/messages.po +++ b/translations/de/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2020-10-11 13:28+0200\n" +"POT-Creation-Date: 2020-10-11 15:01+0200\n" "PO-Revision-Date: 2020-10-09 21:25+0200\n" "Last-Translator: FULL NAME \n" "Language: de\n" @@ -18,123 +18,143 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.6.0\n" -#: talermerchantdemos/blog/templates/article_frame.html.j2:9 -msgid "You did not like this article?" -msgstr "" +#~ msgid "You did not like this article?" +#~ msgstr "" -#: talermerchantdemos/blog/templates/article_frame.html.j2:10 -msgid "" -"You can request a refund within the first hour " -"after buying it." -msgstr "" +#~ msgid "" +#~ "You can request a " +#~ "refund within the first hour after" +#~ " buying it." +#~ msgstr "" -#: talermerchantdemos/blog/templates/base.html.j2:23 -msgid "Taler Essay Shop Demo" -msgstr "" +#~ msgid "Taler Essay Shop Demo" +#~ msgstr "" -#: talermerchantdemos/blog/templates/base.html.j2:75 -msgid "On this page you can buy articles using an imaginary currency." -msgstr "" +#~ msgid "Taler Demo" +#~ msgstr "" -#: talermerchantdemos/blog/templates/base.html.j2:76 -msgid "" -"The articles are chapters from Richard Stallman's book "Free " -"Software, Free Society"." -msgstr "" +#~ msgid "Shop" +#~ msgstr "" -#: talermerchantdemos/blog/templates/base.html.j2:77 -msgid "" -"The book is published by the FSF and available " -"gratis at gnu.org." -msgstr "" +#~ msgid "On this page you can buy articles using an imaginary currency." +#~ msgstr "" -#: talermerchantdemos/blog/templates/base.html.j2:83 -msgid "Introduction" -msgstr "" +#~ msgid "" +#~ "The articles are chapters from Richard" +#~ " Stallman's book "Free Software, Free" +#~ " Society"." +#~ msgstr "" -#: talermerchantdemos/blog/templates/base.html.j2:84 -msgid "Bank" -msgstr "" +#~ msgid "" +#~ "The book is published " +#~ "by the FSF and available gratis " +#~ "at gnu.org." +#~ msgstr "" -#: talermerchantdemos/blog/templates/base.html.j2:85 -msgid "Essay Shop" -msgstr "" +#~ msgid "Introduction" +#~ msgstr "" -#: talermerchantdemos/blog/templates/base.html.j2:86 -msgid "Donations" -msgstr "" +#~ msgid "Bank" +#~ msgstr "" -#: talermerchantdemos/blog/templates/base.html.j2:87 -msgid "Tipping/Survey" -msgstr "" +#~ msgid "Essay Shop" +#~ msgstr "" -#: talermerchantdemos/blog/templates/base.html.j2:88 -msgid "Back-office" -msgstr "" +#~ msgid "Donations" +#~ msgstr "" -#: talermerchantdemos/blog/templates/base.html.j2:90 -msgid "English [en]" -msgstr "" +#~ msgid "Tipping/Survey" +#~ msgstr "" -#: talermerchantdemos/blog/templates/base.html.j2:113 -msgid "You can learn more about Taler on our main website." -msgstr "" +#~ msgid "Back-office" +#~ msgstr "" -#: talermerchantdemos/blog/templates/error.html.j2:3 -msgid "Error encountered" -msgstr "" +#~ msgid "English [en]" +#~ msgstr "" -#: talermerchantdemos/blog/templates/error.html.j2:9 -msgid "The backend returned status code {code}." -msgstr "" +#~ msgid "" +#~ "You can learn more about Taler on" +#~ " our main website." +#~ msgstr "" -#: talermerchantdemos/blog/templates/error.html.j2:14 -msgid "Backend response:" -msgstr "" +#~ msgid "Error encountered" +#~ msgstr "" -#: talermerchantdemos/blog/templates/error.html.j2:19 -msgid "Stack trace:" -msgstr "" +#~ msgid "The backend returned status code {code}." +#~ msgstr "" -#: talermerchantdemos/blog/templates/index.html.j2:3 -msgid "Essay Shop: Free Software, Free Society" -msgstr "Essay Laden: Freie Software, Freie Gesellschaft" +#~ msgid "Backend response:" +#~ msgstr "" -#: talermerchantdemos/blog/templates/index.html.j2:5 -msgid "" -"This is the latest edition of Free Software, Free Society: Selected" -" Essays of Richard M. Stallman." -msgstr "" +#~ msgid "Stack trace:" +#~ msgstr "" -#: talermerchantdemos/blog/templates/index.html.j2:13 -msgid "" -"Verbatim copying and distribution of this entire book are permitted " -"worldwide, without royalty, in any medium, provided this notice is " -"preserved. Permission is granted to copy and distribute translations of " -"this book from the original English into another language provided the " -"translation has been approved by the Free Software Foundation and the " -"copyright notice and this permission notice are preserved on all copies." -msgstr "" +#~ msgid "Essay Shop: Free Software, Free Society" +#~ msgstr "Essay Laden: Freie Software, Freie Gesellschaft" -#: talermerchantdemos/blog/templates/index.html.j2:18 -msgid "Chapters" -msgstr "" +#~ msgid "" +#~ "This is the latest edition of " +#~ "Free Software, Free Society: Selected" +#~ " Essays of Richard M. Stallman." +#~ msgstr "" -#: talermerchantdemos/blog/templates/index.html.j2:21 -msgid "Click on an individual chapter to to purchase it with GNU Taler." -msgstr "" +#~ msgid "" +#~ "Verbatim copying and distribution of " +#~ "this entire book are permitted " +#~ "worldwide, without royalty, in any " +#~ "medium, provided this notice is " +#~ "preserved. Permission is granted to copy" +#~ " and distribute translations of this " +#~ "book from the original English into " +#~ "another language provided the translation " +#~ "has been approved by the Free " +#~ "Software Foundation and the copyright " +#~ "notice and this permission notice are" +#~ " preserved on all copies." +#~ msgstr "" -#: talermerchantdemos/blog/templates/index.html.j2:22 -msgid "" -"You can get free, virtual money to buy articles on this page at the bank" -msgstr "" +#~ msgid "Chapters" +#~ msgstr "" -#: talermerchantdemos/blog/templates/index.html.j2:30 -msgid "Pay to read more..." -msgstr "" +#~ msgid "Click on an individual chapter to to purchase it with GNU Taler." +#~ msgstr "" -#: talermerchantdemos/blog/templates/index.html.j2:33 -msgid "No articles available in this language." -msgstr "" +#~ msgid "" +#~ "You can get free, virtual money to" +#~ " buy articles on this page at " +#~ "the bank" +#~ msgstr "" + +#~ msgid "Pay to read more..." +#~ msgstr "" + +#~ msgid "No articles available in this language." +#~ msgstr "" + +#~ msgid "Taler Survey Demo" +#~ msgstr "" + +#~ msgid "Survey" +#~ msgstr "" + +#~ msgid "This is the Taler survey demonstration." +#~ msgstr "" + +#~ msgid "It demonatrates how merchants can reward their users by granting tips." +#~ msgstr "" + +#~ msgid "" +#~ "Tipping is a way for offer cash" +#~ " rewards that go directly into a " +#~ "user's wallet." +#~ msgstr "" + +#~ msgid "" +#~ "On this page, you can participate " +#~ "in our survey about payment systems " +#~ "and receive a tip in return." +#~ msgstr "" + +#~ msgid "Which payment system do you prefer?" +#~ msgstr "" diff --git a/translations/messages.pot b/translations/messages.pot index 8a8b012..368a4bb 100644 --- a/translations/messages.pot +++ b/translations/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2020-10-11 13:28+0200\n" +"POT-Creation-Date: 2020-10-11 15:01+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,123 +17,3 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.6.0\n" -#: talermerchantdemos/blog/templates/article_frame.html.j2:9 -msgid "You did not like this article?" -msgstr "" - -#: talermerchantdemos/blog/templates/article_frame.html.j2:10 -msgid "" -"You can request a refund within the first hour " -"after buying it." -msgstr "" - -#: talermerchantdemos/blog/templates/base.html.j2:23 -msgid "Taler Essay Shop Demo" -msgstr "" - -#: talermerchantdemos/blog/templates/base.html.j2:75 -msgid "On this page you can buy articles using an imaginary currency." -msgstr "" - -#: talermerchantdemos/blog/templates/base.html.j2:76 -msgid "" -"The articles are chapters from Richard Stallman's book "Free " -"Software, Free Society"." -msgstr "" - -#: talermerchantdemos/blog/templates/base.html.j2:77 -msgid "" -"The book is published by the FSF and available " -"gratis at gnu.org." -msgstr "" - -#: talermerchantdemos/blog/templates/base.html.j2:83 -msgid "Introduction" -msgstr "" - -#: talermerchantdemos/blog/templates/base.html.j2:84 -msgid "Bank" -msgstr "" - -#: talermerchantdemos/blog/templates/base.html.j2:85 -msgid "Essay Shop" -msgstr "" - -#: talermerchantdemos/blog/templates/base.html.j2:86 -msgid "Donations" -msgstr "" - -#: talermerchantdemos/blog/templates/base.html.j2:87 -msgid "Tipping/Survey" -msgstr "" - -#: talermerchantdemos/blog/templates/base.html.j2:88 -msgid "Back-office" -msgstr "" - -#: talermerchantdemos/blog/templates/base.html.j2:90 -msgid "English [en]" -msgstr "" - -#: talermerchantdemos/blog/templates/base.html.j2:113 -msgid "You can learn more about Taler on our main website." -msgstr "" - -#: talermerchantdemos/blog/templates/error.html.j2:3 -msgid "Error encountered" -msgstr "" - -#: talermerchantdemos/blog/templates/error.html.j2:9 -msgid "The backend returned status code {code}." -msgstr "" - -#: talermerchantdemos/blog/templates/error.html.j2:14 -msgid "Backend response:" -msgstr "" - -#: talermerchantdemos/blog/templates/error.html.j2:19 -msgid "Stack trace:" -msgstr "" - -#: talermerchantdemos/blog/templates/index.html.j2:3 -msgid "Essay Shop: Free Software, Free Society" -msgstr "" - -#: talermerchantdemos/blog/templates/index.html.j2:5 -msgid "" -"This is the latest edition of Free Software, Free Society: Selected" -" Essays of Richard M. Stallman." -msgstr "" - -#: talermerchantdemos/blog/templates/index.html.j2:13 -msgid "" -"Verbatim copying and distribution of this entire book are permitted " -"worldwide, without royalty, in any medium, provided this notice is " -"preserved. Permission is granted to copy and distribute translations of " -"this book from the original English into another language provided the " -"translation has been approved by the Free Software Foundation and the " -"copyright notice and this permission notice are preserved on all copies." -msgstr "" - -#: talermerchantdemos/blog/templates/index.html.j2:18 -msgid "Chapters" -msgstr "" - -#: talermerchantdemos/blog/templates/index.html.j2:21 -msgid "Click on an individual chapter to to purchase it with GNU Taler." -msgstr "" - -#: talermerchantdemos/blog/templates/index.html.j2:22 -msgid "" -"You can get free, virtual money to buy articles on this page at the bank" -msgstr "" - -#: talermerchantdemos/blog/templates/index.html.j2:30 -msgid "Pay to read more..." -msgstr "" - -#: talermerchantdemos/blog/templates/index.html.j2:33 -msgid "No articles available in this language." -msgstr "" - -- cgit v1.2.3