Skip to content

Commit a2d8ee0

Browse files
committed
feat(account): phone verified success message
1 parent 6a92db2 commit a2d8ee0

File tree

47 files changed

+298
-54
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+298
-54
lines changed

allauth/account/internal/flows/phone_verification.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from typing import Optional
22

3+
from django.contrib import messages
34
from django.http import HttpRequest
45

56
from allauth.account import app_settings
@@ -12,6 +13,7 @@
1213
)
1314
from allauth.account.internal.stagekit import stash_login
1415
from allauth.account.internal.userkit import user_id_to_str
16+
from allauth.core import context
1517

1618

1719
PHONE_VERIFICATION_STATE_KEY = "phone_verification"
@@ -48,7 +50,14 @@ def send(self):
4850

4951
def finish(self):
5052
phone = self.state["phone"]
51-
get_adapter().set_phone_verified(self.user, phone)
53+
adapter = get_adapter()
54+
adapter.set_phone_verified(self.user, phone)
55+
adapter.add_message(
56+
context.request,
57+
messages.SUCCESS,
58+
"account/messages/phone_verified.txt",
59+
{"phone": phone},
60+
)
5261

5362

5463
class PhoneVerificationStageProcess(PhoneVerificationProcess):

allauth/locale/ar/LC_MESSAGES/django.po

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: 0.1\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2025-03-14 05:00-0500\n"
10+
"POT-Creation-Date: 2025-03-14 05:44-0500\n"
1111
"PO-Revision-Date: 2024-12-11 10:35+0100\n"
1212
"Last-Translator: Amr Essam <[email protected]>\n"
1313
"Language-Team: Arabic <https://hosted.weblate.org/projects/allauth/django-"
@@ -1050,6 +1050,11 @@ msgstr "تم تغيير كلمة المرور بنجاح‪."
10501050
msgid "Password successfully set."
10511051
msgstr "تم إعداد كلمة المرور بنجاح‪."
10521052

1053+
#: templates/account/messages/phone_verified.txt:2
1054+
#, python-format
1055+
msgid "You have verified phone number %(phone)s."
1056+
msgstr ""
1057+
10531058
#: templates/account/messages/primary_email_set.txt:2
10541059
msgid "Primary email address set."
10551060
msgstr "تم تعيين عنوان البريد الإلكتروني الرئيسي‪."

allauth/locale/az/LC_MESSAGES/django.po

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgid ""
99
msgstr ""
1010
"Project-Id-Version: django-allauth\n"
1111
"Report-Msgid-Bugs-To: \n"
12-
"POT-Creation-Date: 2025-03-14 05:00-0500\n"
12+
"POT-Creation-Date: 2025-03-14 05:44-0500\n"
1313
"PO-Revision-Date: 2024-04-20 22:02+0200\n"
1414
"Last-Translator: Jeyhun Piriyev <[email protected]>\n"
1515
"Language-Team: Azerbaijani (Azerbaijan)\n"
@@ -1081,6 +1081,11 @@ msgstr "Şifrə uğurla dəyişdirildi."
10811081
msgid "Password successfully set."
10821082
msgstr "Şifrə uğurla təyin edildi."
10831083

1084+
#: templates/account/messages/phone_verified.txt:2
1085+
#, python-format
1086+
msgid "You have verified phone number %(phone)s."
1087+
msgstr ""
1088+
10841089
#: templates/account/messages/primary_email_set.txt:2
10851090
msgid "Primary email address set."
10861091
msgstr "Əsas e-poçt ünvanı təyin edildi."

allauth/locale/bg/LC_MESSAGES/django.po

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: PACKAGE VERSION\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2025-03-14 05:00-0500\n"
10+
"POT-Creation-Date: 2025-03-14 05:44-0500\n"
1111
"PO-Revision-Date: 2024-10-20 19:15+0000\n"
1212
"Last-Translator: Atanas Stoev <[email protected]>\n"
1313
"Language-Team: Bulgarian <https://hosted.weblate.org/projects/allauth/django-"
@@ -1034,6 +1034,11 @@ msgstr "Паролата беше сменена успешно."
10341034
msgid "Password successfully set."
10351035
msgstr "Паролата беше запазена успешно."
10361036

