From: test test Date: Thu, 24 Jun 2021 09:13:12 +0000 (+0200) Subject: Fix password reset issue X-Git-Tag: 2.1~48 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=2b6c904dff94cddbb417c06b5852029418390b7b;p=teleforma.git Fix password reset issue Add translation for password reset --- diff --git a/teleforma/locale/en/LC_MESSAGES/django.mo b/teleforma/locale/en/LC_MESSAGES/django.mo index a87753d7..8595ef63 100644 Binary files a/teleforma/locale/en/LC_MESSAGES/django.mo and b/teleforma/locale/en/LC_MESSAGES/django.mo differ diff --git a/teleforma/locale/fr/LC_MESSAGES/django.mo b/teleforma/locale/fr/LC_MESSAGES/django.mo index ce0bfce2..fca1f68b 100644 Binary files a/teleforma/locale/fr/LC_MESSAGES/django.mo and b/teleforma/locale/fr/LC_MESSAGES/django.mo differ diff --git a/teleforma/locale/fr/LC_MESSAGES/django.po b/teleforma/locale/fr/LC_MESSAGES/django.po index c14f23f0..94510e88 100644 --- a/teleforma/locale/fr/LC_MESSAGES/django.po +++ b/teleforma/locale/fr/LC_MESSAGES/django.po @@ -1427,7 +1427,7 @@ msgstr "Se connecter en tant que" #: templates/registration/login.html:9 templates/telemeta/login.html:19 msgid "Your username and password didn't match. Please try again." -msgstr "" +msgstr "Votre login et mot de passe ne correspondent pas. Veuillez réessayer." #: templates/registration/login.html:23 #, python-format @@ -3381,7 +3381,7 @@ msgstr "" #: templates/telemeta/registration/logged_out.html:8 msgid "Log in again" -msgstr "" +msgstr "Se reconnecter" #: templates/telemeta/registration/password_change_done.html:3 #: templates/telemeta/registration/password_change_form.html:4 @@ -3395,11 +3395,11 @@ msgstr "Déconnexion" #: templates/telemeta/registration/password_change_done.html:5 msgid "Password change successful" -msgstr "" +msgstr "Mot de passe modifié avec succès" #: templates/telemeta/registration/password_change_done.html:9 msgid "Your password was changed." -msgstr "" +msgstr "Votre mot de passe a été modifié." #: templates/telemeta/registration/password_change_form.html:6 msgid "Password change" @@ -3408,22 +3408,22 @@ msgstr "Modification de mot de passe" #: templates/telemeta/registration/password_change_form.html:14 msgid "Please correct the error below." msgid_plural "Please correct the errors below." -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Veuillez corriger l'erreur ci-dessous." +msgstr[1] "Veuillez corriger les erreurs ci-dessous." #: templates/telemeta/registration/password_change_form.html:18 msgid "" "Please enter your old password, for security's sake, and then enter your new " "password twice so we can verify you typed it in correctly." -msgstr "" +msgstr "Veuillez saisir votre ancien mot de passe pour des raisons de sécurité." #: templates/telemeta/registration/password_change_form.html:24 msgid "Old password" -msgstr "" +msgstr "Ancien mot de passe" #: templates/telemeta/registration/password_change_form.html:29 msgid "New password" -msgstr "" +msgstr "Nouveau mot de passe" #: templates/telemeta/registration/password_change_form.html:34 msgid "Password (again)" @@ -3432,39 +3432,39 @@ msgstr "Mot de passe (encore)" #: templates/telemeta/registration/password_change_form.html:42 #: templates/telemeta/registration/password_reset_confirm.html:20 msgid "Change my password" -msgstr "" +msgstr "Changer mon mot de passe" #: templates/telemeta/registration/password_reset_complete.html:7 msgid "Your password has been set. You may go ahead and log in now." -msgstr "" +msgstr "Votre mot de passe a été rédéfini. Vous pouvez désormais vous connecter." #: templates/telemeta/registration/password_reset_complete.html:10 msgid "Log in" -msgstr "" +msgstr "Se connecter" #: templates/telemeta/registration/password_reset_confirm.html:8 msgid "" "Please enter your new password twice so we can verify you typed it in " "correctly." -msgstr "" +msgstr "Veuillez saisir votre nouveau mot de passe une seconde fois." #: templates/telemeta/registration/password_reset_confirm.html:14 msgid "New password:" -msgstr "" +msgstr "Nouveau mot de passe" #: templates/telemeta/registration/password_reset_confirm.html:16 msgid "Confirm password:" -msgstr "" +msgstr "Confirmez votre mot de passe:" #: templates/telemeta/registration/password_reset_confirm.html:24 msgid "Password reset unsuccessful" -msgstr "" +msgstr "Echec de la réinitialisation de mot de passe" #: templates/telemeta/registration/password_reset_confirm.html:25 msgid "" "The password reset link was invalid, possibly because it has already been " "used. Please request a new password reset." -msgstr "" +msgstr "Le lien de réinitialisation de mot de passe est invalide. Probablement parce qu'il a déja été utilisé. Veuillez faire une nouvelle demande de changement de mot de passe." #: templates/telemeta/registration/password_reset_done.html:4 msgid "Password reset successful" @@ -3474,7 +3474,7 @@ msgstr "Demande de réinitialisation de mot de passe envoyée" msgid "" "We've e-mailed you instructions for setting your password to the e-mail " "address you submitted. You should be receiving it shortly." -msgstr "" +msgstr "Nous vous avons envoyé des instructions sur l'adresse mail que vous nous avez indiqué pour définir un nouveau mot de passe. Vous devriez le recevoir dans les prochaines minutes." #: templates/telemeta/registration/password_reset_email.html:3 msgid "You're receiving this e-mail because you requested a password reset" @@ -3489,25 +3489,25 @@ msgstr "de votre compte utilisateur du site %(site_name)s" #: templates/telemeta/registration/password_reset_email.html:6 msgid "Please go to the following page and choose a new password:" -msgstr "" +msgstr "Veuillez suivre ce lien et choisir un nouveau mot de passe:" #: templates/telemeta/registration/password_reset_email.html:10 msgid "Your username, in case you've forgotten:" -msgstr "" +msgstr "Votre login, au cas où vous l'auriez oublié:" #: templates/telemeta/registration/password_reset_form.html:7 msgid "" "Forgotten your password? Enter your e-mail address below, and we'll e-mail " "instructions for setting a new one." -msgstr "" +msgstr "Vous avez oubliez votre mot de passe ? Veuillez saisir votre adresse e-mail et nous vous enverrons un email avec les instructions pour définir un nouveau mot de passe." #: templates/telemeta/registration/password_reset_form.html:11 msgid "E-mail address:" -msgstr "" +msgstr "Adresse e-mail:" #: templates/telemeta/registration/password_reset_form.html:11 msgid "Reset my password" -msgstr "" +msgstr "Réinitialiser mon mot de passe" #: templatetags/telemeta_utils.py:259 #, python-format diff --git a/teleforma/templates/registration/login.html b/teleforma/templates/registration/login.html deleted file mode 100644 index a91624d0..00000000 --- a/teleforma/templates/registration/login.html +++ /dev/null @@ -1,30 +0,0 @@ -{% extends "registration/registration_base.html" %} -{% load i18n %} -{% block title %}{% trans "Login" %}{% endblock %} -{% block content %} -{% url 'auth_password_reset' as auth_pwd_reset_url %} -{% url 'registration_register' as register_url%} - -{% if form.errors %} -

