gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-merchant-demos] branch master updated: fix #7387


From: gnunet
Subject: [taler-taler-merchant-demos] branch master updated: fix #7387
Date: Wed, 19 Oct 2022 06:49:55 +0200

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

sebasjm pushed a commit to branch master
in repository taler-merchant-demos.

The following commit(s) were added to refs/heads/master by this push:
     new a09b7bd  fix #7387
a09b7bd is described below

commit a09b7bde1827b2f8c59e9f7a4227c3e204489d84
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Wed Oct 19 01:49:46 2022 -0300

    fix #7387
---
 talermerchantdemos/blog/blog.py           |  9 +++++++++
 talermerchantdemos/donations/donations.py | 22 ++++++++++++++++++----
 talermerchantdemos/landing/landing.py     |  7 ++++++-
 talermerchantdemos/survey/survey.py       | 11 ++++++++++-
 4 files changed, 43 insertions(+), 6 deletions(-)

diff --git a/talermerchantdemos/blog/blog.py b/talermerchantdemos/blog/blog.py
index 8d2f4bf..952f63c 100644
--- a/talermerchantdemos/blog/blog.py
+++ b/talermerchantdemos/blog/blog.py
@@ -125,6 +125,7 @@ app.context_processor(make_utility_processor("blog", 
os.environ.get ("TALER_ENV_
 def internal_error(e):
     return flask.render_template(
         "blog-error.html.j2",
+        page_title=gettext("GNU Taler Demo: Error"),
         message=gettext("Internal error"),
         stack=traceback.format_exc(),
     )
@@ -168,6 +169,7 @@ def start(lang):
     return flask.render_template(
         "blog-index.html.j2",
         merchant_currency=CURRENCY,
+        page_title=gettext("GNU Taler Demo: Essay Shop"),
         articles=translated.values(),
     )
 
@@ -192,10 +194,12 @@ def confirm_refund(lang, order_id):
     if not refundable(pay_status):
         return flask.render_template(
             "blog-error.html.j2",
+            page_title=gettext("GNU Taler Demo: Error"),
             message=gettext("Article is not anymore refundable"),
         )
     return flask.render_template(
         "blog-confirm-refund.html.j2",
+        page_title=gettext("GNU Taler Demo: Confirm refund"),
         article_name=article_name,
         order_id=order_id,
     )
@@ -274,6 +278,7 @@ def render_article(article_name, lang, data, order_id, 
refundable):
     article_contents = open(get_article_file(article_info)).read()
     return flask.render_template(
         "blog-article-frame.html.j2",
+        page_title=gettext("GNU Taler Demo: Article"),
         article_contents=article_contents,
         article_name=article_info.title,
         order_id=order_id,
@@ -377,6 +382,7 @@ def article(article_name, lang=None, data=None):
         if refunded:
             return flask.render_template(
                 "blog-article-refunded.html.j2",
+                page_title=gettext("GNU Taler Demo: Refunded"),
                 article_name=article_name,
                 order_id=order_id,
             )
@@ -427,6 +433,7 @@ def article(article_name, lang=None, data=None):
 def handler_500(e):
     return flask.render_template(
         "blog-error.html.j2",
+        page_title=gettext("GNU Taler Demo: Error"),
         message=gettext("Internal server error"),
     )
 
@@ -435,6 +442,7 @@ def handler_500(e):
 def handler_404(e):
     return flask.render_template(
         "blog-error.html.j2",
+        page_title=gettext("GNU Taler Demo: Error"),
         message=gettext("Page not found"),
     )
 
@@ -444,6 +452,7 @@ def handler_backend_exception(e):
     t = flask.render_template(
         "blog-error.html.j2",
         message=e.args[0],
+        page_title=gettext("GNU Taler Demo: Error"),
         json=e.backend_json,
         status_code=e.backend_status,
     )
diff --git a/talermerchantdemos/donations/donations.py 
b/talermerchantdemos/donations/donations.py
index 21c404b..4ba5daa 100644
--- a/talermerchantdemos/donations/donations.py
+++ b/talermerchantdemos/donations/donations.py
@@ -136,7 +136,10 @@ def expect_parameter(name):
 #         (and execution stack!).
 @app.errorhandler(Exception)
 def internal_error(e):
-    return flask.render_template("donations-error.html.j2", message=str(e))
+    return flask.render_template(
+        "donations-error.html.j2",
+        page_title=gettext("GNU Taler Demo: Error"),
+        message=str(e))
 
 ##
 # Serve the /favicon.ico requests.
@@ -169,7 +172,11 @@ def index():
 # @return response object of the index page.
 @app.route("/<lang>/")
 def start(lang):
-    return flask.render_template("donations-index.html.j2", 
merchant_currency=CURRENCY)
+    return flask.render_template(
+        "donations-index.html.j2", 
+        page_title=gettext("GNU Taler Demo: Donations"),
+        merchant_currency=CURRENCY
+    )
 
 
 ##
@@ -185,6 +192,7 @@ def checkout(lang):
     donation_donor = expect_parameter("donation_donor")
     return flask.render_template(
         "donations-checkout.html.j2",
+        page_title=gettext("GNU Taler Demo: Donations checkout"),
         donation_amount=amount,
         donation_receiver=donation_receiver,
         donation_donor=donation_donor,
@@ -199,7 +207,10 @@ def checkout(lang):
 # @return response object about the mentioned impossibility.
 @app.route("/<lang>/provider-not-supported")
 def provider_not_supported(lang):
-    return flask.render_template("donations-provider-not-supported.html.j2")
+    return flask.render_template(
+        "donations-provider-not-supported.html.j2",         
+        page_title=gettext("GNU Taler Demo: Donations"),
+)
 
 
 ##
@@ -272,6 +283,7 @@ def fulfillment(lang, receiver):
         extra = pay_status["contract_terms"]["extra"]
         return flask.render_template(
             "donations-fulfillment.html.j2",
+            page_title=gettext("GNU Taler Demo: Donations"),
             donation_receiver=extra["receiver"],
             donation_amount=extra["amount"],
             donation_donor=extra["donor"],
@@ -284,5 +296,7 @@ def fulfillment(lang, receiver):
 @app.errorhandler(404)
 def handler(e):
     return flask.render_template(
-        "donations-error.html.j2", message=gettext("Page not found")
+        "donations-error.html.j2",
+        page_title=gettext("GNU Taler Demo: Error"),
+        message=gettext("Page not found")
     )
diff --git a/talermerchantdemos/landing/landing.py 
b/talermerchantdemos/landing/landing.py
index 1152fa4..f3280a3 100644
--- a/talermerchantdemos/landing/landing.py
+++ b/talermerchantdemos/landing/landing.py
@@ -92,6 +92,7 @@ app.context_processor(make_utility_processor("landing", 
os.environ.get ("TALER_E
 def internal_error(e):
     return flask.render_template(
         "landing-error.html.j2",
+        page_title=gettext("GNU Taler Demo: Error"),
         message=gettext("Internal error"),
         stack=traceback.format_exc(),
     )
@@ -153,6 +154,7 @@ def start(lang):
     return flask.render_template(
         "landing-index.html.j2",
         merchant_currency=CURRENCY,
+        page_title=gettext("GNU Taler Demo"),
         bank_register_url=bank_register_url,
         bank_url=bank_url,
         merchant_blog_url=merchant_blog_url,
@@ -164,7 +166,9 @@ def start(lang):
 @app.errorhandler(404)
 def handler_404(e):
     return flask.render_template(
-        "landing-error.html.j2", message=gettext("Page not found")
+        "landing-error.html.j2", 
+        page_title=gettext("GNU Taler Demo: Error"),
+        message=gettext("Page not found")
     )
 
 
@@ -172,5 +176,6 @@ def handler_404(e):
 def handler_405(e):
     return flask.render_template(
         "landing-error.html.j2",
+        page_title=gettext("GNU Taler Demo: Error"),
         message=gettext("HTTP method not allowed for this page"),
     )
diff --git a/talermerchantdemos/survey/survey.py 
b/talermerchantdemos/survey/survey.py
index 7e434ce..d198ae1 100644
--- a/talermerchantdemos/survey/survey.py
+++ b/talermerchantdemos/survey/survey.py
@@ -97,7 +97,10 @@ app.context_processor(make_utility_processor("survey", 
os.environ.get ("TALER_EN
 #         (and execution stack!).
 @app.errorhandler(Exception)
 def internal_error(e):
-    return flask.render_template("survey-error.html.j2", message=str(e))
+    return flask.render_template("survey-error.html.j2", 
+        page_title=gettext("GNU Taler Demo: Error"),
+        message=str(e)
+    )
 
 ##
 # Serve the /favicon.ico requests.
@@ -153,6 +156,7 @@ def index():
 def start(lang):
     return flask.render_template(
         "survey-index.html.j2",
+        page_title=gettext("GNU Taler Demo: Survey"),
         merchant_currency=CURRENCY,
     )
 
@@ -161,6 +165,7 @@ def start(lang):
 def handler_404(e):
     return flask.render_template(
         "survey-error.html.j2",
+        page_title=gettext("GNU Taler Demo: Error"),
         message=gettext("Page not found"),
     )
 
@@ -169,6 +174,7 @@ def handler_404(e):
 def handler_405(e):
     return flask.render_template(
         "survey-error.html.j2",
+        page_title=gettext("GNU Taler Demo: Error"),
         message=gettext("HTTP method not allowed for this page"),
     )
 
@@ -180,6 +186,7 @@ def handler_backend_exception(e):
     if e.backend_json.get("code") == 2753:
         t = flask.render_template(
             "survey-error-graceful.html.j2",
+            page_title=gettext("GNU Taler Demo: Error"),
             message="Tip money were never invested, we are sorry!"
         )
         return flask.make_response(t, 500)
@@ -188,6 +195,7 @@ def handler_backend_exception(e):
     if e.backend_json.get("code") == 2752:
         t = flask.render_template(
             "survey-error-graceful.html.j2",
+            page_title=gettext("GNU Taler Demo: Error"),
             message="Tip money got all given, please return later!"
         )
         return flask.make_response(t, 500)
@@ -195,6 +203,7 @@ def handler_backend_exception(e):
 
     t = flask.render_template(
         "survey-error.html.j2",
+        page_title=gettext("GNU Taler Demo: Error"),
         message=e.args[0],
         json=e.backend_json,
         status_code=e.backend_status,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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