1037+
#: templates/account/messages/phone_verified.txt:2
1038+
#, python-format
1039+
msgid "You have verified phone number %(phone)s."
1040+
msgstr ""
1041+
10371042
#: templates/account/messages/primary_email_set.txt:2
10381043
msgid "Primary email address set."
10391044
msgstr "Основният e-mail адрес беше избран."

allauth/locale/ca/LC_MESSAGES/django.po

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgid ""
99
msgstr ""
1010
"Project-Id-Version: django-allauth\n"
1111
"Report-Msgid-Bugs-To: \n"
12-
"POT-Creation-Date: 2025-03-14 05:00-0500\n"
12+
"POT-Creation-Date: 2025-03-14 05:44-0500\n"
1313
"PO-Revision-Date: 2024-09-26 16:15+0000\n"
1414
"Last-Translator: Ajordat <[email protected]>\n"
1515
"Language-Team: Catalan <https://hosted.weblate.org/projects/allauth/django-"
@@ -1053,6 +1053,11 @@ msgstr "Contrasenya canviada amb èxit."
10531053
msgid "Password successfully set."
10541054
msgstr "Contrasenya establerta amb èxit."
10551055

1056+
#: templates/account/messages/phone_verified.txt:2
1057+
#, python-format
1058+
msgid "You have verified phone number %(phone)s."
1059+
msgstr ""
1060+
10561061
#: templates/account/messages/primary_email_set.txt:2
10571062
msgid "Primary email address set."
10581063
msgstr "Adreça de correu electrònic principal establerta."

allauth/locale/cs/LC_MESSAGES/django.po

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgid ""
99
msgstr ""
1010
"Project-Id-Version: 0.55\n"
1111
"Report-Msgid-Bugs-To: \n"
12-
"POT-Creation-Date: 2025-03-14 05:00-0500\n"
12+
"POT-Creation-Date: 2025-03-14 05:44-0500\n"
1313
"PO-Revision-Date: 2024-09-25 06:15+0000\n"
1414
"Last-Translator: Jakub Boukal <[email protected]>\n"
1515
"Language-Team: Czech <https://hosted.weblate.org/projects/allauth/django-"
@@ -1031,6 +1031,11 @@ msgstr "Heslo bylo úspěšně změněno."
10311031
msgid "Password successfully set."
10321032
msgstr "Heslo bylo úspěšně nastaveno."
10331033

1034+
#: templates/account/messages/phone_verified.txt:2
1035+
#, python-format
1036+
msgid "You have verified phone number %(phone)s."
1037+
msgstr ""
1038+
10341039
#: templates/account/messages/primary_email_set.txt:2
10351040
msgid "Primary email address set."
10361041
msgstr "Primární e-mail byla nastavena."

allauth/locale/da/LC_MESSAGES/django.po

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: \n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2025-03-14 05:00-0500\n"
10+
"POT-Creation-Date: 2025-03-14 05:44-0500\n"
1111
"PO-Revision-Date: 2024-04-20 21:40+0200\n"
1212
"Last-Translator: b'Tuk Bredsdorff <[email protected]>'\n"
1313
"Language-Team: \n"
@@ -1092,6 +1092,11 @@ msgstr "Password ændret med success."
10921092
msgid "Password successfully set."
10931093
msgstr "Password indstillet med success."
10941094

1095+
#: templates/account/messages/phone_verified.txt:2
1096+
#, python-format
1097+
msgid "You have verified phone number %(phone)s."
1098+
msgstr ""
1099+
10951100
#: templates/account/messages/primary_email_set.txt:2
10961101
msgid "Primary email address set."
10971102
msgstr "Primær emailadresse indstillet."

