From 456d97225eb018c09aab030cc2760d3949f82280 Mon Sep 17 00:00:00 2001 From: emy Date: Wed, 19 Sep 2018 21:24:07 +0200 Subject: [PATCH] French translation adapted to dynamic currency system. --- contrib/fr/overrides/admin.html | 20 ++++++++++---------- contrib/fr/overrides/goal.html | 20 ++++++++++---------- contrib/fr/overrides/index.html | 6 ++++-- contrib/fr/overrides/layout.html | 2 +- contrib/fr/overrides/panel.html | 4 ++-- templates/goal.html | 2 +- templates/index.html | 2 ++ 7 files changed, 30 insertions(+), 26 deletions(-) diff --git a/contrib/fr/overrides/admin.html b/contrib/fr/overrides/admin.html index 2b6026e..df8f551 100644 --- a/contrib/fr/overrides/admin.html +++ b/contrib/fr/overrides/admin.html @@ -64,24 +64,24 @@ {{ project.name }} - {{ "{:.2f}".format(one_times(project) / 100) }}€ - {{ "{:.2f}".format(recurring(project) / 100) }}€ - {{ "{:.2f}".format(recurring_ever(project) / 100) }}€ + {{ currency.amount("{:.2f}".format(one_times(project) / 100)) }} + {{ currency.amount("{:.2f}".format(recurring(project) / 100)) }} + {{ currency.amount("{:.2f}".format(recurring_ever(project) / 100)) }} {% endfor %} (non précisé) - {{ "{:.2f}".format(unspecified_one_times / 100) }}€ - {{ "{:.2f}".format(unspecified_recurring / 100) }}€ - {{ "{:.2f}".format(unspecified_recurring_ever / 100) }}€ + {{ currency.amount("{:.2f}".format(unspecified_one_times / 100)) }} + {{ currency.amount("{:.2f}".format(unspecified_recurring / 100)) }} + {{ currency.amount("{:.2f}".format(unspecified_recurring_ever / 100)) }} Total - {{ "{:.2f}".format(total_one_time / 100) }}€ - {{ "{:.2f}".format(total_recurring / 100) }}€ - {{ "{:.2f}".format(total_recurring_ever / 100) }}€ + {{ currency.amount("{:.2f}".format(total_one_time / 100)) }} + {{ currency.amount("{:.2f}".format(total_recurring / 100)) }} + {{ currency.amount("{:.2f}".format(total_recurring_ever / 100)) }} @@ -117,7 +117,7 @@ {{ donation.user.email }} {{ donation.project.name if donation.project else "" }} {{ donation.comment if donation.comment else "" }} - {{ "{:.2f}".format(donation.amount / 100) }}€ + {{ currency.amount("{:.2f}".format(donation.amount / 100)) }} {{ "Unique" if str(donation.type) == "DonationType.one_time" else "Mensuel" }} {{ "(cancelled)" if not donation.active else "" }} diff --git a/contrib/fr/overrides/goal.html b/contrib/fr/overrides/goal.html index bd464fb..deed792 100644 --- a/contrib/fr/overrides/goal.html +++ b/contrib/fr/overrides/goal.html @@ -23,21 +23,21 @@ class="progress-bar progress-bar-primary" style="width: {{ recurring_progress * 100 }}%; line-height: 2.5" > - {{ "{:.0f}".format(recurring_sum / 100) }}€ + {{ currency.amount("{:.0f}".format(recurring_sum / 100)) }}
- {{ "{:.0f}".format(patreon_sum / 100) }}€ + {{ currency.amount("{:.0f}".format(patreon_sum / 100)) }}
- {{ "{:.0f}".format(lp_sum / 100) }}€ + {{ currency.amount("{:.0f}".format(lp_sum / 100)) }}
{% endif %} @@ -47,13 +47,13 @@
{% if patreon_count or lp_count %}

