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
6 changes: 6 additions & 0 deletions .changeset/pretty-chicken-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@clerk/localizations': minor
---

Remove `not_allowed_access` localizations from `en_*` localization files to rely on more-specific API-based error messages.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it feels a bit wrong that only the english version will benefit from this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@panteliselef This is true, though Braden and I have follow-on work planned.

Update and translate additional non-english `not_allowed_access` error messages.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe('Test localizable components', () => {
form_param_nil: 'form_param_nil',
form_code_incorrect: 'form_code_incorrect',
form_password_incorrect: 'form_password_incorrect',
not_allowed_access: 'not_allowed_access',
not_allowed_access: undefined,
form_identifier_exists: 'form_identifier_exists',
form_identifier_exists__username: 'form_identifier_exists__username',
form_identifier_exists__email_address: 'form_identifier_exists__email_address',
Expand All @@ -126,7 +126,7 @@ describe('Test localizable components', () => {
expect(translateError({ code: 'form_param_nil', message: 'message' })).toBe('form_param_nil');
expect(translateError({ code: 'form_code_incorrect', message: 'message' })).toBe('form_code_incorrect');
expect(translateError({ code: 'form_password_incorrect', message: 'message' })).toBe('form_password_incorrect');
expect(translateError({ code: 'not_allowed_access', message: 'message' })).toBe('not_allowed_access');
expect(translateError({ code: 'not_allowed_access', message: 'message' })).toBe('message');
expect(translateError({ code: 'form_identifier_exists', message: 'message' })).toBe('form_identifier_exists');
expect(
translateError({ code: 'form_identifier_exists', message: 'message', meta: { paramName: 'username' } }),
Expand Down
7 changes: 6 additions & 1 deletion packages/localizations/src/ar-SA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export const arSA: LocalizationResource = {
checkout: {
description__paymentSuccessful: undefined,
description__subscriptionSuccessful: undefined,
emailForm: {
subtitle: undefined,
title: undefined,
},
lineItems: {
title__invoiceId: undefined,
title__paymentMethod: undefined,
Expand Down Expand Up @@ -613,7 +617,8 @@ export const arSA: LocalizationResource = {
form_username_invalid_character: undefined,
form_username_invalid_length: undefined,
identification_deletion_failed: 'لا يمكن حذف هويتك الآخيرة ',
not_allowed_access: undefined,
not_allowed_access:
'لا يُسمح بالتسجيل باستخدام عنوان البريد الإلكتروني أو رقم الهاتف. قد يكون ذلك بسبب استخدام "+" أو "=" أو "#" أو "." في عنوان بريدك الإلكتروني، أو استخدام نطاق متصل بخدمة بريد إلكتروني مؤقتة، أو حظرك بشكل صريح. إذا كنت تعتقد أن هذا خطأ، يُرجى التواصل مع الدعم.',
organization_domain_blocked: undefined,
organization_domain_common: undefined,
organization_domain_exists_for_enterprise_connection: undefined,
Expand Down
7 changes: 6 additions & 1 deletion packages/localizations/src/be-BY.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export const beBY: LocalizationResource = {
checkout: {
description__paymentSuccessful: undefined,
description__subscriptionSuccessful: undefined,
emailForm: {
subtitle: undefined,
title: undefined,
},
lineItems: {
title__invoiceId: undefined,
title__paymentMethod: undefined,
Expand Down Expand Up @@ -620,7 +624,8 @@ export const beBY: LocalizationResource = {
form_username_invalid_character: 'Імя карыстальніка змяшчае недапушчальныя сімвалы.',
form_username_invalid_length: 'Імя карыстальніка павінна быць ад 3 да 50 сімвалаў.',
identification_deletion_failed: 'Вы не можаце выдаліць вашу апошнюю ідэнтыфікацыю.',
not_allowed_access: 'Вы не маеце правоў доступу.',
not_allowed_access:
"Адрас электроннай пошты ці нумар тэлефона не дазволены для рэгістрацыі. Гэта можа быць звязана з выкарыстаннем знакаў '+', '=', '#' або '.' у вашым адрасе электроннай пошты, з дапамогай дамена, падлучанага да часовай службы электроннай пошты, або відавочна заблакіраваны. Калі вы лічыце, што гэта памылка, звярніцеся ў службу падтрымкі.",
organization_domain_blocked: 'Дамен арганізацыі заблакаван.',
organization_domain_common: 'Дамен арганізацыі звычайны і не можа быць выкарыстаны.',
organization_domain_exists_for_enterprise_connection: undefined,
Expand Down
9 changes: 7 additions & 2 deletions packages/localizations/src/bg-BG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export const bgBG: LocalizationResource = {
checkout: {
description__paymentSuccessful: undefined,
description__subscriptionSuccessful: undefined,
emailForm: {
subtitle: undefined,
title: undefined,
},
lineItems: {
title__invoiceId: undefined,
title__paymentMethod: undefined,
Expand Down Expand Up @@ -612,7 +616,8 @@ export const bgBG: LocalizationResource = {
form_username_invalid_character: 'Потребителското име съдържа невалидни символи.',
form_username_invalid_length: 'Потребителското име трябва да бъде между 3 и 256 символа.',
identification_deletion_failed: 'Не можете да изтриете последната си идентификация.',
not_allowed_access: 'Нямате необходимите разрешения за достъп.',
not_allowed_access:
'Имейл адресът или телефонният номер не са разрешени за регистрация. Това може да се дължи на използването на „+“, „=“, „#“ или „.“ във вашия имейл адрес, като използвате домейн, свързан с временна имейл услуга, или сте изрично блокирани. Ако смятате, че това е грешка, моля, свържете се с поддръжката.',
organization_domain_blocked: 'Доменът на организацията е блокиран.',
organization_domain_common: 'Доменът на организацията е твърде общ.',
organization_domain_exists_for_enterprise_connection: undefined,
Expand All @@ -632,8 +637,8 @@ export const bgBG: LocalizationResource = {
requireUppercase: 'главна буква',
sentencePrefix: 'Вашата парола трябва да съдържа',
},
session_exists: 'Вече сте влезнали.',
phone_number_exists: 'Този телефонен номер е зает. Моля, опитайте с друг.',
session_exists: 'Вече сте влезнали.',
web3_missing_identifier: undefined,
zxcvbn: {
couldBeStronger: 'Вашата парола работи, но може да бъде по-сигурна. Опитайте да добавите повече символи.',
Expand Down
7 changes: 6 additions & 1 deletion packages/localizations/src/ca-ES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export const caES: LocalizationResource = {
checkout: {
description__paymentSuccessful: undefined,
description__subscriptionSuccessful: undefined,
emailForm: {
subtitle: undefined,
title: undefined,
},
lineItems: {
title__invoiceId: undefined,
title__paymentMethod: undefined,
Expand Down Expand Up @@ -615,7 +619,8 @@ export const caES: LocalizationResource = {
form_username_invalid_character: "El nom d'usuari conté caràcters no vàlids.",
form_username_invalid_length: "El nom d'usuari ha de tenir entre 3 i 50 caràcters.",
identification_deletion_failed: 'No pots eliminar la teva última identificació.',
not_allowed_access: "No tens permís per accedir a aquesta pàgina. Si us plau, posa't en contacte amb el suport.",
not_allowed_access:
"L'adreça de correu electrònic o el número de telèfon no es permet registrar-se. Això podria ser degut a l'ús de '+', '=', '#' o '.' a la vostra adreça de correu electrònic, utilitzant un domini connectat amb un servei de correu electrònic temporal o bloquejant-se explícitament. Si creieu que es tracta d'un error, poseu-vos en contacte amb el servei d'assistència.",
organization_domain_blocked: undefined,
organization_domain_common: undefined,
organization_domain_exists_for_enterprise_connection: undefined,
Expand Down
7 changes: 6 additions & 1 deletion packages/localizations/src/cs-CZ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export const csCZ: LocalizationResource = {
checkout: {
description__paymentSuccessful: undefined,
description__subscriptionSuccessful: undefined,
emailForm: {
subtitle: undefined,
title: undefined,
},
lineItems: {
title__invoiceId: undefined,
title__paymentMethod: undefined,
Expand Down Expand Up @@ -612,7 +616,8 @@ export const csCZ: LocalizationResource = {
form_username_invalid_character: undefined,
form_username_invalid_length: undefined,
identification_deletion_failed: 'You cannot delete your last identification.',
not_allowed_access: undefined,
not_allowed_access:
"E-mailová adresa nebo telefonní číslo není povoleno k registraci. Může to být způsobeno použitím '+', '=', '#' nebo '.' ve vaší e-mailové adrese, pomocí domény propojené s dočasnou e-mailovou službou nebo jsou explicitně blokovány. Pokud se domníváte, že se jedná o chybu, kontaktujte podporu.",
organization_domain_blocked: undefined,
organization_domain_common: undefined,
organization_domain_exists_for_enterprise_connection: undefined,
Expand Down
7 changes: 6 additions & 1 deletion packages/localizations/src/da-DK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export const daDK: LocalizationResource = {
checkout: {
description__paymentSuccessful: undefined,
description__subscriptionSuccessful: undefined,
emailForm: {
subtitle: undefined,
title: undefined,
},
lineItems: {
title__invoiceId: undefined,
title__paymentMethod: undefined,
Expand Down Expand Up @@ -613,7 +617,8 @@ export const daDK: LocalizationResource = {
form_username_invalid_character: 'Brugernavnet indeholder ugyldige tegn.',
form_username_invalid_length: 'Brugernavnet har en ugyldig længde.',
identification_deletion_failed: 'Du kan ikke slette din sidste identifikation.',
not_allowed_access: 'Adgang ikke tilladt.',
not_allowed_access:
"E-mailadressen eller telefonnummeret er ikke tilladt at tilmelde sig. Dette kan skyldes brug af '+', '=', '#' eller '.' i din e-mail-adresse, ved at bruge et domæne, der er forbundet med en midlertidig e-mail-tjeneste, eller ved at blive eksplicit blokeret. Hvis du mener, at dette er en fejl, bedes du kontakte support.",
organization_domain_blocked: undefined,
organization_domain_common: undefined,
organization_domain_exists_for_enterprise_connection: undefined,
Expand Down
6 changes: 5 additions & 1 deletion packages/localizations/src/de-DE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export const deDE: LocalizationResource = {
checkout: {
description__paymentSuccessful: undefined,
description__subscriptionSuccessful: undefined,
emailForm: {
subtitle: undefined,
title: undefined,
},
lineItems: {
title__invoiceId: undefined,
title__paymentMethod: undefined,
Expand Down Expand Up @@ -625,7 +629,7 @@ export const deDE: LocalizationResource = {
form_username_invalid_length: 'Der Benutzername muss zwischen 3 und 30 Zeichen lang sein.',
identification_deletion_failed: 'Sie können Ihre letzte Kennung nicht löschen.',
not_allowed_access:
'Sie haben keine Berechtigung, auf diese Seite zuzugreifen. Bitte kontaktieren Sie den Support, wenn Sie glauben, dass dies ein Fehler ist.',
"Die E-Mail-Adresse oder Telefonnummer ist für die Anmeldung nicht zulässig. Dies kann daran liegen, dass Ihre E-Mail-Adresse die Zeichen '+', '=', '#' oder '.' enthält, Sie eine Domain verwenden, die mit einem temporären E-Mail-Dienst verknüpft ist, oder dass Sie explizit gesperrt sind. Wenn Sie glauben, dass dies ein Fehler ist, wenden Sie sich bitte an den Support.",
organization_domain_blocked: 'Diese E-Mail-Provider-Domain ist gesperrt. Bitte verwenden Sie eine andere.',
organization_domain_common: 'Dies ist eine gängige E-Mail-Provider-Domain. Bitte verwenden Sie eine andere.',
organization_domain_exists_for_enterprise_connection:
Expand Down
7 changes: 6 additions & 1 deletion packages/localizations/src/el-GR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export const elGR: LocalizationResource = {
checkout: {
description__paymentSuccessful: undefined,
description__subscriptionSuccessful: undefined,
emailForm: {
subtitle: undefined,
title: undefined,
},
lineItems: {
title__invoiceId: undefined,
title__paymentMethod: undefined,
Expand Down Expand Up @@ -618,7 +622,8 @@ export const elGR: LocalizationResource = {
form_username_invalid_character: undefined,
form_username_invalid_length: undefined,
identification_deletion_failed: 'Δεν μπορείτε να διαγράψετε το τελευταίο στοιχείο ταυτοποιησής σας.',
not_allowed_access: undefined,
not_allowed_access:
"Η διεύθυνση email ή το τηλέφωνο δεν επιτρέπεται για την εγγραφή. Αυτό μπορεί να οφείλεται στη χρήση '+', '=', '#' ή '.' στην διεύθυνση email σας, χρήση πεδίου που συνδέεται με υπηρεσία email, ή εμφανής αποκλεισμός. Αν πιστεύετε ότι αυτό είναι ένα σφάλμα, παρακαλούμε επικοινωνήστε με την υποστήριξη.",
organization_domain_blocked: undefined,
organization_domain_common: undefined,
organization_domain_exists_for_enterprise_connection: undefined,
Expand Down
7 changes: 5 additions & 2 deletions packages/localizations/src/en-GB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export const enGB: LocalizationResource = {
checkout: {
description__paymentSuccessful: undefined,
description__subscriptionSuccessful: undefined,
emailForm: {
subtitle: undefined,
title: undefined,
},
lineItems: {
title__invoiceId: undefined,
title__paymentMethod: undefined,
Expand Down Expand Up @@ -620,8 +624,7 @@ export const enGB: LocalizationResource = {
'Your username contains invalid characters. Please use only letters, numbers, and underscores.',
form_username_invalid_length: 'Your username must be between 3 and 20 characters long.',
identification_deletion_failed: 'You cannot delete your last identification.',
not_allowed_access:
"The email address or phone number is not allowed to sign up. This could be due to using '+', '=', '#', or '.' in your email address, using a domain connected with a temporary email service, or being explicitly blocked. If you believe this is an error, please contact support.",
not_allowed_access: undefined,
organization_domain_blocked: 'This is a blocked email provider domain. Please use a different one.',
organization_domain_common: 'This is a common email provider domain. Please use a different one.',
organization_domain_exists_for_enterprise_connection: 'This domain is already used for your organisation’s SSO',
Expand Down
5 changes: 2 additions & 3 deletions packages/localizations/src/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export const enUS: LocalizationResource = {
description__paymentSuccessful: 'Your new subscription is all set.',
description__subscriptionSuccessful: 'Your new subscription is all set.',
emailForm: {
title: 'Add an email address',
subtitle: 'Before you can complete your purchase you must add an email address where receipts will be sent.',
title: 'Add an email address',
},
lineItems: {
title__invoiceId: 'Invoice ID',
Expand Down Expand Up @@ -613,8 +613,7 @@ export const enUS: LocalizationResource = {
'Your username contains invalid characters. Please use only letters, numbers, and underscores.',
form_username_invalid_length: 'Your username must be between {{min_length}} and {{max_length}} characters long.',
identification_deletion_failed: 'You cannot delete your last identification.',
not_allowed_access:
"The email address or phone number is not allowed to sign up. This could be due to using '+', '=', '#', or '.' in your email address, using a domain connected with a temporary email service, or being explicitly blocked. If you believe this is an error, please contact support.",
not_allowed_access: undefined,
organization_domain_blocked: 'This is a blocked email provider domain. Please use a different one.',
organization_domain_common: 'This is a common email provider domain. Please use a different one.',
organization_domain_exists_for_enterprise_connection: 'This domain is already used for your organization’s SSO',
Expand Down
7 changes: 6 additions & 1 deletion packages/localizations/src/es-ES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export const esES: LocalizationResource = {
checkout: {
description__paymentSuccessful: undefined,
description__subscriptionSuccessful: undefined,
emailForm: {
subtitle: undefined,
title: undefined,
},
lineItems: {
title__invoiceId: undefined,
title__paymentMethod: undefined,
Expand Down Expand Up @@ -616,7 +620,8 @@ export const esES: LocalizationResource = {
form_username_invalid_character: 'El nombre de usuario contiene caracteres inválidos.',
form_username_invalid_length: 'El nombre de usuario debe tener entre 3 y 20 caracteres.',
identification_deletion_failed: 'No puedes eliminar tu última identificación.',
not_allowed_access: 'Acceso no permitido.',
not_allowed_access:
"La dirección de correo electrónico o el número de teléfono no está permitido para registrarse. Esto puede deberse al uso de '+', '=', '#' o '.' en tu dirección de correo electrónico, el uso de un dominio conectado a un servicio de correo electrónico temporal o la exclusión explícita. Si cree que se trata de un error, póngase en contacto con el soporte.",
organization_domain_blocked: 'Este es un dominio bloqueado, por favor usa otro.',
organization_domain_common: 'Este es un dominio común, por favor usa otro.',
organization_domain_exists_for_enterprise_connection: undefined,
Expand Down
7 changes: 6 additions & 1 deletion packages/localizations/src/es-MX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export const esMX: LocalizationResource = {
checkout: {
description__paymentSuccessful: undefined,
description__subscriptionSuccessful: undefined,
emailForm: {
subtitle: undefined,
title: undefined,
},
lineItems: {
title__invoiceId: undefined,
title__paymentMethod: undefined,
Expand Down Expand Up @@ -619,7 +623,8 @@ export const esMX: LocalizationResource = {
form_username_invalid_character: 'Carácter inválido.',
form_username_invalid_length: 'La longitud del nombre de usuario es demasiado corta.',
identification_deletion_failed: 'No se puede eliminar la última identificación.',
not_allowed_access: 'No tienes permiso para acceder a este recurso.',
not_allowed_access:
"La dirección de correo electrónico o el número de teléfono no está permitido para registrarse. Esto puede deberse al uso de '+', '=', '#' o '.' en tu dirección de correo electrónico, el uso de un dominio conectado a un servicio de correo electrónico temporal o la exclusión explícita. Si cree que se trata de un error, póngase en contacto con el soporte.",
organization_domain_blocked: undefined,
organization_domain_common: undefined,
organization_domain_exists_for_enterprise_connection: undefined,
Expand Down
Loading