From ae9fc247aca5bf8211cc8e021706325a010ce9d3 Mon Sep 17 00:00:00 2001 From: George Desipris <73396808+desiprisg@users.noreply.github.com> Date: Wed, 12 Jul 2023 17:01:57 +0300 Subject: [PATCH] fix(clerk-js,types,localizations): Add unstable error localization key for invalid username character --- .changeset/dry-moles-melt.md | 7 +++++++ .../src/ui/localization/__tests__/makeLocalizable.test.tsx | 4 ++++ packages/localizations/src/cs-CZ.ts | 1 + packages/localizations/src/da-DK.ts | 1 + packages/localizations/src/de-DE.ts | 1 + packages/localizations/src/en-US.ts | 1 + packages/localizations/src/es-ES.ts | 1 + packages/localizations/src/fr-FR.ts | 1 + packages/localizations/src/he-IL.ts | 1 + packages/localizations/src/it-IT.ts | 1 + packages/localizations/src/ja-JP.ts | 1 + packages/localizations/src/ko-KR.ts | 1 + packages/localizations/src/nb-NO.ts | 1 + packages/localizations/src/nl-NL.ts | 1 + packages/localizations/src/pl-PL.ts | 1 + packages/localizations/src/pt-BR.ts | 1 + packages/localizations/src/ru-RU.ts | 1 + packages/localizations/src/sv-SE.ts | 1 + packages/localizations/src/tr-TR.ts | 1 + packages/localizations/src/vi-VN.ts | 1 + packages/localizations/src/zh-CN.ts | 1 + packages/types/src/localization.ts | 1 + 22 files changed, 31 insertions(+) create mode 100644 .changeset/dry-moles-melt.md diff --git a/.changeset/dry-moles-melt.md b/.changeset/dry-moles-melt.md new file mode 100644 index 00000000000..da642aff27f --- /dev/null +++ b/.changeset/dry-moles-melt.md @@ -0,0 +1,7 @@ +--- +'@clerk/localizations': patch +'@clerk/clerk-js': patch +'@clerk/types': patch +--- + +Add `form_username_invalid_character` unstable error localization key. diff --git a/packages/clerk-js/src/ui/localization/__tests__/makeLocalizable.test.tsx b/packages/clerk-js/src/ui/localization/__tests__/makeLocalizable.test.tsx index 11d11d4f4b1..debf569c8bf 100644 --- a/packages/clerk-js/src/ui/localization/__tests__/makeLocalizable.test.tsx +++ b/packages/clerk-js/src/ui/localization/__tests__/makeLocalizable.test.tsx @@ -93,6 +93,7 @@ describe('Test localizable components', () => { form_identifier_not_found: 'form_identifier_not_found', form_password_pwned: 'form_password_pwned', form_username_invalid_length: 'form_username_invalid_length', + form_username_invalid_character: 'form_username_invalid_character', form_param_format_invalid: 'form_param_format_invalid', form_password_length_too_short: 'form_password_length_too_short', form_param_nil: 'form_param_nil', @@ -114,6 +115,9 @@ describe('Test localizable components', () => { expect(translateError({ code: 'form_username_invalid_length', message: 'message' })).toBe( 'form_username_invalid_length', ); + expect(translateError({ code: 'form_username_invalid_character', message: 'message' })).toBe( + 'form_username_invalid_character', + ); expect(translateError({ code: 'form_param_format_invalid', message: 'message' })).toBe('form_param_format_invalid'); expect(translateError({ code: 'form_password_length_too_short', message: 'message' })).toBe( 'form_password_length_too_short', diff --git a/packages/localizations/src/cs-CZ.ts b/packages/localizations/src/cs-CZ.ts index 4e0b0631e2f..0ee7cb24713 100644 --- a/packages/localizations/src/cs-CZ.ts +++ b/packages/localizations/src/cs-CZ.ts @@ -572,6 +572,7 @@ export const csCZ: LocalizationResource = { form_identifier_not_found: '', form_password_pwned: 'Toto heslo bylo nalezeno v rámci uniku dat a nemůže být použito, prosím zvolte jiné heslo.', form_username_invalid_length: '', + form_username_invalid_character: '', form_param_format_invalid: '', form_password_length_too_short: '', form_param_nil: '', diff --git a/packages/localizations/src/da-DK.ts b/packages/localizations/src/da-DK.ts index 1ef9e468903..272f8f433c4 100644 --- a/packages/localizations/src/da-DK.ts +++ b/packages/localizations/src/da-DK.ts @@ -550,6 +550,7 @@ export const daDK: LocalizationResource = { form_identifier_not_found: '', form_password_pwned: '', form_username_invalid_length: '', + form_username_invalid_character: '', form_param_format_invalid: '', form_password_length_too_short: '', form_param_nil: '', diff --git a/packages/localizations/src/de-DE.ts b/packages/localizations/src/de-DE.ts index c39f8b61097..b15f55eae7b 100644 --- a/packages/localizations/src/de-DE.ts +++ b/packages/localizations/src/de-DE.ts @@ -551,6 +551,7 @@ export const deDE: LocalizationResource = { form_identifier_not_found: '', form_password_pwned: '', form_username_invalid_length: '', + form_username_invalid_character: '', form_param_format_invalid: '', form_password_length_too_short: '', form_param_nil: '', diff --git a/packages/localizations/src/en-US.ts b/packages/localizations/src/en-US.ts index 047f78aa13d..bb213455fdd 100644 --- a/packages/localizations/src/en-US.ts +++ b/packages/localizations/src/en-US.ts @@ -603,6 +603,7 @@ export const enUS: LocalizationResource = { form_password_pwned: 'This password has been found as part of a breach and can not be used, please try another password instead.', form_username_invalid_length: '', + form_username_invalid_character: '', form_param_format_invalid: '', form_param_format_invalid__email_address: 'Email address must be a valid email address.', form_password_length_too_short: '', diff --git a/packages/localizations/src/es-ES.ts b/packages/localizations/src/es-ES.ts index 673671c6603..747d81c013c 100644 --- a/packages/localizations/src/es-ES.ts +++ b/packages/localizations/src/es-ES.ts @@ -547,6 +547,7 @@ export const esES: LocalizationResource = { form_identifier_not_found: '', form_password_pwned: '', form_username_invalid_length: '', + form_username_invalid_character: '', form_param_format_invalid: '', form_password_length_too_short: '', form_param_nil: '', diff --git a/packages/localizations/src/fr-FR.ts b/packages/localizations/src/fr-FR.ts index b17949ea743..57ea3539c67 100644 --- a/packages/localizations/src/fr-FR.ts +++ b/packages/localizations/src/fr-FR.ts @@ -555,6 +555,7 @@ export const frFR: LocalizationResource = { form_identifier_not_found: '', form_password_pwned: '', form_username_invalid_length: '', + form_username_invalid_character: '', form_param_format_invalid: 'Le format est invalide', form_password_length_too_short: '', form_param_nil: '', diff --git a/packages/localizations/src/he-IL.ts b/packages/localizations/src/he-IL.ts index 38461fe2671..e04415a1fb4 100644 --- a/packages/localizations/src/he-IL.ts +++ b/packages/localizations/src/he-IL.ts @@ -560,6 +560,7 @@ export const heIL: LocalizationResource = { form_identifier_not_found: '', form_password_pwned: 'הסיסמה הזו נמצאה כחלק מהפרטים שנחשפו בהפרת נתונים ולא ניתן להשתמש בה, נסה סיסמה אחרת במקום.', form_username_invalid_length: '', + form_username_invalid_character: '', form_param_format_invalid: '', form_password_length_too_short: '', form_param_nil: '', diff --git a/packages/localizations/src/it-IT.ts b/packages/localizations/src/it-IT.ts index 84b7bd03aa2..92cb2a764cd 100644 --- a/packages/localizations/src/it-IT.ts +++ b/packages/localizations/src/it-IT.ts @@ -541,6 +541,7 @@ export const itIT: LocalizationResource = { form_identifier_not_found: '', form_password_pwned: '', form_username_invalid_length: '', + form_username_invalid_character: '', form_param_format_invalid: '', form_password_length_too_short: '', form_param_nil: '', diff --git a/packages/localizations/src/ja-JP.ts b/packages/localizations/src/ja-JP.ts index 6f404717ae0..2a29b083d78 100644 --- a/packages/localizations/src/ja-JP.ts +++ b/packages/localizations/src/ja-JP.ts @@ -570,6 +570,7 @@ export const jaJP: LocalizationResource = { form_password_pwned: 'このパスワードは侵害の一部として見つかったため使用できません。別のパスワードを試してください。', form_username_invalid_length: '', + form_username_invalid_character: '', form_param_format_invalid: '', form_password_length_too_short: '', form_param_nil: '', diff --git a/packages/localizations/src/ko-KR.ts b/packages/localizations/src/ko-KR.ts index 34ce87366a1..3bf700c5987 100644 --- a/packages/localizations/src/ko-KR.ts +++ b/packages/localizations/src/ko-KR.ts @@ -564,6 +564,7 @@ export const koKR: LocalizationResource = { form_identifier_not_found: '', form_password_pwned: '이 비밀번호는 유출사항이 발견되어 사용할 수 없으므로 대신 다른 비밀번호를 사용해 보세요.', form_username_invalid_length: '', + form_username_invalid_character: '', form_param_format_invalid: '', form_password_length_too_short: '', form_param_nil: '', diff --git a/packages/localizations/src/nb-NO.ts b/packages/localizations/src/nb-NO.ts index 19ee96c7863..2b34888ded5 100644 --- a/packages/localizations/src/nb-NO.ts +++ b/packages/localizations/src/nb-NO.ts @@ -594,6 +594,7 @@ export const nbNO: LocalizationResource = { form_password_pwned: 'Dette passordet er funnet som en del av et datainnbrudd og kan ikke brukes. Vennligst prøv et annet passord.', form_username_invalid_length: '', + form_username_invalid_character: '', form_param_format_invalid: '', form_param_format_invalid__email_address: 'E-postadressen må være en gyldig e-postadresse', form_password_length_too_short: '', diff --git a/packages/localizations/src/nl-NL.ts b/packages/localizations/src/nl-NL.ts index c83811fb5e1..845e8467ffc 100644 --- a/packages/localizations/src/nl-NL.ts +++ b/packages/localizations/src/nl-NL.ts @@ -536,6 +536,7 @@ export const nlNL: LocalizationResource = { form_identifier_not_found: '', form_password_pwned: '', form_username_invalid_length: '', + form_username_invalid_character: '', form_param_format_invalid: '', form_password_length_too_short: '', form_param_nil: '', diff --git a/packages/localizations/src/pl-PL.ts b/packages/localizations/src/pl-PL.ts index d80b77aa5a1..e2ea7584c01 100644 --- a/packages/localizations/src/pl-PL.ts +++ b/packages/localizations/src/pl-PL.ts @@ -558,6 +558,7 @@ export const plPL: LocalizationResource = { form_identifier_not_found: '', form_password_pwned: '', form_username_invalid_length: '', + form_username_invalid_character: '', form_param_format_invalid: '', form_password_length_too_short: '', form_param_nil: '', diff --git a/packages/localizations/src/pt-BR.ts b/packages/localizations/src/pt-BR.ts index ff33c6d9d7c..579c797e6dd 100644 --- a/packages/localizations/src/pt-BR.ts +++ b/packages/localizations/src/pt-BR.ts @@ -539,6 +539,7 @@ export const ptBR: LocalizationResource = { form_password_pwned: 'Esta senha apareceu em um vazamento e por isso não pode ser usada, por favor tente outra senha.', form_username_invalid_length: 'O nome de usuário tem um tamanho inválido', + form_username_invalid_character: '', form_param_format_invalid: 'Formato inválido', form_password_length_too_short: 'A senha é muito curta', form_param_nil: 'O campo é obrigatório', diff --git a/packages/localizations/src/ru-RU.ts b/packages/localizations/src/ru-RU.ts index ba99c3254de..97ad7b5cc77 100644 --- a/packages/localizations/src/ru-RU.ts +++ b/packages/localizations/src/ru-RU.ts @@ -578,6 +578,7 @@ export const ruRU: LocalizationResource = { form_password_size_in_bytes_exceeded: 'Ваш пароль превышает максимально допустимое количество байтов, сократите его или удалите некоторые специальные символы.', form_username_invalid_length: '', + form_username_invalid_character: '', form_param_format_invalid: '', form_password_length_too_short: '', form_param_nil: '', diff --git a/packages/localizations/src/sv-SE.ts b/packages/localizations/src/sv-SE.ts index 4ffc3fbd631..0c3fff402cf 100644 --- a/packages/localizations/src/sv-SE.ts +++ b/packages/localizations/src/sv-SE.ts @@ -551,6 +551,7 @@ export const svSE: LocalizationResource = { form_identifier_not_found: '', form_password_pwned: '', form_username_invalid_length: '', + form_username_invalid_character: '', form_param_format_invalid: '', form_password_length_too_short: '', form_param_nil: '', diff --git a/packages/localizations/src/tr-TR.ts b/packages/localizations/src/tr-TR.ts index 3ae0055bd87..8c8df162b3e 100644 --- a/packages/localizations/src/tr-TR.ts +++ b/packages/localizations/src/tr-TR.ts @@ -571,6 +571,7 @@ export const trTR: LocalizationResource = { form_password_pwned: 'Bu şifre bir veri saldırısında ele geçirildiği için kullanılamaz. Lütfen başka bir şifre deneyin.', form_username_invalid_length: '', + form_username_invalid_character: '', form_param_format_invalid: '', form_password_length_too_short: '', form_param_nil: '', diff --git a/packages/localizations/src/vi-VN.ts b/packages/localizations/src/vi-VN.ts index 9cc75522717..a8a3bdd7242 100644 --- a/packages/localizations/src/vi-VN.ts +++ b/packages/localizations/src/vi-VN.ts @@ -600,6 +600,7 @@ export const viVN: LocalizationResource = { form_password_pwned: 'Mật khẩu này đã được phát hiện trong một cuộc tấn công và không thể sử dụng, vui lòng thử mật khẩu khác.', form_username_invalid_length: '', + form_username_invalid_character: '', form_param_format_invalid: '', form_param_format_invalid__email_address: 'Địa chỉ email phải là một địa chỉ email hợp lệ', form_password_length_too_short: '', diff --git a/packages/localizations/src/zh-CN.ts b/packages/localizations/src/zh-CN.ts index d66bfe64c9f..3847304dcf2 100644 --- a/packages/localizations/src/zh-CN.ts +++ b/packages/localizations/src/zh-CN.ts @@ -561,6 +561,7 @@ export const zhCN: LocalizationResource = { captcha_invalid: '由于安全验证失败,注册未成功。请刷新页面重试或联系支持获取更多帮助。', form_password_pwned: '这个密码在数据泄露中被发现,不能使用,请换一个密码试试。', form_username_invalid_length: '', + form_username_invalid_character: '', form_param_format_invalid: '', form_password_length_too_short: '', form_param_nil: '', diff --git a/packages/types/src/localization.ts b/packages/types/src/localization.ts index 18939952bc0..9607e4ed484 100644 --- a/packages/types/src/localization.ts +++ b/packages/types/src/localization.ts @@ -637,6 +637,7 @@ type UnstableErrors = WithParamName<{ captcha_invalid: LocalizationValue; form_password_pwned: LocalizationValue; form_username_invalid_length: LocalizationValue; + form_username_invalid_character: LocalizationValue; form_param_format_invalid: LocalizationValue; form_param_format_invalid__email_address: LocalizationValue; form_password_length_too_short: LocalizationValue;