]> git.parisson.com Git - teleforma.git/commitdiff
Fix password reset issue
authortest test <yoanl@pilotsystems.net>
Thu, 24 Jun 2021 09:13:12 +0000 (11:13 +0200)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Thu, 24 Jun 2021 09:13:12 +0000 (11:13 +0200)
Add translation for password reset

teleforma/locale/en/LC_MESSAGES/django.mo
teleforma/locale/fr/LC_MESSAGES/django.mo
teleforma/locale/fr/LC_MESSAGES/django.po
teleforma/templates/registration/login.html [deleted file]
teleforma/templates/registration/password_reset_email.html
teleforma/templates/teleforma/login.html
teleforma/urls.py

index a87753d7eb8377cff8b2cfcf83a7c6683002ae07..8595ef63756c97500b5dfab3554f82722c899dce 100644 (file)
Binary files a/teleforma/locale/en/LC_MESSAGES/django.mo and b/teleforma/locale/en/LC_MESSAGES/django.mo differ
index ce0bfce23fe56263398cbe62b535969c27e7ff77..fca1f68b960221840c0d03efcbb1400a1e7c5444 100644 (file)
Binary files a/teleforma/locale/fr/LC_MESSAGES/django.mo and b/teleforma/locale/fr/LC_MESSAGES/django.mo differ
index c14f23f0d7e434c91394eefd96f88428495c3381..94510e885532a851a31ac8093e373401d88a6464 100644 (file)
@@ -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 (file)
index a91624d..0000000
+++ /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 %}
-<p>{% blocktrans %}Your username and password didn't match. Please try again.{% endblocktrans %}</p>
-{% endif %}
-
-<form method="post" action="{% url 'teleforma-login' %}">{% csrf_token %}
-<table>
-<tr>
-    <td>{% trans form.username.label_tag %}</td>
-    <td>{{ form.username }}</td>
-</tr>
-<tr>
-    <td>{% trans form.password.label_tag %}</td>
-    <td>{{ form.password }}</td>
-</tr>
-</table>
-<p>{% blocktrans %}<a href="{{ auth_pwd_reset_url }}">Forgot</a> your password?
-    <a href="{{ register_url }}">Need an account</a>?{% endblocktrans %}</p>
-
-<input type="submit" value="{% trans 'login' %}" />
-<input type="hidden" name="next" value="{{ next }}" />
-</form>
-
-{% endblock %}
index 5bf161f6e07ef17f17cad0bf09ed271bba7ee56f..715e4fa9eddda236df1f20fd723785a6adaf8fe8 100644 (file)
@@ -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 }}
 
index ffff12092d8d5368a16741593151a58a4c41486a..4793ee28703538dbfbf014210162179f0457bbee 100644 (file)
@@ -26,7 +26,7 @@ $(document).ready(function() {
 {{ form.password }}
 </p>
 <div style="margin-top: 2em;">
-<span style="align: right; font-weight: bold; margin-right: 2em;"><a href="{% url 'teleforma-password-reset' %}">{% trans "Password forgotten" %} ?</a></span>
+<span style="align: right; font-weight: bold; margin-right: 2em;"><a href="{% url 'teleforma-password-reset' %}">{% trans "Password forgotten" %}</a></span>
 <a href="#" class="component_icon button" id="action_red" onclick="$('#_loginForm').submit();"><img src="/static/teleforma/images/password.png" alt="" style="vertical-align:middle" />&nbsp;{% trans "Sign in" %}</a>
 <input type="hidden" name="next" value="{{ next }}" />
 </div>
index e7ad4607e4d21207f215c8d95fe265c4faf17e08..f59a909ea8fb988cc8b76fb8ce8b2f7db33d5abc 100644 (file)
@@ -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<uidb36>[A-Za-z0-9._-]+)/(?P<token>[A-Za-z0-9._-]+)/$', PasswordResetConfirmView.as_view(
+    path('accounts/password_reset_confirm/<uidb64>/<token>/', 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"),