allauth/locale/de/LC_MESSAGES/django.po

+7-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: django-allauth\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2025-03-14 05:00-0500\n"
12-
"PO-Revision-Date: 2025-03-14 11:00+0100\n"
11+
"POT-Creation-Date: 2025-03-14 05:44-0500\n"
12+
"PO-Revision-Date: 2025-03-14 11:46+0100\n"
1313
"Last-Translator: Natalia N <[email protected]>\n"
1414
"Language-Team: German <https://hosted.weblate.org/projects/allauth/django-"
1515
"allauth/de/>\n"
@@ -1013,6 +1013,11 @@ msgstr "Das Passwort wurde geändert."
10131013
msgid "Password successfully set."
10141014
msgstr "Das Passwort wurde erfolgreich gesetzt."
10151015

1016+
#: templates/account/messages/phone_verified.txt:2
1017+
#, python-format
1018+
msgid "You have verified phone number %(phone)s."
1019+
msgstr "Sie haben die Telefonnummer %(phone)s verifiziert."
1020+
10161021
#: templates/account/messages/primary_email_set.txt:2
10171022
msgid "Primary email address set."
10181023
msgstr "Primäre E-Mailadresse festgelegt."

allauth/locale/el/LC_MESSAGES/django.po

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2025-03-14 05:00-0500\n"
11+
"POT-Creation-Date: 2025-03-14 05:44-0500\n"
1212
"PO-Revision-Date: 2024-04-20 21:38+0200\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -1103,6 +1103,11 @@ msgstr "Αλλαγή συνθηματικού ολοκληρώθηκε επιτ
11031103
msgid "Password successfully set."
11041104
msgstr "Συνθηματικό ορίστηκε επιτυχώς."
11051105

1106+
#: templates/account/messages/phone_verified.txt:2
1107+
#, python-format
1108+
msgid "You have verified phone number %(phone)s."
1109+
msgstr ""
1110+
11061111
#: templates/account/messages/primary_email_set.txt:2
11071112
msgid "Primary email address set."
11081113
msgstr "Ορίστηκε η πρωτεύον διεύθυνση e-mail."

allauth/locale/en/LC_MESSAGES/django.po

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2025-03-14 05:00-0500\n"
11+
"POT-Creation-Date: 2025-03-14 05:44-0500\n"
1212
"PO-Revision-Date: 2023-07-24 22:28+0200\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -941,6 +941,11 @@ msgstr ""
941941
msgid "Password successfully set."
942942
msgstr ""
943943

944+
#: templates/account/messages/phone_verified.txt:2
945+
#, python-format
946+
msgid "You have verified phone number %(phone)s."
947+
msgstr ""
948+
944949
#: templates/account/messages/primary_email_set.txt:2
945950
msgid "Primary email address set."
946951
msgstr ""

allauth/locale/es/LC_MESSAGES/django.po

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: 0.61.1\n"
88
"Report-Msgid-Bugs-To: \n"
9-
"POT-Creation-Date: 2025-03-14 05:00-0500\n"
9+
"POT-Creation-Date: 2025-03-14 05:44-0500\n"
1010
"PO-Revision-Date: 2024-09-23 09:16+0000\n"
1111
"Last-Translator: gallegonovato <[email protected]>\n"
1212
"Language-Team: Spanish <https://hosted.weblate.org/projects/allauth/django-"
@@ -1053,6 +1053,11 @@ msgstr "Contraseña cambiada con éxito."
10531053
msgid "Password successfully set."
10541054
msgstr "Contraseña establecida con éxito."
10551055

1056+
#: templates/account/messages/phone_verified.txt:2
1057+
#, python-format
1058+
msgid "You have verified phone number %(phone)s."
1059+
msgstr ""
1060+
10561061
#: templates/account/messages/primary_email_set.txt:2
10571062
msgid "Primary email address set."
10581063
msgstr "Dirección principal de correo electrónico establecida."

