Skip to content

Commit

Permalink
fix(clerk-js,types,localizations): Add unstable error localization ke…
Browse files Browse the repository at this point in the history
…y for invalid username character
  • Loading branch information
desiprisg authored Jul 12, 2023
1 parent 0a7a889 commit ae9fc24
Show file tree
Hide file tree
Showing 22 changed files with 31 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .changeset/dry-moles-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@clerk/localizations': patch
'@clerk/clerk-js': patch
'@clerk/types': patch
---

Add `form_username_invalid_character` unstable error localization key.
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
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 @@ -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: '',
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 @@ -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: '',
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 @@ -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: '',
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 @@ -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: '',
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 @@ -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: '',
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 @@ -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: '',
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 @@ -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: '',
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 @@ -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: '',
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 @@ -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: '',
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 @@ -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: '',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/nb-NO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/nl-NL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/pl-PL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/ru-RU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/sv-SE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/tr-TR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/vi-VN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '',
Expand Down
1 change: 1 addition & 0 deletions packages/localizations/src/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '',
Expand Down
1 change: 1 addition & 0 deletions packages/types/src/localization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ae9fc24

Please sign in to comment.