- {{ "{:.2f}".format(recurring_sum / 100) }}€ par mois + {{ currency.amount("{:.2f}".format(recurring_sum / 100)) }} par mois via {{ domain }} ({{ recurring_count }} donateurice{{ "s" if recurring_count != 1 else "" }})

{% if patreon_count %}

- {{ "{:.2f}".format(patreon_sum / 100) }}€ par mois + {{ currency.amount("{:.2f}".format(patreon_sum / 100)) }} par mois via - {{ "{:.2f}".format(lp_sum / 100) }}€ par mois + {{ currency.amount("{:.2f}".format(lp_sum / 100)) }} par mois via - {{ "{:.2f}".format(total_sum / 100)}}€ par mois + {{ currency.amount("{:.2f}".format(total_sum / 100))}} par mois sur l'objectif de - {{ "{:.2f}".format(goal / 100) }}€. + {{ currency.amount("{:.2f}".format(goal / 100)) }}.

{% else %}

- Supported with ${{ "{:.2f}".format(total_sum / 100) }} - from {{ total_count }} supporters! + Soutenu par {{ total_count }} personne{{ "s" if total_count != 1 else "" }} + pour un montant total de {{ currency.amount("{:.2f}".format(total_sum / 100)) }}

{% endif %}
diff --git a/contrib/fr/overrides/index.html b/contrib/fr/overrides/index.html index f5b8ef2..c3ab241 100644 --- a/contrib/fr/overrides/index.html +++ b/contrib/fr/overrides/index.html @@ -17,6 +17,8 @@ const i18n = { }; // Fin de traduction +const currency = "{{ _cfg("currency") }}"; + {% if user %} window.email = "{{user.email}}"; {% endif %} @@ -66,7 +68,7 @@ window.email = "{{user.email}}";
+ >{{ currency.amount(amt) }}
{% endfor %}
@@ -79,7 +81,7 @@ window.email = "{{user.email}}";
- + {{ currency.symbol }}
diff --git a/contrib/fr/overrides/layout.html b/contrib/fr/overrides/layout.html index 41c90d8..3d541a7 100644 --- a/contrib/fr/overrides/layout.html +++ b/contrib/fr/overrides/layout.html @@ -5,7 +5,7 @@ {% block title %} - Donations pour {{_cfg("your-name")}} + Donner au {{_cfg("your-name")}} {% endblock %} {% block styles %}{% endblock %} diff --git a/contrib/fr/overrides/panel.html b/contrib/fr/overrides/panel.html index fd7ca8c..2947b7e 100644 --- a/contrib/fr/overrides/panel.html +++ b/contrib/fr/overrides/panel.html @@ -30,7 +30,7 @@ {{ donation.created.strftime("%d-%m-%Y") }} - {{ "{:.2f}".format(donation.amount / 100) }}€ + {{ currency.amount("{:.2f}".format(donation.amount / 100)) }} {{ donation.project.name if donation.project else "Non précisé" }} {% endfor %} @@ -51,7 +51,7 @@ {% for donation in one_times(user) %} {{ donation.created.strftime("%d-%m-%Y") }} - {{ "{:.2f}".format(donation.amount / 100) }}€ + {{ currency.amount("{:.2f}".format(donation.amount / 100)) }} {{ donation.project.name if donation.project else "Non précisé" }} {% endfor %} diff --git a/templates/goal.html b/templates/goal.html index b98c514..e433617 100644 --- a/templates/goal.html +++ b/templates/goal.html @@ -83,7 +83,7 @@

{% else %}

- Supported with ${{ currency.amount("{:.2f}".format(total_sum / 100)) }} + Supported with {{ currency.amount("{:.2f}".format(total_sum / 100)) }} from {{ total_count }} supporters!

{% endif %} diff --git a/templates/index.html b/templates/index.html index 20882fd..e843931 100644 --- a/templates/index.html +++ b/templates/index.html @@ -15,6 +15,8 @@ const i18n = { "Submitting...": "Submitting...", "Donate": "Donate" }; +// End of translation of index.js + const currency = "{{ _cfg("currency") }}"; {% if user %}