allauth/locale/et/LC_MESSAGES/django.po

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2025-03-14 05:00-0500\n"
11+
"POT-Creation-Date: 2025-03-14 05:44-0500\n"
1212
"PO-Revision-Date: 2024-04-20 21:55+0200\n"
1313
"Last-Translator: Gregor Grigorjan <[email protected]>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -1061,6 +1061,11 @@ msgstr "Salasõna muudeti edukalt."
10611061
msgid "Password successfully set."
10621062
msgstr "Salasõna seati edukalt."
10631063

1064+
#: templates/account/messages/phone_verified.txt:2
1065+
#, python-format
1066+
msgid "You have verified phone number %(phone)s."
1067+
msgstr ""
1068+
10641069
#: templates/account/messages/primary_email_set.txt:2
10651070
msgid "Primary email address set."
10661071
msgstr "Primaarne e-posti aadress on nüüd seatud."

allauth/locale/eu/LC_MESSAGES/django.po

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: django-allauth\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2025-03-14 05:00-0500\n"
10+
"POT-Creation-Date: 2025-03-14 05:44-0500\n"
1111
"PO-Revision-Date: 2024-10-31 18:31+0000\n"
1212
"Last-Translator: Alain EIguren <[email protected]>\n"
1313
"Language-Team: Basque <https://hosted.weblate.org/projects/allauth/django-"
@@ -1076,6 +1076,11 @@ msgstr "Pasahitza behar bezala aldatu da."
10761076
msgid "Password successfully set."
10771077
msgstr "Pasahitza behar bezala zehaztu da."
10781078

1079+
#: templates/account/messages/phone_verified.txt:2
1080+
#, python-format
1081+
msgid "You have verified phone number %(phone)s."
1082+
msgstr ""
1083+
10791084
#: templates/account/messages/primary_email_set.txt:2
10801085
msgid "Primary email address set."
10811086
msgstr "Helbide elektroniko nagusia zehaztu da."

allauth/locale/fa/LC_MESSAGES/django.po

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: \n"
88
"Report-Msgid-Bugs-To: \n"
9-
"POT-Creation-Date: 2025-03-14 05:00-0500\n"
9+
"POT-Creation-Date: 2025-03-14 05:44-0500\n"
1010
"PO-Revision-Date: 2024-08-05 09:09+0000\n"
1111
"Last-Translator: Mohammad Amin Osali <[email protected]>\n"
1212
"Language-Team: Persian <https://hosted.weblate.org/projects/allauth/django-"
@@ -1077,6 +1077,11 @@ msgstr "گذرواژه باموفقیت تغییر کرد."
10771077
msgid "Password successfully set."
10781078
msgstr "گذرواژه باموفقیت نهاده شد."
10791079

1080+
#: templates/account/messages/phone_verified.txt:2
1081+
#, python-format
1082+
msgid "You have verified phone number %(phone)s."
1083+
msgstr ""
1084+
10801085
#: templates/account/messages/primary_email_set.txt:2
10811086
msgid "Primary email address set."
10821087
msgstr "نشانی رانامه اصلی نهاده شد."

allauth/locale/fi/LC_MESSAGES/django.po

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2025-03-14 05:00-0500\n"
11+
"POT-Creation-Date: 2025-03-14 05:44-0500\n"
1212
"PO-Revision-Date: 2024-04-20 21:30+0200\n"
1313
"Last-Translator: Anonymous User <[email protected]>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -1081,6 +1081,11 @@ msgstr "Salasana vaihto onnistui."
10811081
msgid "Password successfully set."
10821082
msgstr "Salasana asetettiin."
10831083

1084+
#: templates/account/messages/phone_verified.txt:2
1085+
#, python-format
1086+
msgid "You have verified phone number %(phone)s."
1087+
msgstr ""
1088+
10841089
#: templates/account/messages/primary_email_set.txt:2
10851090
msgid "Primary email address set."
10861091
msgstr "Ensisijainen sähköpostiosoite asetettiin."

