summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rwxr-xr-xsetup.py2
-rw-r--r--talermerchantdemos/donations/donations.py115
-rw-r--r--talermerchantdemos/donations/templates/base.html55
-rw-r--r--talermerchantdemos/donations/templates/base.html.j2115
-rw-r--r--talermerchantdemos/donations/templates/checkout.html59
-rw-r--r--talermerchantdemos/donations/templates/checkout.html.j246
-rw-r--r--talermerchantdemos/donations/templates/error.html22
-rw-r--r--talermerchantdemos/donations/templates/error.html.j224
-rw-r--r--talermerchantdemos/donations/templates/fulfillment.html11
-rw-r--r--talermerchantdemos/donations/templates/fulfillment.html.j222
-rw-r--r--talermerchantdemos/donations/templates/index.html42
-rw-r--r--talermerchantdemos/donations/templates/index.html.j244
-rw-r--r--talermerchantdemos/donations/templates/provider-not-supported.html.j2 (renamed from talermerchantdemos/donations/templates/provider-not-supported.html)0
-rw-r--r--talermerchantdemos/survey/survey.py11
-rw-r--r--translations/de/LC_MESSAGES/messages.po132
-rw-r--r--translations/messages.pot132
17 files changed, 607 insertions, 230 deletions
diff --git a/Makefile b/Makefile
index 47e0399..10a2a01 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,10 @@ install_global=false
.PHONY: all
all:
- @echo "This is a python project, no compilation required\nSCSS/SASS Initial Setup: make sass-setup\nSCSS/SASS Build (for static files): make sass-build"
+ @echo "This is a python project, no compilation required"
+ @echo "SCSS/SASS Initial Setup: make sass-setup"
+ @echo "SCSS/SASS Build (for static files): make sass-build"
+ @echo "Installation: make install"
.PHONY: install
diff --git a/setup.py b/setup.py
index ba647d9..1a031e3 100755
--- a/setup.py
+++ b/setup.py
@@ -26,7 +26,7 @@ setup(name='talermerchantdemos',
"blog/translations/*/LC_MESSAGES/*.mo",
"blog/data/*",
# Donation files
- "donations/templates/*.html",
+ "donations/templates/*.j2",
"donations/translations/*/LC_MESSAGES/*.mo",
# Survey files
"survey/templates/*.j2",
diff --git a/talermerchantdemos/donations/donations.py b/talermerchantdemos/donations/donations.py
index 3f021f9..19fc235 100644
--- a/talermerchantdemos/donations/donations.py
+++ b/talermerchantdemos/donations/donations.py
@@ -1,6 +1,6 @@
##
# This file is part of GNU TALER.
-# Copyright (C) 2014-2016 INRIA
+# Copyright (C) 2014-2016, 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
@@ -20,13 +20,18 @@
import base64
import logging
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 os
import time
import traceback
import urllib
from taler.util.talerconfig import TalerConfig, ConfigurationError
from urllib.parse import urljoin
-from ..httpcommon import backend_post, backend_get, fallback_404
+from ..httpcommon import backend_post, backend_get, fallback_404, self_localized
import sys
if not sys.version_info.major == 3 and sys.version_info.minor >= 6:
@@ -52,6 +57,28 @@ except ConfigurationError as ce:
exit(1)
app.config.from_object(__name__)
+babel = Babel(app)
+
+
+LOGGER.info("Using translations from:" + ':'.join(list(babel.translation_directories)))
+translations = [str(translation) for translation in babel.list_translations()]
+if not 'en' in translations:
+ translations.append('en')
+LOGGER.info("Operating with the following translations available: " + ' '.join(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"
##
@@ -73,7 +100,10 @@ def utility_processor():
# @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",
+ lang=get_locale(),
+ **params)
flask.abort(flask.make_response(t, abort_status_code))
@@ -110,7 +140,7 @@ def backend_instanced_post(instance, endpoint, json):
def expect_parameter(name):
val = flask.request.args.get(name)
if not val:
- return err_abort(400, message="parameter '{}' required".format(name))
+ return err_abort(400, message=gettext("parameter '{}' required").format(name))
return val
@@ -123,17 +153,47 @@ def expect_parameter(name):
@app.errorhandler(Exception)
def internal_error(e):
return flask.render_template(
- "templates/error.html", message="Internal error", stack=traceback.format_exc()
+ "templates/error.html.j2",
+ message=gettext("Internal error"),
+ lang=get_locale(),
+ stack=traceback.format_exc()
)
+##
+# 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"
+ )
##
-# Serve the main index page.
+# Serve the main index page, redirecting to /<lang>/
#
# @return response object of the index page.
@app.route("/")
def index():
- return flask.render_template("templates/index.html", merchant_currency=CURRENCY)
+ default = 'en'
+ target = flask.request.accept_languages.best_match(translations, default)
+ return flask.redirect("/" + target + "/", code=302)
+
+
+##
+# Serve the main index page.
+#
+# @return response object of the index page.
+@app.route("/<lang>/")
+def start(lang):
+ return flask.render_template(
+ "templates/index.html.j2",
+ lang=lang,
+ merchant_currency=CURRENCY
+ )
##
@@ -151,16 +211,17 @@ def javascript_licensing():
# and finally confirm the donation.
#
# @return response object for the /checkout page.
-@app.route("/checkout", methods=["GET"])
-def checkout():
+@app.route("/<lang>/checkout", methods=["GET"])
+def checkout(lang):
amount = expect_parameter("donation_amount")
donation_receiver = expect_parameter("donation_receiver")
donation_donor = expect_parameter("donation_donor")
return flask.render_template(
- "templates/checkout.html",
+ "templates/checkout.html.j2",
donation_amount=amount,
donation_receiver=donation_receiver,
donation_donor=donation_donor,
+ lang=lang,
merchant_currency=CURRENCY,
)
@@ -170,9 +231,12 @@ def checkout():
# of further processing the payment method they chose.
#
# @return response object about the mentioned impossibility.
-@app.route("/provider-not-supported")
+@app.route("/<lang>/provider-not-supported")
def provider_not_supported():
- return flask.render_template("templates/provider-not-supported.html")
+ return flask.render_template(
+ "templates/provider-not-supported.html.j2",
+ lang=lang
+ )
##
@@ -182,17 +246,19 @@ def provider_not_supported():
# @return response object that will redirect the browser to
# the fulfillment URL, where all the pay-logic will
# happen.
-@app.route("/donate")
-def donate():
+@app.route("/<lang>/donate")
+def donate(lang):
donation_receiver = expect_parameter("donation_receiver")
donation_amount = expect_parameter("donation_amount")
donation_donor = expect_parameter("donation_donor")
payment_system = expect_parameter("payment_system")
if payment_system != "taler":
- return flask.redirect(flask.url_for("provider_not_supported"))
+ return flask.redirect(flask.url_for("provider_not_supported",
+ lang=lang))
fulfillment_url = flask.url_for(
"fulfillment",
timestamp=str(time.time()),
+ lang=lang,
receiver=donation_receiver,
_external=True,
)
@@ -200,7 +266,9 @@ def donate():
order = dict(
amount=donation_amount,
extra=dict(
- donor=donation_donor, receiver=donation_receiver, amount=donation_amount
+ donor=donation_donor,
+ receiver=donation_receiver,
+ amount=donation_amount
),
fulfillment_url=fulfillment_url,
summary="Donation to {}".format(donation_receiver),
@@ -211,7 +279,10 @@ def donate():
)
order_id = order_resp["order_id"]
return flask.redirect(
- flask.url_for("fulfillment", receiver=donation_receiver, order_id=order_id)
+ flask.url_for("fulfillment",
+ receiver=donation_receiver,
+ lang=lang,
+ order_id=order_id)
)
@@ -223,8 +294,8 @@ def donate():
# @return after the wallet sent the payment, the final HTML "congrats"
# page is returned; otherwise, the browser will be redirected
# to a page that accepts the payment.
-@app.route("/donation/<receiver>")
-def fulfillment(receiver):
+@app.route("/<lang>/donation/<receiver>")
+def fulfillment(lang,receiver):
order_id = expect_parameter("order_id")
pay_params = dict(order_id=order_id)
pay_status = backend_instanced_get(
@@ -239,6 +310,7 @@ def fulfillment(receiver):
donation_amount=extra["amount"],
donation_donor=extra["donor"],
order_id=order_id,
+ lang=lang,
currency=CURRENCY,
)
return flask.redirect(pay_status["order_status_url"])
@@ -246,4 +318,7 @@ def fulfillment(receiver):
@app.errorhandler(404)
def handler(e):
return flask.render_template(
- "templates/error.html", message="Page not found")
+ "templates/error.html.j2",
+ lang=get_locale(),
+ message=gettext("Page not found")
+ )
diff --git a/talermerchantdemos/donations/templates/base.html b/talermerchantdemos/donations/templates/base.html
deleted file mode 100644
index 7456dca..0000000
--- a/talermerchantdemos/donations/templates/base.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE html>
-<!--
- This file is part of GNU TALER.
- Copyright (C) 2014, 2015, 2016 INRIA
-
- 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
- Foundation; either version 2.1, or (at your option) any later version.
-
- TALER is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License along with
- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
--->
-
-<html data-taler-nojs="true">
-<head>
- <title>Taler Donation Demo</title>
- <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='pure.css') }}" />
- <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='demo.css') }}" />
- <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='taler-fallback.css') }}" id="taler-presence-stylesheet" />
- {% block styles %}{% endblock %}
- {% block scripts %}{% endblock %}
-</head>
-
-<body>
- <div class="demobar">
- <h1><span class="tt adorn-brackets">Taler Demo</span></h1>
- <h1><span class="it"><a href="{{ env('TALER_ENV_URL_MERCHANT_DONATIONS') }}">Donations</a></span></h1>
- <p>This is the donation page, you can make donations (with an imaginary currency for now) to free software projects.</p>
- <ul>
- <li><a href="{{ env('TALER_ENV_URL_INTRO', '#') }}">Introduction</a></li>
- <li><a href="{{ env('TALER_ENV_URL_BANK', '#') }}">Bank</a></li>
- <li><a href="{{ env('TALER_ENV_URL_MERCHANT_BLOG', '#') }}">Essay Shop</a></li>
- <li><a href="{{ env('TALER_ENV_URL_MERCHANT_DONATIONS', '#') }}">Donations</a></li>
- <li><a href="{{ env('TALER_ENV_URL_MERCHANT_SURVEY', '#') }}">Tipping/Survey</a></li>
- <li><a href="{{ env('TALER_ENV_URL_BACKOFFICE', '#') }}">Back-office</a></li>
- </ul>
- <p>You can learn more about Taler on our main <a href="https://taler.net">website</a>.</p>
- </div>
-
- <section id="main" class="content">
- {% block main %}
- This is the main content of the page.
- {% endblock %}
- <hr />
- <div class="copyright">
- <p>Copyright &copy; 2014&mdash;2017 INRIA</p>
- <a href="/javascript" data-jslicense="1" class="jslicenseinfo">JavaScript license information</a>
- </div>
- </section>
-</body>
-</html>
diff --git a/talermerchantdemos/donations/templates/base.html.j2 b/talermerchantdemos/donations/templates/base.html.j2
new file mode 100644
index 0000000..b67658b
--- /dev/null
+++ b/talermerchantdemos/donations/templates/base.html.j2
@@ -0,0 +1,115 @@
+<!DOCTYPE html>
+<!--
+ This file is part of GNU TALER.
+ Copyright (C) 2014, 2015, 2016, 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
+ Foundation; either version 2.1, or (at your option) any later version.
+
+ TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License along with
+ TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+-->
+
+<html data-taler-nojs="true">
+<head>
+ <title>{{ gettext("Taler Donation Demo") }}</title>
+ <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='pure.css') }}" />
+ <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='demo.css') }}" />
+ <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='navbar.css') }}" />
+ <style>
+ .warn {
+ background-color: #aa393977;
+ padding: 1em;
+ }
+ @keyframes hoveranim {
+ from {left:0;}
+ to {left:1vw;}
+ }
+ @keyframes hoveranimrevert {
+ from {left:1vw;}
+ to {left:0;}
+ }
+ .notice {
+ border-radius: 1em;
+ background: #0333;
+ border-left: 0.3em solid #033;
+ padding-left: 1em;
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ margin-top: 2em;
+ margin-bottom: 2em;
+ }
+ .notice {
+ position: relative;
+ left: 0;
+ animation-name: hoveranimrevert;
+ animation-duration: 1s;
+ }
+ .notice:hover {
+ left: 1vw;
+ animation-name: hoveranim;
+ animation-duration: 1s;
+ }
+ #main a:link, #main a:visited, #main a:hover, #main a:active {
+ color: black;
+ }
+ </style>
+
+ {% block styles %}{% endblock %}
+ {% block scripts %}{% endblock %}
+</head>
+
+<body>
+ <header class="demobar" style="display: flex; flex-direction: column;">
+ <h1><span class="tt adorn-brackets">{{ gettext("Taler Demo") }}</span></h1>
+ <h1><span class="it"><a href="{{ env('TALER_ENV_URL_MERCHANT_DONATIONS') }}">{{gettext("Donations")}}</a></span></h1>
+ <p>{{
+ gettext ("This is the donation page.") + "<br>" +
+ gettext ("Using this page you can make donations (in an imaginary currency) to Free Software projects.")
+ }}
+ </p>
+ </header>
+
+ <div style="display:flex; flex-direction: column;" class="navcontainer">
+ <nav class="demolist">
+ <a href="{{ env('TALER_ENV_URL_INTRO', '#') }}">{{gettext("Introduction")}}</a>
+ <a href="{{ env('TALER_ENV_URL_BANK', '#') }}">{{gettext("Bank")}}</a>
+ <a href="{{ env('TALER_ENV_URL_MERCHANT_BLOG', '#') }}">{{gettext("Essay Shop")}}</a>
+ <a href="{{ env('TALER_ENV_URL_MERCHANT_DONATIONS', '#') }}" class="active>">{{gettext("Donations")}}</a>
+ <a href="{{ env('TALER_ENV_URL_MERCHANT_SURVEY', '#') }}">{{gettext("Tipping/Survey")}}</a>
+ <!-- a href="{{ env('TALER_ENV_URL_BACKOFFICE', '#') }}">{{gettext("Back-office")}}</a -->
+ <span class="right">
+ {{ gettext("English [en]") }}
+ <!-- <input type="checkbox"> -->
+ <div class="nav">
+ <br>
+ <!--<hr style="width: 100%;">-->
+ {% if lang != 'en' %}
+ <a href="/en/" class="navbtn">English [en]</a><br>
+ {% endif %}
+ {% if lang != 'de' %}
+ <a href="/de/" class="navbtn">Deutsch [de]</a><br>
+ {% endif %}
+ </div>
+ </span>
+ </nav>
+ </div>
+
+ <section id="main" class="content">
+ {% block main %}
+ This is the main content of the page.
+ {% endblock %}
+ <hr />
+ <div>
+ <p>{{ gettext('You can learn more about Taler on our main <a href="{site}">website</a>.').format(site="https://taler.net/") }}</p>
+ <div style="flex-grow:1"></div>
+ <p>Copyright &copy; 2014&mdash;2020 Taler Systems SA</p>
+ </div>
+ </section>
+</body>
+</html>
diff --git a/talermerchantdemos/donations/templates/checkout.html b/talermerchantdemos/donations/templates/checkout.html
deleted file mode 100644
index 5c3e116..0000000
--- a/talermerchantdemos/donations/templates/checkout.html
+++ /dev/null
@@ -1,59 +0,0 @@
-{% extends "templates/base.html" %}
-
-{% block main %}
-<article>
- <h1>Select your payment method</h1>
-
- <p>
- This is an example for a "checkout" page of a Web shop.
- On the previous page, you have created the shopping cart
- and decided which product to buy (i.e. which project to
- donate KUDOS to). Now in this page, you are asked to
- select a payment option. As Taler is not yet universally
- used, we expect merchants will offer various payment options.
- </p>
- <p>
- The page also demonstrates how to only enable (or show) the Taler
- option if Taler is actually supported by the browser. For example,
- if you disable the Taler extension now, the Taler payment option
- will be disabled in the page. Naturally, you could also trivially
- hide the Taler option entirely by changing the visibility instead.
- </p>
- <p>
- Note that you MUST select Taler here for the demo to continue,
- as the other payment options are just placeholders and not
- really working in the demonstration. Also, it is of course
- possible to ask the user to make this choice already on the
- previous page (with the shopping cart), we just separated the
- two steps to keep each step as simple as possible.
- </p>
-
- <form name="tform" action="{{ url_for('donate') }}" method="get">
- <div id="opt-form" align="left"><br>
- <input type="hidden" name="donation_receiver" value="{{ donation_receiver }}">
- <input type="hidden" name="donation_amount" value="{{ donation_amount }}">
- <input type="hidden" name="donation_donor" value="{{ donation_donor }}">
-
- <input type="radio" name="payment_system" value="lisa" id="radio-lisa">
- <label for="radio-lisa">Lisa</input>
- <br/>
-
- <input type="radio" name="payment_system" value="ycard" id="radio-ycard">
- <label for="radio-ycard">You Card</label>
- <br/>
-
- <input type="radio" name="payment_system" value="cardme" id="radio-cardme">
- <label for="radio-cardme">Card Me</label>
- <br/>
-
- <input type="radio" name="payment_system" value="taler" checked id="radio-taler">
- <label for=radio-taler">Taler</label>
- <br/>
-
- <input id="select-payment-method" type="submit" value="Ok"></input>
- </div>
- </form>
-
-</article>
-
-{% endblock main %}
diff --git a/talermerchantdemos/donations/templates/checkout.html.j2 b/talermerchantdemos/donations/templates/checkout.html.j2
new file mode 100644
index 0000000..5251fdf
--- /dev/null
+++ b/talermerchantdemos/donations/templates/checkout.html.j2
@@ -0,0 +1,46 @@
+{% extends "templates/base.html.j2" %}
+
+{% block main %}
+<article>
+ <h1>{{ gettext("Select your payment method") }}</h1>
+
+ <p>
+ {{
+ gettext('This is an example for a "checkout" page of a Web shop. On the previous page, you have created the shopping cart and decided which product to buy (i.e. which project to donate KUDOS to). Now in this page, you are asked to select a payment option. As Taler is not yet universally used, we expect merchants will offer various payment options.')
+ }}
+ </p>
+ <p>
+ {{
+ gettext('Note that you MUST select Taler here for the demo to continue, as the other payment options are just placeholders and not really working in the demonstration. Also, it is of course possible to ask the user to make this choice already on the previous page (with the shopping cart), we just separated the two steps to keep each step as simple as possible.')
+ }}
+ </p>
+
+ <form name="tform" action="{{ url_for('donate',lang=lang) }}" method="get">
+ <div id="opt-form" align="left"><br>
+ <input type="hidden" name="donation_receiver" value="{{ donation_receiver }}">
+ <input type="hidden" name="donation_amount" value="{{ donation_amount }}">
+ <input type="hidden" name="donation_donor" value="{{ donation_donor }}">
+
+ <input type="radio" name="payment_system" value="lisa" id="radio-lisa">
+ <label for="radio-lisa">Lisa</input>
+ <br/>
+
+ <input type="radio" name="payment_system" value="ycard" id="radio-ycard">
+ <label for="radio-ycard">You Card</label>
+ <br/>
+
+ <input type="radio" name="payment_system" value="cardme" id="radio-cardme">
+ <label for="radio-cardme">Card Me</label>
+ <br/>
+
+ <input type="radio" name="payment_system" value="taler" checked id="radio-taler">
+ <label for=radio-taler">Taler</label>
+ <br/>
+
+ <input id="select-payment-method" type="submit" value="{{gettext("Confirm selection")}}"></input>
+ </div>
+ </form>
+
+</article>
+
+{% endblock main %}
diff --git a/talermerchantdemos/donations/templates/error.html b/talermerchantdemos/donations/templates/error.html
deleted file mode 100644
index 0d4bd02..0000000
--- a/talermerchantdemos/donations/templates/error.html
+++ /dev/null
@@ -1,22 +0,0 @@
-{% extends "templates/base.html" %}
-{% block main %}
- <h1>An Error Occurred</h1>
-
- <p>{{ message }}</p>
-
- {% if status_code %}
- <p>The backend returned status code {{ status_code }}.</p>
- {% endif %}
-
- {% if json %}
- <p>Backend Response:</p>
- <pre>{{ json }}</pre>
- {% endif %}
-
- {% if stack %}
- <p>Stack trace:</p>
- <pre>
- {{ stack }}
- </pre>
- {% endif %}
-{% endblock main %}
diff --git a/talermerchantdemos/donations/templates/error.html.j2 b/talermerchantdemos/donations/templates/error.html.j2
new file mode 100644
index 0000000..ffc2e1f
--- /dev/null
+++ b/talermerchantdemos/donations/templates/error.html.j2
@@ -0,0 +1,24 @@
+{% extends "templates/base.html.j2" %}
+{% block main %}
+ <h1>{{ gettext("Error encountered") }}</h1>
+
+ <p>{{ message }}</p>
+
+ {% if status_code %}
+ <p>
+ {{ gettext ("The backend returned status code {code}.").format(code=status_code) }}.
+ </p>
+ {% endif %}
+
+ {% if json %}
+ <p>{{gettext("Backend response:")}}</p>
+ <pre>{{ json }}</pre>
+ {% endif %}
+
+ {% if stack %}
+ <p>{{gettext("Stack trace:")}}</p>
+ <pre>
+ {{ stack }}
+ </pre>
+ {% endif %}
+{% endblock main %}
diff --git a/talermerchantdemos/donations/templates/fulfillment.html b/talermerchantdemos/donations/templates/fulfillment.html
deleted file mode 100644
index 17d8cd8..0000000
--- a/talermerchantdemos/donations/templates/fulfillment.html
+++ /dev/null
@@ -1,11 +0,0 @@
-{% extends "templates/base.html" %}
-
-{% block main %}
-<h1>Donation Receipt</h1>
-<p> Thank you, <strong>{{ donation_donor }}</strong>, for donating <strong>{{ donation_amount }}</strong> to <strong>{{ donation_receiver }}</strong>.</p>
-
-<p>Please keep the order identifier <strong>{{ order_id }}</strong> as a receipt for your donation. You can show other people that you donated
-by sharing <a href={{ request.url }}>this link</a> with them.</p>
-
-<p>You can always make <a href="{{ url_for('index') }}">another donation</a></p>
-{% endblock main %}
diff --git a/talermerchantdemos/donations/templates/fulfillment.html.j2 b/talermerchantdemos/donations/templates/fulfillment.html.j2
new file mode 100644
index 0000000..df9f30b
--- /dev/null
+++ b/talermerchantdemos/donations/templates/fulfillment.html.j2
@@ -0,0 +1,22 @@
+{% extends "templates/base.html.j2" %}
+
+{% block main %}
+<h1>{{ gettext("Donation Receipt") }}</h1>
+<p>
+ {{
+ gettext("Thank you, <strong>{donor}</strong>, for donating <strong>{amount}</strong> to <strong>{receiver}</strong>.").format(donor=donation_donor,amount=donation_amount,receiver=donation_receiver)
+ }}
+</p>
+<p>
+ {{
+ gettext("Please keep the order identifier <strong>{id}</strong> as a receipt for your donation.").format(id=order_id) +
+ gettext('You can show other people that you donated by sharing <a href="{link}">this link</a> with them.').format(link=request.url)
+ }}
+</p>
+
+<p>
+ {{
+ gettext('You can always make <a href="{link}">another donation</a>.').format(link=url_for('index'))
+ }}
+</p>
+{% endblock main %}
diff --git a/talermerchantdemos/donations/templates/index.html b/talermerchantdemos/donations/templates/index.html
deleted file mode 100644
index cbb3c35..0000000
--- a/talermerchantdemos/donations/templates/index.html
+++ /dev/null
@@ -1,42 +0,0 @@
-{% extends "templates/base.html" %}
-
-{% block main %}
-<h1 lang="en">Welcome to the Taler Donation "Shop" Demo</h1>
-
-<p>This toy donations website shows the user experience for donations with Taler.
-You are paying with an imaginary currency ({{ merchant_currency }}).
-</p>
-
-<div>
- <p>Please select a project, the amount (*) of {{ merchant_currency }} you
- wish to donate, and enter the name that will appear on your receipt:</p>
-
- <form name="tform" action="checkout" method="GET" class="pure-form">
- <div class="participation" id="fake-shop">
- <select name="donation_receiver">
- <option value="GNUnet">GNUnet</option>
- <option value="Taler">GNU Taler</option>
- <option value="Tor">Tor</option>
- </select>
- <select id="taler-donation" name="donation_amount">
- <option value="{{ merchant_currency }}:0.1">0.1 {{ merchant_currency }}</option>
- <option value="{{ merchant_currency }}:1">1 {{ merchant_currency }}</option>
- <option value="{{ merchant_currency }}:6">5 {{ merchant_currency }}</option>
- <option value="{{ merchant_currency }}:10">10 {{ merchant_currency }}</option>
- </select>
- <input type="text" name="donation_donor" value="Anonymous Donor" />
- <input type="submit" class="pure-button pure-button-primary" value="Donate!" />
- </div>
- </form>
- <p>
- (*) To make it a bit more fun, the 5 {{ merchant_currency }} option is
- deliberately implemented with a fault: the merchant will try to make you
- donate 6 {{ merchant_currency }} instead of the 5 {{ merchant_currency }} you
- got to see. But do not worry, you will be given the opportunity to review
- the final offer from the merchant in a window secured by the Taler
- extension. That way, you can spot the error before committing to an
- incorrect contract.
- </p>
-</div>
-
-{% endblock %}
diff --git a/talermerchantdemos/donations/templates/index.html.j2 b/talermerchantdemos/donations/templates/index.html.j2
new file mode 100644
index 0000000..91122f3
--- /dev/null
+++ b/talermerchantdemos/donations/templates/index.html.j2
@@ -0,0 +1,44 @@
+{% extends "templates/base.html.j2" %}
+
+{% block main %}
+<h1>{{ gettext("Taler donation demonstrator") }}</h1>
+
+<p>
+{{
+ gettext("This donations website shows the user experience for donations with Taler.") + "<br>" +
+ gettext("You can make donations in an toy currency ({currency})").format(currency=merchant_currency)
+}}
+</p>
+
+<div>
+ <p>
+ {{
+ gettext("Please select a project, the amount (*) of {currency} you wish to donate, and enter the name that will appear on your receipt:").format(currency=merchant_currency)
+ }}
+ </p>
+
+ <form name="tform" action="{{ url_for('checkout',lang=lang) }}" method="GET" class="pure-form">
+ <div class="participation" id="fake-shop">
+ <select name="donation_receiver">
+ <option value="GNUnet">GNUnet</option>
+ <option value="Taler">GNU Taler</option>
+ <option value="Tor">Tor</option>
+ </select>
+ <select id="taler-donation" name="donation_amount">
+ <option value="{{ merchant_currency }}:0.1">0.1 {{ merchant_currency }}</option>
+ <option value="{{ merchant_currency }}:1">1 {{ merchant_currency }}</option>
+ <option value="{{ merchant_currency }}:6">5 {{ merchant_currency }}</option>
+ <option value="{{ merchant_currency }}:10">10 {{ merchant_currency }}</option>
+ </select>
+ <input type="text" name="donation_donor" value="{{gettext("Anonymous Donor")}}" />
+ <input type="submit" class="pure-button pure-button-primary" value="{{gettext("Donate!")}}" />
+ </div>
+ </form>
+ <p>
+ {{
+ gettext("(*) To make it a bit more fun, the 5 {currency} option is deliberately implemented with a fault: the merchant will try to make you donate 6 {currency} instead of the 5 {currency} shown in the form. But do not worry, you will be given the opportunity to review the final offer from the merchant in a window secured by the Taler extension. That way, you can spot the error before committing to an incorrect contract or amount.").format(currency=merchant_currency)
+ }}
+ </p>
+</div>
+
+{% endblock %}
diff --git a/talermerchantdemos/donations/templates/provider-not-supported.html b/talermerchantdemos/donations/templates/provider-not-supported.html.j2
index 88f2000..88f2000 100644
--- a/talermerchantdemos/donations/templates/provider-not-supported.html
+++ b/talermerchantdemos/donations/templates/provider-not-supported.html.j2
diff --git a/talermerchantdemos/survey/survey.py b/talermerchantdemos/survey/survey.py
index 38065f1..871b417 100644
--- a/talermerchantdemos/survey/survey.py
+++ b/talermerchantdemos/survey/survey.py
@@ -125,17 +125,6 @@ def favicon():
mimetype="image/vnd.microsoft.ico"
)
-##
-# Return a error response to the client.
-#
-# @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.j2",
- lang=get_locale(),
- **params)
- flask.abort(flask.make_response(t, abort_status_code))
##
# Tell the backend to 'authorize' a tip; this means that
diff --git a/translations/de/LC_MESSAGES/messages.po b/translations/de/LC_MESSAGES/messages.po
index d980693..2b4ebe4 100644
--- a/translations/de/LC_MESSAGES/messages.po
+++ b/translations/de/LC_MESSAGES/messages.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: taler-merchant-demos\n"
"Report-Msgid-Bugs-To: taler@gnu.org\n"
-"POT-Creation-Date: 2020-10-11 15:39+0200\n"
+"POT-Creation-Date: 2020-10-11 16:14+0200\n"
"PO-Revision-Date: 2020-10-09 21:25+0200\n"
"Last-Translator: Christian Grothoff <cg@taler.net>\n"
"Language: de\n"
@@ -18,7 +18,9 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.6.0\n"
-#: talermerchantdemos/blog/blog.py:114 talermerchantdemos/survey/survey.py:110
+#: talermerchantdemos/blog/blog.py:114
+#: talermerchantdemos/donations/donations.py:157
+#: talermerchantdemos/survey/survey.py:110
msgid "Internal error"
msgstr "Interner Fehler"
@@ -54,7 +56,9 @@ msgstr ""
msgid "Internal server error"
msgstr ""
-#: talermerchantdemos/blog/blog.py:412 talermerchantdemos/survey/survey.py:182
+#: talermerchantdemos/blog/blog.py:412
+#: talermerchantdemos/donations/donations.py:323
+#: talermerchantdemos/survey/survey.py:171
msgid "Page not found"
msgstr ""
@@ -73,6 +77,7 @@ msgid "Taler Essay Shop Demo"
msgstr ""
#: talermerchantdemos/blog/templates/base.html.j2:72
+#: talermerchantdemos/donations/templates/base.html.j2:69
#: talermerchantdemos/survey/templates/base.html.j2:69
msgid "Taler Demo"
msgstr "Taler Demonstrator"
@@ -98,61 +103,74 @@ msgid ""
msgstr ""
#: talermerchantdemos/blog/templates/base.html.j2:83
+#: talermerchantdemos/donations/templates/base.html.j2:80
#: talermerchantdemos/survey/templates/base.html.j2:80
msgid "Introduction"
msgstr "Einführung"
#: talermerchantdemos/blog/templates/base.html.j2:84
+#: talermerchantdemos/donations/templates/base.html.j2:81
#: talermerchantdemos/survey/templates/base.html.j2:81
msgid "Bank"
msgstr "Bank"
#: talermerchantdemos/blog/templates/base.html.j2:85
+#: talermerchantdemos/donations/templates/base.html.j2:82
#: talermerchantdemos/survey/templates/base.html.j2:82
msgid "Essay Shop"
msgstr ""
#: talermerchantdemos/blog/templates/base.html.j2:86
+#: talermerchantdemos/donations/templates/base.html.j2:70
+#: talermerchantdemos/donations/templates/base.html.j2:83
#: talermerchantdemos/survey/templates/base.html.j2:83
msgid "Donations"
msgstr "Spenden"
#: talermerchantdemos/blog/templates/base.html.j2:87
+#: talermerchantdemos/donations/templates/base.html.j2:84
#: talermerchantdemos/survey/templates/base.html.j2:84
msgid "Tipping/Survey"
msgstr "Umfrage"
#: talermerchantdemos/blog/templates/base.html.j2:88
+#: talermerchantdemos/donations/templates/base.html.j2:85
#: talermerchantdemos/survey/templates/base.html.j2:85
msgid "Back-office"
msgstr ""
#: talermerchantdemos/blog/templates/base.html.j2:90
+#: talermerchantdemos/donations/templates/base.html.j2:87
#: talermerchantdemos/survey/templates/base.html.j2:87
msgid "English [en]"
msgstr "Deutsch [de]"
#: talermerchantdemos/blog/templates/base.html.j2:112
+#: talermerchantdemos/donations/templates/base.html.j2:109
#: talermerchantdemos/survey/templates/base.html.j2:109
msgid "You can learn more about Taler on our main <a href=\"{site}\">website</a>."
msgstr ""
#: talermerchantdemos/blog/templates/error.html.j2:3
+#: talermerchantdemos/donations/templates/error.html.j2:3
#: talermerchantdemos/survey/templates/error.html.j2:3
msgid "Error encountered"
msgstr ""
#: talermerchantdemos/blog/templates/error.html.j2:9
+#: talermerchantdemos/donations/templates/error.html.j2:9
#: talermerchantdemos/survey/templates/error.html.j2:9
msgid "The backend returned status code {code}."
msgstr ""
#: talermerchantdemos/blog/templates/error.html.j2:14
+#: talermerchantdemos/donations/templates/error.html.j2:14
#: talermerchantdemos/survey/templates/error.html.j2:14
msgid "Backend response:"
msgstr ""
#: talermerchantdemos/blog/templates/error.html.j2:19
+#: talermerchantdemos/donations/templates/error.html.j2:19
#: talermerchantdemos/survey/templates/error.html.j2:19
msgid "Stack trace:"
msgstr ""
@@ -199,6 +217,112 @@ msgstr "Bezahlen um weiterzulesen..."
msgid "No articles available in this language."
msgstr "Keine Artikel in dieser Sprache verfügbar."
+#: talermerchantdemos/donations/donations.py:143
+msgid "parameter '{}' required"
+msgstr ""
+
+#: talermerchantdemos/donations/templates/base.html.j2:20
+msgid "Taler Donation Demo"
+msgstr ""
+
+#: talermerchantdemos/donations/templates/base.html.j2:72
+msgid "This is the donation page."
+msgstr ""
+
+#: talermerchantdemos/donations/templates/base.html.j2:73
+msgid ""
+"Using this page you can make donations (in an imaginary currency) to Free"
+" Software projects."
+msgstr ""
+
+#: talermerchantdemos/donations/templates/checkout.html.j2:5
+msgid "Select your payment method"
+msgstr ""
+
+#: talermerchantdemos/donations/templates/checkout.html.j2:9
+msgid ""
+"This is an example for a \"checkout\" page of a Web shop. On the previous"
+" page, you have created the shopping cart and decided which product to "
+"buy (i.e. which project to donate KUDOS to). Now in this page, you are "
+"asked to select a payment option. As Taler is not yet universally used, "
+"we expect merchants will offer various payment options."
+msgstr ""
+
+#: talermerchantdemos/donations/templates/checkout.html.j2:14
+msgid ""
+"Note that you MUST select Taler here for the demo to continue, as the "
+"other payment options are just placeholders and not really working in the"
+" demonstration. Also, it is of course possible to ask the user to make "
+"this choice already on the previous page (with the shopping cart), we "
+"just separated the two steps to keep each step as simple as possible."
+msgstr ""
+
+#: talermerchantdemos/donations/templates/checkout.html.j2:40
+msgid "Confirm selection"
+msgstr ""
+
+#: talermerchantdemos/donations/templates/fulfillment.html.j2:4
+msgid "Donation Receipt"
+msgstr ""
+
+#: talermerchantdemos/donations/templates/fulfillment.html.j2:7
+msgid ""
+"Thank you, <strong>{donor}</strong>, for donating "
+"<strong>{amount}</strong> to <strong>{receiver}</strong>."
+msgstr ""
+
+#: talermerchantdemos/donations/templates/fulfillment.html.j2:12
+msgid ""
+"Please keep the order identifier <strong>{id}</strong> as a receipt for "
+"your donation."
+msgstr ""
+
+#: talermerchantdemos/donations/templates/fulfillment.html.j2:13
+msgid ""
+"You can show other people that you donated by sharing <a "
+"href=\"{link}\">this link</a> with them."
+msgstr ""
+
+#: talermerchantdemos/donations/templates/fulfillment.html.j2:19
+msgid "You can always make <a href=\"{link}\">another donation</a>."
+msgstr ""
+
+#: talermerchantdemos/donations/templates/index.html.j2:4
+msgid "Taler donation demonstrator"
+msgstr ""
+
+#: talermerchantdemos/donations/templates/index.html.j2:8
+msgid "This donations website shows the user experience for donations with Taler."
+msgstr ""
+
+#: talermerchantdemos/donations/templates/index.html.j2:9
+msgid "You can make donations in an toy currency ({currency})"
+msgstr ""
+
+#: talermerchantdemos/donations/templates/index.html.j2:16
+msgid ""
+"Please select a project, the amount (*) of {currency} you wish to donate,"
+" and enter the name that will appear on your receipt:"
+msgstr ""
+
+#: talermerchantdemos/donations/templates/index.html.j2:33
+msgid "Anonymous Donor"
+msgstr ""
+
+#: talermerchantdemos/donations/templates/index.html.j2:34
+msgid "Donate!"
+msgstr ""
+
+#: talermerchantdemos/donations/templates/index.html.j2:39
+msgid ""
+"(*) To make it a bit more fun, the 5 {currency} option is deliberately "
+"implemented with a fault: the merchant will try to make you donate 6 "
+"{currency} instead of the 5 {currency} shown in the form. But do not "
+"worry, you will be given the opportunity to review the final offer from "
+"the merchant in a window secured by the Taler extension. That way, you "
+"can spot the error before committing to an incorrect contract or amount."
+msgstr ""
+
#: talermerchantdemos/httpcommon/__init__.py:35
#: talermerchantdemos/httpcommon/__init__.py:71
msgid "Could not establish connection to backend"
@@ -214,7 +338,7 @@ msgstr ""
msgid "Backend returned error status"
msgstr ""
-#: talermerchantdemos/survey/survey.py:190
+#: talermerchantdemos/survey/survey.py:179
msgid "HTTP method not allowed for this page"
msgstr ""
diff --git a/translations/messages.pot b/translations/messages.pot
index c47b411..05549ae 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 15:39+0200\n"
+"POT-Creation-Date: 2020-10-11 16:14+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,7 +17,9 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.6.0\n"
-#: talermerchantdemos/blog/blog.py:114 talermerchantdemos/survey/survey.py:110
+#: talermerchantdemos/blog/blog.py:114
+#: talermerchantdemos/donations/donations.py:157
+#: talermerchantdemos/survey/survey.py:110
msgid "Internal error"
msgstr ""
@@ -53,7 +55,9 @@ msgstr ""
msgid "Internal server error"
msgstr ""
-#: talermerchantdemos/blog/blog.py:412 talermerchantdemos/survey/survey.py:182
+#: talermerchantdemos/blog/blog.py:412
+#: talermerchantdemos/donations/donations.py:323
+#: talermerchantdemos/survey/survey.py:171
msgid "Page not found"
msgstr ""
@@ -72,6 +76,7 @@ msgid "Taler Essay Shop Demo"
msgstr ""
#: talermerchantdemos/blog/templates/base.html.j2:72
+#: talermerchantdemos/donations/templates/base.html.j2:69
#: talermerchantdemos/survey/templates/base.html.j2:69
msgid "Taler Demo"
msgstr ""
@@ -97,61 +102,74 @@ msgid ""
msgstr ""
#: talermerchantdemos/blog/templates/base.html.j2:83
+#: talermerchantdemos/donations/templates/base.html.j2:80
#: talermerchantdemos/survey/templates/base.html.j2:80
msgid "Introduction"
msgstr ""
#: talermerchantdemos/blog/templates/base.html.j2:84
+#: talermerchantdemos/donations/templates/base.html.j2:81
#: talermerchantdemos/survey/templates/base.html.j2:81
msgid "Bank"
msgstr ""
#: talermerchantdemos/blog/templates/base.html.j2:85
+#: talermerchantdemos/donations/templates/base.html.j2:82
#: talermerchantdemos/survey/templates/base.html.j2:82
msgid "Essay Shop"
msgstr ""
#: talermerchantdemos/blog/templates/base.html.j2:86
+#: talermerchantdemos/donations/templates/base.html.j2:70
+#: talermerchantdemos/donations/templates/base.html.j2:83
#: talermerchantdemos/survey/templates/base.html.j2:83
msgid "Donations"
msgstr ""
#: talermerchantdemos/blog/templates/base.html.j2:87
+#: talermerchantdemos/donations/templates/base.html.j2:84
#: talermerchantdemos/survey/templates/base.html.j2:84
msgid "Tipping/Survey"
msgstr ""
#: talermerchantdemos/blog/templates/base.html.j2:88
+#: talermerchantdemos/donations/templates/base.html.j2:85
#: talermerchantdemos/survey/templates/base.html.j2:85
msgid "Back-office"
msgstr ""
#: talermerchantdemos/blog/templates/base.html.j2:90
+#: talermerchantdemos/donations/templates/base.html.j2:87
#: talermerchantdemos/survey/templates/base.html.j2:87
msgid "English [en]"
msgstr ""
#: talermerchantdemos/blog/templates/base.html.j2:112
+#: talermerchantdemos/donations/templates/base.html.j2:109
#: talermerchantdemos/survey/templates/base.html.j2:109
msgid "You can learn more about Taler on our main <a href=\"{site}\">website</a>."
msgstr ""
#: talermerchantdemos/blog/templates/error.html.j2:3
+#: talermerchantdemos/donations/templates/error.html.j2:3
#: talermerchantdemos/survey/templates/error.html.j2:3
msgid "Error encountered"
msgstr ""
#: talermerchantdemos/blog/templates/error.html.j2:9
+#: talermerchantdemos/donations/templates/error.html.j2:9
#: talermerchantdemos/survey/templates/error.html.j2:9
msgid "The backend returned status code {code}."
msgstr ""
#: talermerchantdemos/blog/templates/error.html.j2:14
+#: talermerchantdemos/donations/templates/error.html.j2:14
#: talermerchantdemos/survey/templates/error.html.j2:14
msgid "Backend response:"
msgstr ""
#: talermerchantdemos/blog/templates/error.html.j2:19
+#: talermerchantdemos/donations/templates/error.html.j2:19
#: talermerchantdemos/survey/templates/error.html.j2:19
msgid "Stack trace:"
msgstr ""
@@ -198,6 +216,112 @@ msgstr ""
msgid "No articles available in this language."
msgstr ""
+#: talermerchantdemos/donations/donations.py:143
+msgid "parameter '{}' required"
+msgstr ""
+
+#: talermerchantdemos/donations/templates/base.html.j2:20
+msgid "Taler Donation Demo"
+msgstr ""
+
+#: talermerchantdemos/donations/templates/base.html.j2:72
+msgid "This is the donation page."
+msgstr ""
+
+#: talermerchantdemos/donations/templates/base.html.j2:73
+msgid ""
+"Using this page you can make donations (in an imaginary currency) to Free"
+" Software projects."
+msgstr ""
+
+#: talermerchantdemos/donations/templates/checkout.html.j2:5
+msgid "Select your payment method"
+msgstr ""
+
+#: talermerchantdemos/donations/templates/checkout.html.j2:9
+msgid ""
+"This is an example for a \"checkout\" page of a Web shop. On the previous"
+" page, you have created the shopping cart and decided which product to "
+"buy (i.e. which project to donate KUDOS to). Now in this page, you are "
+"asked to select a payment option. As Taler is not yet universally used, "
+"we expect merchants will offer various payment options."
+msgstr ""
+
+#: talermerchantdemos/donations/templates/checkout.html.j2:14
+msgid ""
+"Note that you MUST select Taler here for the demo to continue, as the "
+"other payment options are just placeholders and not really working in the"
+" demonstration. Also, it is of course possible to ask the user to make "
+"this choice already on the previous page (with the shopping cart), we "
+"just separated the two steps to keep each step as simple as possible."
+msgstr ""
+
+#: talermerchantdemos/donations/templates/checkout.html.j2:40
+msgid "Confirm selection"
+msgstr ""
+
+#: talermerchantdemos/donations/templates/fulfillment.html.j2:4
+msgid "Donation Receipt"
+msgstr ""
+
+#: talermerchantdemos/donations/templates/fulfillment.html.j2:7
+msgid ""
+"Thank you, <strong>{donor}</strong>, for donating "
+"<strong>{amount}</strong> to <strong>{receiver}</strong>."
+msgstr ""
+
+#: talermerchantdemos/donations/templates/fulfillment.html.j2:12
+msgid ""
+"Please keep the order identifier <strong>{id}</strong> as a receipt for "
+"your donation."
+msgstr ""
+
+#: talermerchantdemos/donations/templates/fulfillment.html.j2:13
+msgid ""
+"You can show other people that you donated by sharing <a "
+"href=\"{link}\">this link</a> with them."
+msgstr ""
+
+#: talermerchantdemos/donations/templates/fulfillment.html.j2:19
+msgid "You can always make <a href=\"{link}\">another donation</a>."
+msgstr ""
+
+#: talermerchantdemos/donations/templates/index.html.j2:4
+msgid "Taler donation demonstrator"
+msgstr ""
+
+#: talermerchantdemos/donations/templates/index.html.j2:8
+msgid "This donations website shows the user experience for donations with Taler."
+msgstr ""
+
+#: talermerchantdemos/donations/templates/index.html.j2:9
+msgid "You can make donations in an toy currency ({currency})"
+msgstr ""
+
+#: talermerchantdemos/donations/templates/index.html.j2:16
+msgid ""
+"Please select a project, the amount (*) of {currency} you wish to donate,"
+" and enter the name that will appear on your receipt:"
+msgstr ""
+
+#: talermerchantdemos/donations/templates/index.html.j2:33
+msgid "Anonymous Donor"
+msgstr ""
+
+#: talermerchantdemos/donations/templates/index.html.j2:34
+msgid "Donate!"
+msgstr ""
+
+#: talermerchantdemos/donations/templates/index.html.j2:39
+msgid ""
+"(*) To make it a bit more fun, the 5 {currency} option is deliberately "
+"implemented with a fault: the merchant will try to make you donate 6 "
+"{currency} instead of the 5 {currency} shown in the form. But do not "
+"worry, you will be given the opportunity to review the final offer from "
+"the merchant in a window secured by the Taler extension. That way, you "
+"can spot the error before committing to an incorrect contract or amount."
+msgstr ""
+
#: talermerchantdemos/httpcommon/__init__.py:35
#: talermerchantdemos/httpcommon/__init__.py:71
msgid "Could not establish connection to backend"
@@ -213,7 +337,7 @@ msgstr ""
msgid "Backend returned error status"
msgstr ""
-#: talermerchantdemos/survey/survey.py:190
+#: talermerchantdemos/survey/survey.py:179
msgid "HTTP method not allowed for this page"
msgstr ""