From f2ca4b74469b8507b1bf32bcde523748a46327a5 Mon Sep 17 00:00:00 2001
From: Yohann D'ANELLO
Date: Fri, 11 Dec 2020 16:10:05 +0100
Subject: [PATCH] Update email validation page
---
.../email_validation_complete.html | 6 +++++-
locale/fr/LC_MESSAGES/django.po | 20 +++++++++++++------
2 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/apps/registration/templates/registration/email_validation_complete.html b/apps/registration/templates/registration/email_validation_complete.html
index f58a7e5..4039e0b 100644
--- a/apps/registration/templates/registration/email_validation_complete.html
+++ b/apps/registration/templates/registration/email_validation_complete.html
@@ -19,7 +19,11 @@ SPDX-License-Identifier: GPL-3.0-or-later
{% else %}
- {% trans "The link was invalid. The token may have expired. Please send us an email to activate your account." %}
+ {% if user.is_authenticated and user.registration.email_confirmed %}
+ {% trans "The link was invalid. The token may have expired, or your account is already activated. However, your account seems to be already valid." %}
+ {% else %}
+ {% trans "The link was invalid. The token may have expired, or your account is already activated. Please send us an email to activate your account." %}
+ {% endif %}
{% endif %}
diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po
index 05dfbc2..a93d97f 100644
--- a/locale/fr/LC_MESSAGES/django.po
+++ b/locale/fr/LC_MESSAGES/django.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Corres2math\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-12-11 14:03+0100\n"
+"POT-Creation-Date: 2020-12-11 16:09+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Yohann D'ANELLO \n"
"Language-Team: LANGUAGE \n"
@@ -891,13 +891,21 @@ msgstr "Votre email a été validé avec succès."
msgid "You can now log in."
msgstr "Vous pouvez désormais vous connecter."
-#: apps/registration/templates/registration/email_validation_complete.html:22
+#: apps/registration/templates/registration/email_validation_complete.html:23
msgid ""
-"The link was invalid. The token may have expired. Please send us an email to "
-"activate your account."
+"The link was invalid. The token may have expired, or your account is already "
+"activated. However, your account seems to be already valid."
msgstr ""
-"Le lien est invalide. Le jeton a peut-être expiré. Merci de nous envoyer un "
-"mail pour activer votre compte."
+"Le lien est invalide. Le jeton a peut-être expiré, ou votre compte est déjà "
+"activé. Toutefois, il semble que votre compte est déjà valide."
+
+#: apps/registration/templates/registration/email_validation_complete.html:25
+msgid ""
+"The link was invalid. The token may have expired, or your account is already "
+"activated. Please send us an email to activate your account."
+msgstr ""
+"Le lien est invalide. Le jeton a peut-être expiré, ou votre compte est déjà "
+"activé. Merci de nous envoyer un mail pour activer votre compte."
#: apps/registration/templates/registration/email_validation_email_sent.html:10
msgid "Account activation"