allauth/locale/fr/LC_MESSAGES/django.po

+19-6
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ msgid ""
1010
msgstr ""
1111
"Project-Id-Version: django-allauth\n"
1212
"Report-Msgid-Bugs-To: \n"
13-
"POT-Creation-Date: 2025-03-14 05:00-0500\n"
14-
"PO-Revision-Date: 2025-03-14 11:07+0100\n"
13+
"POT-Creation-Date: 2025-03-14 05:44-0500\n"
14+
"PO-Revision-Date: 2025-03-14 11:46+0100\n"
1515
"Last-Translator: Laurent FAVOLE <[email protected]>\n"
1616
"Language-Team: French <https://hosted.weblate.org/projects/allauth/django-"
1717
"allauth/fr/>\n"
@@ -40,7 +40,9 @@ msgstr "L’adresse e-mail ou le mot de passe sont incorrects."
4040

4141
#: account/adapter.py:66
4242
msgid "The phone number and/or password you specified are not correct."
43-
msgstr "Le numéro de téléphone et/ou le mot de passe que vous avez spécifié ne sont pas corrects."
43+
msgstr ""
44+
"Le numéro de téléphone et/ou le mot de passe que vous avez spécifié ne sont "
45+
"pas corrects."
4446

4547
#: account/adapter.py:68
4648
msgid "A user is already registered with this email address."
@@ -132,7 +134,9 @@ msgstr "Comptes"
132134

133135
#: account/fields.py:43
134136
msgid "Enter a phone number including country code (e.g. +1 for the US)."
135-
msgstr "Entrez un numéro de téléphone avec l'indicatif du pays (par exemple, +33 pour la France)."
137+
msgstr ""
138+
"Entrez un numéro de téléphone avec l'indicatif du pays (par exemple, +33 "
139+
"pour la France)."
136140

137141
#: account/fields.py:49 account/fields.py:53 account/forms.py:370
138142
msgid "Phone"
@@ -541,7 +545,9 @@ msgstr "Ce compte est inactif."
541545
msgid ""
542546
"We've sent a code to %(recipient)s. The code expires shortly, so please "
543547
"enter it soon."
544-
msgstr "Nous avons envoyé un code à %(recipient)s. Le code expirera bientôt, veuillez donc l'entrer rapidement."
548+
msgstr ""
549+
"Nous avons envoyé un code à %(recipient)s. Le code expirera bientôt, "
550+
"veuillez donc l'entrer rapidement."
545551

546552
#: templates/account/base_confirm_code.html:38
547553
#: templates/account/email_confirm.html:24
@@ -811,7 +817,9 @@ msgstr "Mot de passe modifié"
811817
msgid ""
812818
"Your password reset code is listed below. Please enter it in your open "
813819
"browser window."
814-
msgstr "Votre code de réinitialisation du mot de passe est indiqué ci-dessous. Veuillez l'entrer dans la fenêtre de votre navigateur ouverte."
820+
msgstr ""
821+
"Votre code de réinitialisation du mot de passe est indiqué ci-dessous. "
822+
"Veuillez l'entrer dans la fenêtre de votre navigateur ouverte."
815823

816824
#: templates/account/email/password_reset_code_subject.txt:3
817825
msgid "Password Reset Code"
@@ -1007,6 +1015,11 @@ msgstr "Mot de passe modifié avec succès."
10071015
msgid "Password successfully set."
10081016
msgstr "Mot de passe défini avec succès."
10091017

1018+
#: templates/account/messages/phone_verified.txt:2
1019+
#, python-format
1020+
msgid "You have verified phone number %(phone)s."
1021+
msgstr "Vous avez vérifié le numéro de téléphone %(phone)s."
1022+
10101023
#: templates/account/messages/primary_email_set.txt:2
10111024
msgid "Primary email address set."
10121025
msgstr "Adresse e-mail principale enregistrée."

0 commit comments

Comments
 (0)