French translation adapted to dynamic currency system.

This commit is contained in:
emy 2018-09-19 21:24:07 +02:00
parent 0a1b360347
commit 456d97225e
7 changed files with 30 additions and 26 deletions

View File

@ -64,24 +64,24 @@
<tr>
<td><button type="button" class="close">&times;</button></td>
<td>{{ project.name }}</td>
<td>{{ "{:.2f}".format(one_times(project) / 100) }}</td>
<td>{{ "{:.2f}".format(recurring(project) / 100) }}</td>
<td>{{ "{:.2f}".format(recurring_ever(project) / 100) }}</td>
<td>{{ currency.amount("{:.2f}".format(one_times(project) / 100)) }}</td>
<td>{{ currency.amount("{:.2f}".format(recurring(project) / 100)) }}</td>
<td>{{ currency.amount("{:.2f}".format(recurring_ever(project) / 100)) }}</td>
</tr>
{% endfor %}
<tr>
<td></td>
<td>(non précisé)</td>
<td>{{ "{:.2f}".format(unspecified_one_times / 100) }}</td>
<td>{{ "{:.2f}".format(unspecified_recurring / 100) }}</td>
<td>{{ "{:.2f}".format(unspecified_recurring_ever / 100) }}</td>
<td>{{ currency.amount("{:.2f}".format(unspecified_one_times / 100)) }}</td>
<td>{{ currency.amount("{:.2f}".format(unspecified_recurring / 100)) }}</td>
<td>{{ currency.amount("{:.2f}".format(unspecified_recurring_ever / 100)) }}</td>
</tr>
<tr>
<td></td>
<td><strong>Total</strong></td>
<td>{{ "{:.2f}".format(total_one_time / 100) }}</td>
<td>{{ "{:.2f}".format(total_recurring / 100) }}</td>
<td>{{ "{:.2f}".format(total_recurring_ever / 100) }}</td>
<td>{{ currency.amount("{:.2f}".format(total_one_time / 100)) }}</td>
<td>{{ currency.amount("{:.2f}".format(total_recurring / 100)) }}</td>
<td>{{ currency.amount("{:.2f}".format(total_recurring_ever / 100)) }}</td>
</tr>
</tbody>
</table>
@ -117,7 +117,7 @@
<td><a href="mailto:{{ donation.user.email }}">{{ donation.user.email }}</a></td>
<td>{{ donation.project.name if donation.project else "" }}</td>
<td title="{{ donation.comment }}">{{ donation.comment if donation.comment else "" }}</td>
<td>{{ "{:.2f}".format(donation.amount / 100) }}</td>
<td>{{ currency.amount("{:.2f}".format(donation.amount / 100)) }}</td>
<td>
{{ "Unique" if str(donation.type) == "DonationType.one_time" else "Mensuel" }}
{{ "(cancelled)" if not donation.active else "" }}

View File

@ -23,21 +23,21 @@
class="progress-bar progress-bar-primary"
style="width: {{ recurring_progress * 100 }}%; line-height: 2.5"
>
<span>{{ "{:.0f}".format(recurring_sum / 100) }}</span>
<span>{{ currency.amount("{:.0f}".format(recurring_sum / 100)) }}</span>
</div>
<div
class="progress-bar progress-bar-info"
style="width: {{ patreon_progress * 100 }}%; line-height: 2.5"
>
<span>{{ "{:.0f}".format(patreon_sum / 100) }}</span>
<span>{{ currency.amount("{:.0f}".format(patreon_sum / 100)) }}</span>
</div>
<div
class="progress-bar progress-bar-warning"
style="width: {{ lp_progress * 100 }}%; line-height: 2.5"
>
<span>{{ "{:.0f}".format(lp_sum / 100) }}</span>
<span>{{ currency.amount("{:.0f}".format(lp_sum / 100)) }}</span>
</div>
</div>
{% endif %}
@ -47,13 +47,13 @@
<div class="col-md-6 col-md-offset-3">
{% if patreon_count or lp_count %}
<p>
{{ "{:.2f}".format(recurring_sum / 100) }} par mois
{{ currency.amount("{:.2f}".format(recurring_sum / 100)) }} par mois
via <strong class="text-primary">{{ domain }}</strong>
({{ recurring_count }} donateurice{{ "s" if recurring_count != 1 else "" }})
</p>
{% if patreon_count %}
<p>
{{ "{:.2f}".format(patreon_sum / 100) }} par mois
{{ currency.amount("{:.2f}".format(patreon_sum / 100)) }} par mois
via
<strong><a
href="https://patreon.com/{{ _cfg("patreon-campaign") }}"
@ -64,7 +64,7 @@
{% endif %}
{% if lp_count %}
<p>
{{ "{:.2f}".format(lp_sum / 100) }} par mois
{{ currency.amount("{:.2f}".format(lp_sum / 100)) }} par mois
via
<strong><a
class="text-warning"
@ -76,14 +76,14 @@
{% endif %}
{% if goal %}
<p class="{{ "text-center" if not patreon_sum else "" }}">
{{ "{:.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)) }}.
</p>
{% else %}
<p>
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)) }}
</p>
{% endif %}
</div>

View File

@ -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}}";
<div class="btn-group" role="group">
<button data-amount="{{ amt }}" type="button"
class="btn btn-default {{"active" if _cfg("default-amount") == amt else ""}}"
>{{ amt }}</button>
>{{ currency.amount(amt) }}</button>
</div>
{% endfor %}
<div class="btn-group" role="group">
@ -79,7 +81,7 @@ window.email = "{{user.email}}";
<div class="col-md-4 col-md-offset-4">
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"></span>
<span class="input-group-addon">{{ currency.symbol }}</span>
<input id="custom-amount-text" type="text" value="13.12"
class="form-control" placeholder="Montant" />
</div>

View File

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="static/icon.png" type="image/png" />
{% block title %}
<title>Donations pour {{_cfg("your-name")}}</title>
<title>Donner au {{_cfg("your-name")}}</title>
{% endblock %}
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" />
{% block styles %}{% endblock %}

View File

@ -30,7 +30,7 @@
</form>
</td>
<td>{{ donation.created.strftime("%d-%m-%Y") }}</td>
<td>{{ "{:.2f}".format(donation.amount / 100) }}</td>
<td>{{ currency.amount("{:.2f}".format(donation.amount / 100)) }}</td>
<td>{{ donation.project.name if donation.project else "Non précisé" }}</td>
</tr>
{% endfor %}
@ -51,7 +51,7 @@
{% for donation in one_times(user) %}
<tr>
<td>{{ donation.created.strftime("%d-%m-%Y") }}</td>
<td>{{ "{:.2f}".format(donation.amount / 100) }}</td>
<td>{{ currency.amount("{:.2f}".format(donation.amount / 100)) }}</td>
<td>{{ donation.project.name if donation.project else "Non précisé" }}</td>
</tr>
{% endfor %}

View File

@ -83,7 +83,7 @@
</p>
{% else %}
<p>
Supported with ${{ currency.amount("{:.2f}".format(total_sum / 100)) }}
Supported with {{ currency.amount("{:.2f}".format(total_sum / 100)) }}
from {{ total_count }} supporters!
</p>
{% endif %}

View File

@ -15,6 +15,8 @@ const i18n = {
"Submitting...": "Submitting...",
"Donate": "Donate"
};
// End of translation of index.js
const currency = "{{ _cfg("currency") }}";
{% if user %}