{% blocktrans %}Your username and password didn't match. Please try again.{% endblocktrans %}

-{% endif %} - -
{% csrf_token %} - - - - - - - - - -
{% trans form.username.label_tag %}{{ form.username }}
{% trans form.password.label_tag %}{{ form.password }}
-

{% blocktrans %}Forgot your password? - Need an account?{% endblocktrans %}

- - - -
- -{% endblock %} diff --git a/teleforma/templates/registration/password_reset_email.html b/teleforma/templates/registration/password_reset_email.html index 5bf161f6..715e4fa9 100644 --- a/teleforma/templates/registration/password_reset_email.html +++ b/teleforma/templates/registration/password_reset_email.html @@ -5,7 +5,7 @@ {% trans "Please go to the following page and choose a new password:" %} {% block reset_link %} -{{ protocol }}://{{ domain }}{% url 'teleforma-password-reset-confirm' uidb36=uid token=token %} +{{ protocol }}://{{ domain }}{% url 'teleforma-password-reset-confirm' uidb64=uid token=token %} {% endblock %} {% trans "Your username, in case you've forgotten:" %} {{ user.username }} diff --git a/teleforma/templates/teleforma/login.html b/teleforma/templates/teleforma/login.html index ffff1209..4793ee28 100644 --- a/teleforma/templates/teleforma/login.html +++ b/teleforma/templates/teleforma/login.html @@ -26,7 +26,7 @@ $(document).ready(function() { {{ form.password }}

-{% trans "Password forgotten" %} ? +{% trans "Password forgotten" %}  {% trans "Sign in" %}
diff --git a/teleforma/urls.py b/teleforma/urls.py index e7ad4607..f59a909e 100644 --- a/teleforma/urls.py +++ b/teleforma/urls.py @@ -119,13 +119,10 @@ urlpatterns = [ email_template_name='registration/password_reset_email.html'), name="teleforma-password-reset"), url(r'^accounts/password_reset_done/$', PasswordResetDoneView.as_view( template_name='registration/password_reset_done.html'), name="password_reset_done"), - url(r'^accounts/password_reset_confirm/(?P[A-Za-z0-9._-]+)/(?P[A-Za-z0-9._-]+)/$', PasswordResetConfirmView.as_view( + path('accounts/password_reset_confirm///', PasswordResetConfirmView.as_view( template_name='registration/password_reset_confirm.html'), name="teleforma-password-reset-confirm"), url(r'^accounts/password_reset_complete/$', PasswordResetCompleteView.as_view(template_name='registration/password_reset_complete.html'), - name="teleforma-password-reset-complete"), - url(r'^accounts/password_reset_complete/$', PasswordResetCompleteView.as_view( - template_name='registration/password_reset_complete.html'), name="teleforma-password-reset-complete"), - + name="password_reset_complete"), # Help url(r'^help/$', HelpView.as_view(), name="teleforma-help"),