diff --git a/contrib/fr/overrides/index.html b/contrib/fr/overrides/index.html
index b5600cb..8330797 100644
--- a/contrib/fr/overrides/index.html
+++ b/contrib/fr/overrides/index.html
@@ -6,6 +6,17 @@ window.avatar = "{{ avatar }}";
window.your_name = "{{ _cfg("your-name") }}";
window.default_amount = {{ _cfg("default-amount") }};
window.default_type = "{{ _cfg("default-type") }}";
+
+// Traduction du /script/index.js
+const i18n = {
+ "Monthly Donation": "Don mensuel",
+ "One-time Donation": "Don Unique",
+ "Donate ": "Donner ";
+ "Submitting...": "Validation...";
+ "Donate": "Donner";
+};
+// Fin de traduction
+
{% if user %}
window.email = "{{user.email}}";
{% endif %}
@@ -20,9 +31,9 @@ window.email = "{{user.email}}";
+ width="128" height="128" />
Soutenir le {{ _cfg("your-name") }}
{% include "summary.html" %}
diff --git a/scripts/index.js b/scripts/index.js
index 0e630f3..d679b45 100644
--- a/scripts/index.js
+++ b/scripts/index.js
@@ -75,12 +75,12 @@
key: window.stripe_key,
image: window.avatar,
locale: 'auto',
- description: donation.type == "monthly" ? "Monthly Donation" : "One-time Donation",
- panelLabel: "Donate {{amount}}",
+ description: donation.type == "monthly" ? i18n["Monthly Donation"] : i18n["One-time Donation"],
+ panelLabel: i18n["Donate "] + "{{amount}}",
amount: donation.amount,
token: function(token) {
e.target.setAttribute("disabled", "");
- e.target.textContent = "Submitting...";
+ e.target.textContent = i18n["Submitting..."];
var data = new FormData();
data.append("stripe_token", token.id);
@@ -109,7 +109,7 @@
errors.classList.remove("hidden");
errors.querySelector("p").textContent = res.reason;
e.target.removeAttribute("disabled");
- e.target.textContent = "Donate";
+ e.target.textContent = i18n["Donate"];
}
};
xhr.send(data);