Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/modern-areas-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@clerk/localizations': patch
'@clerk/clerk-js': patch
'@clerk/shared': patch
---

Show the correct error message on `form_new_password_matches_current` error code
6 changes: 5 additions & 1 deletion packages/clerk-js/src/ui/utils/passwordUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ export const createPasswordError = (errors: ClerkAPIError[], localizationConfig:

const { t, locale, passwordSettings } = localizationConfig;

if (errors?.[0]?.code === 'form_password_size_in_bytes_exceeded' || errors?.[0]?.code === 'form_password_pwned') {
if (
errors?.[0]?.code === 'form_password_size_in_bytes_exceeded' ||
errors?.[0]?.code === 'form_password_pwned' ||
errors?.[0]?.code === 'form_new_password_matches_current'
) {
return `${t(localizationKeys(`unstable__errors.${errors?.[0]?.code}` as any)) || errors?.[0]?.message}`;
}

Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/ar-SA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,7 @@ export const arSA: LocalizationResource = {
form_identifier_exists__phone_number: 'تم إستخدام رقم الهاتف هذا. يرجى المحاولة مرة أخرى',
form_identifier_exists__username: 'تم إستخدام اسم المستخدمد هذا. يرجى المحاولة مرة أخرى',
form_identifier_not_found: 'لم يتم العثور على حساب بهذه التفاصيل',
form_new_password_matches_current: undefined,
form_param_format_invalid: undefined,
form_param_format_invalid__email_address: 'يجب أستعمال بريد إلكتروني صالح',
form_param_format_invalid__phone_number: 'Phone number must be in a valid international format',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/be-BY.ts
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,7 @@ export const beBY: LocalizationResource = {
form_identifier_exists__phone_number: 'Гэты нумар тэлефона ўжо выкарыстоўваецца.',
form_identifier_exists__username: 'Гэта імя ўжо занята.',
form_identifier_not_found: 'Мы не знойдзем акаўнта з такімі данымі.',
form_new_password_matches_current: undefined,
form_param_format_invalid: undefined,
form_param_format_invalid__email_address:
'Адрас электроннай пошты павінен быць сапраўдным адрасам электроннай пошты.',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/bg-BG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,7 @@ export const bgBG: LocalizationResource = {
form_identifier_exists__phone_number: 'Този телефонен номер вече е използван.',
form_identifier_exists__username: 'Това потребителско име вече съществува.',
form_identifier_not_found: 'Не можем да намерим този идентификатор.',
form_new_password_matches_current: undefined,
form_param_format_invalid: undefined,
form_param_format_invalid__email_address: 'Имейл адресът не е във валиден формат.',
form_param_format_invalid__phone_number: 'Телефонният номер не е във валиден формат.',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/bn-IN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,7 @@ export const bnIN: LocalizationResource = {
form_identifier_exists__username: 'এই ব্যবহারকারীর নাম ব্যবহৃত হয়েছে। দয়া করে অন্য একটি ব্যবহার করুন।',
form_identifier_not_found:
'এই শনাক্তকারী দিয়ে কোনো অ্যাকাউন্ট পাওয়া যায়নি। দয়া করে চেক করুন এবং আবার চেষ্টা করুন।',
form_new_password_matches_current: undefined,
form_param_format_invalid: 'লেখা মানটি একটি অবৈধ ফরম্যাটে আছে। দয়া করে চেক করুন এবং সংশোধন করুন।',
form_param_format_invalid__email_address: 'ইমেইল ঠিকানা একটি বৈধ ইমেইল ঠিকানা হতে হবে।',
form_param_format_invalid__phone_number: 'ফোন নম্বর একটি বৈধ আন্তর্জাতিক ফরম্যাটে হতে হবে।',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/ca-ES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,7 @@ export const caES: LocalizationResource = {
form_identifier_exists__phone_number: undefined,
form_identifier_exists__username: undefined,
form_identifier_not_found: 'No hem trobat cap compte amb aquests detalls.',
form_new_password_matches_current: undefined,
form_param_format_invalid: 'Format de paràmetre no vàlid.',
form_param_format_invalid__email_address: "L'adreça de correu electrònic ha de ser una adreça vàlida.",
form_param_format_invalid__phone_number: 'El número de telèfon ha de tenir un format internacional vàlid.',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/cs-CZ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,7 @@ export const csCZ: LocalizationResource = {
form_identifier_exists__phone_number: 'Toto telefonní číslo již bylo použito.',
form_identifier_exists__username: 'Toto uživatelské jméno již bylo použito.',
form_identifier_not_found: 'Nebyl nalezen účet s těmihle detaily.',
form_new_password_matches_current: undefined,
form_param_format_invalid: 'Formát parametru je neplatný.',
form_param_format_invalid__email_address: 'Emailová adresa musí být platná.',
form_param_format_invalid__phone_number: 'Telefonní číslo musí být ve validním mezinárodním formátu.',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/da-DK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,7 @@ export const daDK: LocalizationResource = {
form_identifier_exists__phone_number: 'Telefonnummeret er allerede i brug.',
form_identifier_exists__username: 'Brugernavnet er allerede i brug.',
form_identifier_not_found: 'Vi kunne ikke finde en konto med disse detaljer.',
form_new_password_matches_current: undefined,
form_param_format_invalid: 'Formatet er ugyldigt.',
form_param_format_invalid__email_address: 'E-mailadressen skal være en gyldig e-mailadresse.',
form_param_format_invalid__phone_number: 'Telefonnummeret skal være i et gyldigt internationalt format.',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/de-DE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,7 @@ export const deDE: LocalizationResource = {
form_identifier_exists__phone_number: 'Diese Telefonnummer ist bereits vergeben. Bitte wählen Sie eine andere.',
form_identifier_exists__username: 'Dieser Benutzername ist bereits vergeben. Bitte wählen Sie einen anderen.',
form_identifier_not_found: 'Wir konnten kein Konto mit diesen Details finden.',
form_new_password_matches_current: undefined,
form_param_format_invalid: 'Das Format des eingegebenen Parameters ist ungültig.',
form_param_format_invalid__email_address: 'Bitte geben Sie eine gültige E-Mail-Adresse ein.',
form_param_format_invalid__phone_number: 'Die Telefonnummer muss ein gültiges internationales Format haben.',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/el-GR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,7 @@ export const elGR: LocalizationResource = {
form_identifier_exists__phone_number: undefined,
form_identifier_exists__username: undefined,
form_identifier_not_found: 'Δεν βρέθηκε λογαριασμός με αυτές τις λεπτομέρειες.',
form_new_password_matches_current: undefined,
form_param_format_invalid: undefined,
form_param_format_invalid__email_address: 'Η διεύθυνση email πρέπει να είναι μια έγκυρη διεύθυνση email.',
form_param_format_invalid__phone_number: 'Phone number must be in a valid international format',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/en-GB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,7 @@ export const enGB: LocalizationResource = {
form_identifier_exists__phone_number: 'This phone number is taken. Please try another.',
form_identifier_exists__username: 'This username is taken. Please try another.',
form_identifier_not_found: "We couldn't find an account with those details.",
form_new_password_matches_current: undefined,
form_param_format_invalid: 'The value entered is in an invalid format. Please check and correct it.',
form_param_format_invalid__email_address: 'Email address must be a valid email address.',
form_param_format_invalid__phone_number: 'Phone number must be in a valid international format.',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,7 @@ export const enUS: LocalizationResource = {
form_identifier_exists__phone_number: undefined,
form_identifier_exists__username: undefined,
form_identifier_not_found: undefined,
form_new_password_matches_current: 'New password cannot be the same as the current password.',
form_param_format_invalid: undefined,
form_param_format_invalid__email_address: undefined,
form_param_format_invalid__phone_number: undefined,
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/es-CR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,7 @@ export const esCR: LocalizationResource = {
form_identifier_exists__phone_number: 'El número telefónico ya existe.',
form_identifier_exists__username: 'El nombre de usuario ya existe.',
form_identifier_not_found: 'No se encontró una cuenta, intenta de nuevo.',
form_new_password_matches_current: undefined,
form_param_format_invalid: 'Formato inválido.',
form_param_format_invalid__email_address: 'El correo electrónico debe ser válido.',
form_param_format_invalid__phone_number: 'El número telefónico debe ser en un formato válido internacional.',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/es-ES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,7 @@ export const esES: LocalizationResource = {
form_identifier_exists__phone_number: 'Ya existe una cuenta con este número de teléfono.',
form_identifier_exists__username: 'Ya existe una cuenta con este nombre de usuario.',
form_identifier_not_found: 'No se ha encontrado ninguna cuenta con este identificador.',
form_new_password_matches_current: undefined,
form_param_format_invalid: 'Formato de parámetro inválido.',
form_param_format_invalid__email_address:
'La dirección de correo electrónico debe ser una dirección de correo electrónico válida.',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/es-MX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,7 @@ export const esMX: LocalizationResource = {
form_identifier_exists__phone_number: 'El número telefónico ya existe.',
form_identifier_exists__username: 'El nombre de usuario ya existe.',
form_identifier_not_found: 'No se encontró una cuenta con esos detalles.',
form_new_password_matches_current: undefined,
form_param_format_invalid: 'Formato inválido.',
form_param_format_invalid__email_address: 'El correo electrónico debe ser válido.',
form_param_format_invalid__phone_number: 'El número telefónico debe ser en un formato válido internacional.',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/es-UY.ts
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,7 @@ export const esUY: LocalizationResource = {
form_identifier_exists__phone_number: 'Este número de teléfono ya está en uso. Por favor, probá con otro.',
form_identifier_exists__username: 'Este nombre de usuario ya está en uso. Por favor, probá con otro.',
form_identifier_not_found: 'No se encontró una cuenta con esos detalles.',
form_new_password_matches_current: undefined,
form_param_format_invalid: 'El valor ingresado tiene un formato inválido. Por favor, verificá y corregí.',
form_param_format_invalid__email_address: 'El correo electrónico debe ser válido.',
form_param_format_invalid__phone_number: 'El número de teléfono debe estar en un formato internacional válido.',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/fa-IR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,7 @@ export const faIR: LocalizationResource = {
form_identifier_exists__phone_number: 'این شماره تلفن قبلاً استفاده شده است.',
form_identifier_exists__username: 'این نام کاربری قبلاً گرفته شده است.',
form_identifier_not_found: 'شناسه یافت نشد.',
form_new_password_matches_current: undefined,
form_param_format_invalid: 'فرمت پارامتر نامعتبر است.',
form_param_format_invalid__email_address: 'آدرس ایمیل نامعتبر است.',
form_param_format_invalid__phone_number: 'شماره تلفن نامعتبر است.',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/fi-FI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,7 @@ export const fiFI: LocalizationResource = {
form_identifier_exists__phone_number: 'Tämä puhelinnumero on jo käytössä. Kokeile toista.',
form_identifier_exists__username: 'Tämä käyttäjänimi on jo käytössä. Kokeile toista.',
form_identifier_not_found: 'Ei voi löytää tiliä näillä tiedoilla.',
form_new_password_matches_current: undefined,
form_param_format_invalid: undefined,
form_param_format_invalid__email_address: 'Sähköpostiosoiteen tulee olla kelvollinen.',
form_param_format_invalid__phone_number: 'Puhelinnumeron on oltava kelvollisessa kansainvälisessä muodossa',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/fr-FR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,7 @@ export const frFR: LocalizationResource = {
form_identifier_exists__phone_number: 'Ce numéro de téléphone existe déjà.',
form_identifier_exists__username: "Ce nom d'utilisateur existe déjà.",
form_identifier_not_found: "Nous n'avons pas trouvé de compte avec ces détails.",
form_new_password_matches_current: undefined,
form_param_format_invalid: 'Le format est invalide',
form_param_format_invalid__email_address: "L'adresse e-mail doit être une adresse e-mail valide.",
form_param_format_invalid__phone_number: 'Le numéro de téléphone doit être au format international.',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/he-IL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,7 @@ export const heIL: LocalizationResource = {
form_identifier_exists__phone_number: 'מספר הטלפון הזה כבר תפוס. אנא נסה מספר אחר.',
form_identifier_exists__username: 'שם המשתמש הזה כבר תפוס. אנא נסה שם משתמש אחר',
form_identifier_not_found: 'לא ניתן למצוא חשבון עם אלו הפרטים.',
form_new_password_matches_current: undefined,
form_param_format_invalid: undefined,
form_param_format_invalid__email_address: 'כתובת האימייל חייבת להיות כתובת אימייל תקינה.',
form_param_format_invalid__phone_number: 'מספר הטלפון חייב להיות בפורמט בינלאומי תקין.',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/hi-IN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,7 @@ export const hiIN: LocalizationResource = {
form_identifier_exists__phone_number: 'यह फोन नंबर पहले से लिया गया है। कृपया दूसरा प्रयास करें।',
form_identifier_exists__username: 'यह उपयोगकर्ता नाम पहले से लिया गया है। कृपया दूसरा प्रयास करें।',
form_identifier_not_found: 'इस पहचानकर्ता के साथ कोई खाता नहीं मिला। कृपया जांचें और पुनः प्रयास करें।',
form_new_password_matches_current: undefined,
form_param_format_invalid: 'दर्ज किया गया मान अमान्य प्रारूप में है। कृपया इसे जांचें और सही करें।',
form_param_format_invalid__email_address: 'ईमेल पता एक वैध ईमेल पता होना चाहिए।',
form_param_format_invalid__phone_number: 'फोन नंबर एक वैध अंतरराष्ट्रीय प्रारूप में होना चाहिए।',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/hr-HR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,7 @@ export const hrHR: LocalizationResource = {
form_identifier_exists__phone_number: 'Ovaj telefonski broj je zauzet. Molimo pokušajte s drugim.',
form_identifier_exists__username: 'Ovo korisničko ime je zauzeto. Molimo pokušajte s drugim.',
form_identifier_not_found: 'Nismo pronašli račun s tim podacima.',
form_new_password_matches_current: undefined,
form_param_format_invalid: undefined,
form_param_format_invalid__email_address: 'E-mail adresa mora biti valjana e-mail adresa.',
form_param_format_invalid__phone_number: 'Telefonski broj mora biti u valjanom međunarodnom formatu',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/hu-HU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,7 @@ export const huHU: LocalizationResource = {
form_identifier_exists__phone_number: 'Ez a telefonszám már foglalt. Kérlek próbálj egy másikat.',
form_identifier_exists__username: 'Ez a felhasználónév már foglalt. Kérlek próbálj egy másikat.',
form_identifier_not_found: 'Nem találtunk fiókot ezekkel a részletekkel.',
form_new_password_matches_current: undefined,
form_param_format_invalid: undefined,
form_param_format_invalid__email_address: 'Az email címnek érvényes email címnek kell lennie.',
form_param_format_invalid__phone_number: 'A telefonszámnak érvényes telefonszámnak kell lennie.',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/id-ID.ts
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,7 @@ export const idID: LocalizationResource = {
form_identifier_exists__phone_number: 'Nomor telepon ini sudah digunakan. Silakan coba yang lain.',
form_identifier_exists__username: 'Nama pengguna ini sudah digunakan. Silakan coba yang lain.',
form_identifier_not_found: 'Kami tidak dapat menemukan akun dengan detail tersebut.',
form_new_password_matches_current: undefined,
form_param_format_invalid: undefined,
form_param_format_invalid__email_address: 'Alamat email harus berupa alamat email yang valid.',
form_param_format_invalid__phone_number: 'Nomor telepon harus dalam format internasional yang valid',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/is-IS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,7 @@ export const isIS: LocalizationResource = {
form_identifier_exists__phone_number: 'Þetta símanúmer er þegar í notkun. Vinsamlegast reyndu annað.',
form_identifier_exists__username: 'Þetta notendanafn er þegar í notkun. Vinsamlegast reyndu annað.',
form_identifier_not_found: 'Við getum ekki fundið reikning með þessum upplýsingum.',
form_new_password_matches_current: undefined,
form_param_format_invalid: undefined,
form_param_format_invalid__email_address: 'Netfang verður að vera gilt netfang.',
form_param_format_invalid__phone_number: 'Símanúmer verður að vera á giltu alþjóðlegu formi',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/it-IT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,7 @@ export const itIT: LocalizationResource = {
form_identifier_exists__phone_number: 'Questo numero di telefono è già registrato.',
form_identifier_exists__username: 'Questo username è già in uso.',
form_identifier_not_found: 'Non abbiamo trovato nessun account con queste informazioni.',
form_new_password_matches_current: undefined,
form_param_format_invalid: 'Formato non valido.',
form_param_format_invalid__email_address: "L'indirizzo email deve essere un indirizzo email valido.",
form_param_format_invalid__phone_number: 'Il numero di telefono deve essere in un formato internazionale valido.',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/ja-JP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,7 @@ export const jaJP: LocalizationResource = {
form_identifier_exists__phone_number: undefined,
form_identifier_exists__username: undefined,
form_identifier_not_found: undefined,
form_new_password_matches_current: undefined,
form_param_format_invalid: undefined,
form_param_format_invalid__email_address: undefined,
form_param_format_invalid__phone_number: undefined,
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/kk-KZ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,7 @@ export const kkKZ: LocalizationResource = {
form_identifier_exists__phone_number: 'Бұл телефон нөмірі тіркелген. Басқасын қолданыңыз.',
form_identifier_exists__username: 'Бұл пайдаланушы аты тіркелген. Басқасын қолданыңыз.',
form_identifier_not_found: 'Есептік жазба табылмады. Дұрыстығын тексеріңіз.',
form_new_password_matches_current: undefined,
form_param_format_invalid: 'Енгізілген мән жарамсыз пішімде.',
form_param_format_invalid__email_address: 'Электрондық пошта жарамсыз.',
form_param_format_invalid__phone_number: 'Телефон нөмірі жарамсыз.',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/ko-KR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,7 @@ export const koKR: LocalizationResource = {
form_identifier_exists__phone_number: undefined,
form_identifier_exists__username: undefined,
form_identifier_not_found: '이 세부 정보와 일치하는 계정을 찾을 수 없습니다.',
form_new_password_matches_current: undefined,
form_param_format_invalid: undefined,
form_param_format_invalid__email_address: 'Email address must be a valid email address.',
form_param_format_invalid__phone_number: 'Phone number must be in a valid international format',
Expand Down
Loading
Loading