[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-bank] branch master updated (4c3698c -> 31c77be)
From: |
gnunet |
Subject: |
[taler-bank] branch master updated (4c3698c -> 31c77be) |
Date: |
Tue, 20 Oct 2020 11:54:12 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a change to branch master
in repository bank.
from 4c3698c use tabs
new 7a3d3b3 more gettext() wrapping
new 31c77be new strings to translate
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:
talerbank/app/templates/base.html | 15 ++++++++-----
talerbank/app/templates/login.html | 29 +++++++++++++++----------
talerbank/app/templates/payto_wiretransfer.html | 10 ++++-----
talerbank/app/templates/public_accounts.html | 14 ++++++------
talerbank/app/templates/register.html | 7 +++---
talerbank/app/templates/withdraw_confirm.html | 12 +++-------
talerbank/app/templates/withdraw_show.html | 12 +++++-----
talerbank/jinja2.py | 4 ++--
8 files changed, 54 insertions(+), 49 deletions(-)
diff --git a/talerbank/app/templates/base.html
b/talerbank/app/templates/base.html
index de65617..845e137 100644
--- a/talerbank/app/templates/base.html
+++ b/talerbank/app/templates/base.html
@@ -20,7 +20,7 @@
<html data-taler-nojs="true">
<head>
- <title>{{ settings_value("TALER_CURRENCY") }} Bank - Taler Demo</title>
+ <title>{{ _("{currency} Bank - Taler
Demo").format(currency=settings_value("TALER_CURRENCY")) }}</title>
<link rel="stylesheet" type="text/css" href="{{
static('web-common/pure.css') }}" />
<link rel="stylesheet" type="text/css" href="{{
static('web-common/demo.css') }}" />
<link rel="stylesheet" type="text/css" href="{{
static('web-common/navbar.css') }}" />
@@ -69,9 +69,10 @@
<header class="demobar" style="display: flex; flex-direction: column;">
<h1><span class="tt adorn-brackets">Taler Demo</span></h1>
<h1><span class="it"><a href="{{ url('index') }}">Bank</a></span></h1>
- <p>This part of the demo shows how a bank that supports Taler directly
would work.
- In addition to using your own bank account, you can also see the
transaction
- history of some <a href="{{ url('public-accounts') }}">Public
Accounts</a>.
+ <p>
+ {% autoescape off %}
+ {{ _("This part of the demo shows how a bank that supports Taler
directly would work. In addition to using your own bank account, you can also
see the transaction history of some <a href="{public_accounts}">Public
Accounts</a>.").format(public_accounts=url('public-accounts')) }}
+ {% endautoescape %}
</p>
</header>
<div style="display:flex; flex-direction: column;" class="navcontainer">
@@ -88,7 +89,11 @@
{% block content %} {% endblock %}
<hr />
<div>
- <p>You can learn more about Taler on our main <a
href="https://taler.net/">website</a>.</p>
+ <p>
+ {% autoescape off %}
+ {{ _("You can learn more about Taler on our main <a
href={taler_site}>website</a>.").format(taler_site="https://taler.net/") }}
+ {% endautoescape %}
+ </p>
<div style="flex-grow:1"></div>
<p>Copyright © 2014—2020 Taler Systems SA</p>
</div>
diff --git a/talerbank/app/templates/login.html
b/talerbank/app/templates/login.html
index c208990..04b792d 100644
--- a/talerbank/app/templates/login.html
+++ b/talerbank/app/templates/login.html
@@ -19,7 +19,7 @@
#}
{% block headermsg %}
- <h1 class="nav">Welcome to the {{ settings_value("TALER_CURRENCY") }}
Bank!</h1>
+ <h1 class="nav"> {{ _("Welcome to the {currency}
Bank!").format(currency=settings_value("TALER_CURRENCY")) }}</h1>
{% endblock headermsg %}
{% block content %}
@@ -29,15 +29,19 @@
<h2>{{ _("Please login!") }}</h2>
{% if form.errors %}
- <p class="informational informational-fail">Your username and password
didn't match. Please try again.</p>
+ <p class="informational informational-fail">
+ {{ _("Your username and password didn't match. Please try again.") }}
+ </p>
{% endif %}
{% if next and next != url('profile') %}
{% if request.user and request.user.is_authenticated %}
- <p class="informational informational-fail">Your account doesn't
have access to this page. To proceed,
- please login with an account that has access.</p>
+ <p class="informational informational-fail">
+ {{ _("Your account doesn't have access to this page. To proceed,
please login with an account that has access.") }}</p>
{% else %}
- <p class="informational informational-fail">Please login to see
this page.</p>
+ <p class="informational informational-fail">
+ {{ _("Please login to see this page.") }}
+ </p>
{% endif %}
{% endif %}
@@ -51,16 +55,17 @@
</div>
{% if settings_value("ALLOW_REGISTRATIONS") %}
<p>
- If you are a new customer, please <a href="{{ url('register')
}}">register</a>.
- Registration is fast and free, and it gives you a registration bonus
- of 100 {{ settings_value("TALER_CURRENCY") }}!
- </p>
+ {% autoescape off %}
+ {{ _("If you are a new customer please <a
href=\"{register_link}\">register</a>. Registration is fast and free, and it
gives you a registration bonus of 100
{currency}").format(register_link=url('register'),
currency=settings_value("TALER_CURRENCY")) }}
+ {% endautoescape %}
+ </p>
{% else %}
- <p>Registrations are not open to the public.</p>
+ <p>{{ _("Registrations are not open to the public.") }}</p>
{% endif %}
<p>
- To view transactions of public accounts,
- please <a href="{{ url('public-accounts') }}">click here</a>.
+ {% autoescape off %}
+ {{ _("To view transactions of public accounts, please <a
href=\"{public_accoutns}\">click
here</a>.").format(public_accounts=url('public-accounts')) }}
+ {% endautoescape %}
</p>
</article>
</section>
diff --git a/talerbank/app/templates/payto_wiretransfer.html
b/talerbank/app/templates/payto_wiretransfer.html
index 6acfee5..91737e2 100644
--- a/talerbank/app/templates/payto_wiretransfer.html
+++ b/talerbank/app/templates/payto_wiretransfer.html
@@ -20,15 +20,15 @@
{% block headermsg %}
<div>
- <a href="{{ url('logout') }}" class="pure-button">[Logout]</a><br>
+ <a href="{{ url('logout') }}" class="pure-button">[{{ _("Logout")
}}]</a><br>
</div>
{% endblock headermsg %}
{% block content %}
<section id="main">
<article>
<div>
- <h2>Wire transfer</h2>
- <p>Transfer money via the payto system:
+ <h2>{{ _("Wire transfer") }}</h2>
+ <p>{{ _("Transfer money via the payto system:") }}
<br>
<br>
<tt style="font-size:
15px">payto://x-taler-bank/[bank-hostname]/[account-number]?subject=[subject]&amount=[{{
currency }}:X.Y]</tt>
@@ -38,11 +38,11 @@
name="payto-form">
<input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token
}}" />
<input name="address"
- placeholder="payto address"
+ placeholder={{ _("payto address") }}
pattern="payto://x-taler-bank/[a-z\.]+(:[0-9]+)?/[0-9]+\?subject=[a-zA-Z0-9]+&amount={{
currency }}:[0-9]+(\.[0-9]+)?" />
<input class="pure-button pure-button-primary"
type="submit"
- value="Confirm" />
+ value={{ _("Confirm") }} />
</form>
</div>
</article>
diff --git a/talerbank/app/templates/public_accounts.html
b/talerbank/app/templates/public_accounts.html
index 61b0c23..c096d82 100644
--- a/talerbank/app/templates/public_accounts.html
+++ b/talerbank/app/templates/public_accounts.html
@@ -18,7 +18,7 @@
#}
{% block headermsg %}
- <h1 class="nav">History of public accounts</h1>
+ <h1 class="nav">{{ _("History of public accounts") }}</h1>
{% endblock headermsg %}
{% block content %}
@@ -54,10 +54,10 @@
{% if selected_account.history %}
<table class="pure-table pure-table-striped">
<thead>
- <th>Date</th>
- <th>Amount</th>
- <th>Counterpart</th>
- <th>Subject</th>
+ <th>{{ _("Date") }}</th>
+ <th>{{ _("Amount") }}</th>
+ <th>{{ _("Counterpart") }}</th>
+ <th>{{ _("Subject") }}</th>
</thead>
<tbody>
{% for entry in selected_account.history %}
@@ -66,7 +66,7 @@
<td>
{{ entry.sign }} {{ entry.amount }}
</td>
- <td>{% if entry.counterpart_username %} {{
entry.counterpart_username }} {% endif %} (account #{{ entry.counterpart
}})</td>
+ <td>{% if entry.counterpart_username %} {{
entry.counterpart_username }} {% endif %} ({{ _("account") }} #{{
entry.counterpart }})</td>
<td {% if entry.cancelled %} class="cancelled" {% endif %}>
{{ entry.subject }}
</td>
@@ -96,7 +96,7 @@
{% endif %}
</div>
{% else %}
- <p>No history for account #{{ selected_account.number }} ({{
selected_account.name}}) yet</p>
+ <p>{{ _("No history for account #{account_number} ({account_name})
yet").format(account_number=selected_account.number,
account_name=selected_account.name) }}</p>
{% endif %}
</div>
</article>
diff --git a/talerbank/app/templates/register.html
b/talerbank/app/templates/register.html
index 12b94cb..4e34806 100644
--- a/talerbank/app/templates/register.html
+++ b/talerbank/app/templates/register.html
@@ -19,7 +19,7 @@
{% extends "base.html" %}
{% block headermsg %}
- <h1 class="nav">Register to the {{ settings_value('TALER_CURRENCY') }}
bank!</h1>
+ <h1 class="nav">{{ _("Register to the {currency}
bank!").format(currency=settings_value('TALER_CURRENCY')) }}</h1>
{% endblock headermsg %}
{% block content %}
@@ -27,7 +27,7 @@
</aside>
<section id="main">
<article>
- <a href="{{ url('index') }}">Back</a>
+ <a href="{{ url('index') }}">{{ _("Back") }}</a>
<div class="notification">
{% if wrong %}
<p class="informational informational-fail">
@@ -36,8 +36,7 @@
{% endif %}
{% if not_available %}
<p class="informational informational-fail">
- Sorry, this username is no longer available.
- Please choose another one!
+ {{ _("Sorry, this username is no longer available. Please choose
another one!") }}
</p>
{% endif %}
</div>
diff --git a/talerbank/app/templates/withdraw_confirm.html
b/talerbank/app/templates/withdraw_confirm.html
index 980e005..49223a8 100644
--- a/talerbank/app/templates/withdraw_confirm.html
+++ b/talerbank/app/templates/withdraw_confirm.html
@@ -30,13 +30,10 @@
</p>
{% endif %}
<p>
- {{ settings_value("TALER_CURRENCY") }} Bank needs to verify that you
- intend to withdraw <b>{{ amount }}</b> from <b>{{ exchange }}</b>.
- To prove that you are the account owner, please answer the
- following "security question" (*):
+ {{ _("{currency} Bank needs to verify that you intend to withdraw
<b>{amount}</b> from <b>{exchange}</b>. To prove that you are the account
owner, please answer the following "security question"
(*):").format(currency=settings_value("TALER_CURRENCY"), amount=amount,
exchange=exchange) }}
</p>
<p>
- What is {{ question }} ?
+ {{ _("What is {question}?").format(question=question) }}
</p>
<div>
<form
@@ -62,10 +59,7 @@
</form>
</div>
<p>
- <small style="margin: 40px 0px">(*) A real bank should ask for
- a PIN/TAN instead of a simple calculation. For example by sending
- a one time password to the customer's mobile or providing her a
- random password generator.
+ <small style="margin: 40px 0px">(*) {{ _("A real bank should ask for a
PIN/TAN instead of a simple calculation. For example by sending a one time
password to the customer's mobile or providing her a random password
generator.") }}
<small>
</p>
{% endblock content %}
diff --git a/talerbank/app/templates/withdraw_show.html
b/talerbank/app/templates/withdraw_show.html
index b7d7683..05fea9b 100644
--- a/talerbank/app/templates/withdraw_show.html
+++ b/talerbank/app/templates/withdraw_show.html
@@ -62,18 +62,20 @@
{% block content %}
<div class="taler-installed-hide">
<p>
- Looks like your browser doesn't support GNU Taler payments. You can try
- installing a <a href="https://taler.net/en/wallet.html">wallet browser
extension</a>.
+ {% autoescape off %}
+ {{ _("Looks like your browser doesn't support GNU Taler payments. You can
try installing a <a href=\"{wallet_link}\">wallet browser
extension</a>.").format(wallet_link="https://taler.net/en/wallet.html")
+ {% endautoescape %}
</p>
</div>
<p>
- You can use this QR code to withdraw to your mobile wallet:
+ {{ _("You can use this QR code to withdraw to your mobile wallet:") }}
</p>
{{ qrcode_svg | safe }}
<p>
- Click <a href="{{ taler_withdraw_uri }}">this link</a> to open your system's
Taler wallet if it exists.
+ {% autoescape off %}
+ {{ _("Click <a href="{taler_withdraw_uri}">this link</a> to open your
system's Taler wallet if it
exists.").format(taler_withdraw_uri=taler_withdraw_uri) }}
+ {% endautoescape %}
</p>
-
{% endblock content %}
diff --git a/talerbank/jinja2.py b/talerbank/jinja2.py
index 0f18f74..9b8d59b 100644
--- a/talerbank/jinja2.py
+++ b/talerbank/jinja2.py
@@ -26,7 +26,7 @@ from urllib.parse import urlparse
from django.urls import reverse, get_script_prefix
from django.conf import settings
from jinja2 import Environment
-from django.utils.translation import ugettext
+from django.utils.translation import gettext
##
# Check if a URL is absolute or not.
@@ -140,7 +140,7 @@ def environment(**options):
"is_valid_amount": is_valid_amount,
"amount_stringify": amount_stringify,
"tojson": tojson,
- "_": ugettext,
+ "_": gettext,
}
)
return env
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-bank] branch master updated (4c3698c -> 31c77be),
gnunet <=