From 884c7c02696c17f08d5422430f1aab576cf87669 Mon Sep 17 00:00:00 2001 From: panteliselef Date: Tue, 14 Jan 2025 12:42:59 +0200 Subject: [PATCH 1/5] fix(localizations): Force interpolation for `socialButtonsBlockButtonManyInView` --- .changeset/lemon-ducks-hug.md | 6 ++++++ packages/localizations/src/be-BY.ts | 2 +- packages/localizations/src/cs-CZ.ts | 2 +- packages/localizations/src/da-DK.ts | 2 +- packages/localizations/src/de-DE.ts | 3 +-- packages/localizations/src/es-ES.ts | 2 +- packages/localizations/src/fr-FR.ts | 2 +- packages/localizations/src/it-IT.ts | 3 +-- packages/localizations/src/nl-NL.ts | 2 +- packages/localizations/src/pt-PT.ts | 2 +- packages/types/src/localization.ts | 7 ++++++- 11 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 .changeset/lemon-ducks-hug.md diff --git a/.changeset/lemon-ducks-hug.md b/.changeset/lemon-ducks-hug.md new file mode 100644 index 0000000000..690afb5c5f --- /dev/null +++ b/.changeset/lemon-ducks-hug.md @@ -0,0 +1,6 @@ +--- +'@clerk/localizations': patch +'@clerk/types': patch +--- + +Update `socialButtonsBlockButtonManyInView` to only accept `'{{provider|titleize}}'` or `undefined`. diff --git a/packages/localizations/src/be-BY.ts b/packages/localizations/src/be-BY.ts index d6a60baf1b..7f0c8a6a07 100644 --- a/packages/localizations/src/be-BY.ts +++ b/packages/localizations/src/be-BY.ts @@ -547,7 +547,7 @@ export const beBY: LocalizationResource = { }, }, socialButtonsBlockButton: 'Працягнуць з дапамогай {{provider|titleize}}', - socialButtonsBlockButtonManyInView: 'Увядзіце дадатковыя спосабы ўваходу', + socialButtonsBlockButtonManyInView: '{{provider|titleize}}', unstable__errors: { already_a_member_in_organization: 'Вы ўжо з’яўляецеся членам гэтай арганізацыі.', diff --git a/packages/localizations/src/cs-CZ.ts b/packages/localizations/src/cs-CZ.ts index 7086e71195..d1e2597048 100644 --- a/packages/localizations/src/cs-CZ.ts +++ b/packages/localizations/src/cs-CZ.ts @@ -540,7 +540,7 @@ export const csCZ: LocalizationResource = { }, }, socialButtonsBlockButton: 'Pokračovat s {{provider|titleize}}', - socialButtonsBlockButtonManyInView: 'Máme více možností přihlášení.', + socialButtonsBlockButtonManyInView: undefined, unstable__errors: { already_a_member_in_organization: 'Již jste členem organizace.', captcha_invalid: diff --git a/packages/localizations/src/da-DK.ts b/packages/localizations/src/da-DK.ts index f39b129404..0e27a70a07 100644 --- a/packages/localizations/src/da-DK.ts +++ b/packages/localizations/src/da-DK.ts @@ -542,7 +542,7 @@ export const daDK: LocalizationResource = { }, }, socialButtonsBlockButton: 'Forsæt med {{provider|titleize}}', - socialButtonsBlockButtonManyInView: 'Vælg en metode til at fortsætte', + socialButtonsBlockButtonManyInView: undefined, unstable__errors: { already_a_member_in_organization: undefined, captcha_invalid: diff --git a/packages/localizations/src/de-DE.ts b/packages/localizations/src/de-DE.ts index 045f7f6679..36e7839a4f 100644 --- a/packages/localizations/src/de-DE.ts +++ b/packages/localizations/src/de-DE.ts @@ -547,8 +547,7 @@ export const deDE: LocalizationResource = { }, }, socialButtonsBlockButton: 'Weiter mit {{provider|titleize}}', - socialButtonsBlockButtonManyInView: - 'Zu viele Buttons angezeigt. Reduzieren Sie die Anzahl der Buttons, um fortzufahren.', + socialButtonsBlockButtonManyInView: undefined, unstable__errors: { already_a_member_in_organization: 'Sie sind bereits Mitglied in dieser Organisation.', captcha_invalid: diff --git a/packages/localizations/src/es-ES.ts b/packages/localizations/src/es-ES.ts index 9d6d81f382..ce519e9693 100644 --- a/packages/localizations/src/es-ES.ts +++ b/packages/localizations/src/es-ES.ts @@ -549,7 +549,7 @@ export const esES: LocalizationResource = { }, }, socialButtonsBlockButton: 'Continuar con {{provider|titleize}}', - socialButtonsBlockButtonManyInView: 'Demasiados botones sociales visibles. Desplázate para ver más.', + socialButtonsBlockButtonManyInView: '{{provider|titleize}}', unstable__errors: { already_a_member_in_organization: '{{email}} ya es miembro de la organización.', captcha_invalid: diff --git a/packages/localizations/src/fr-FR.ts b/packages/localizations/src/fr-FR.ts index 18142568d3..33e94c1461 100644 --- a/packages/localizations/src/fr-FR.ts +++ b/packages/localizations/src/fr-FR.ts @@ -548,7 +548,7 @@ export const frFR: LocalizationResource = { }, }, socialButtonsBlockButton: 'Continuer avec {{provider|titleize}}', - socialButtonsBlockButtonManyInView: 'Afficher plus de boutons sociaux', + socialButtonsBlockButtonManyInView: '{{provider|titleize}}', unstable__errors: { already_a_member_in_organization: 'Vous êtes déjà membre de cette organisation.', captcha_invalid: diff --git a/packages/localizations/src/it-IT.ts b/packages/localizations/src/it-IT.ts index 4fc2a64143..568882d7bc 100644 --- a/packages/localizations/src/it-IT.ts +++ b/packages/localizations/src/it-IT.ts @@ -543,8 +543,7 @@ export const itIT: LocalizationResource = { }, }, socialButtonsBlockButton: 'Continua con {{provider|titleize}}', - socialButtonsBlockButtonManyInView: 'Continua con uno dei seguenti provider', - + socialButtonsBlockButtonManyInView: undefined, unstable__errors: { already_a_member_in_organization: 'Sei già un membro di questa organizzazione.', captcha_invalid: diff --git a/packages/localizations/src/nl-NL.ts b/packages/localizations/src/nl-NL.ts index d4f49b52b7..dcff8bf72b 100644 --- a/packages/localizations/src/nl-NL.ts +++ b/packages/localizations/src/nl-NL.ts @@ -544,7 +544,7 @@ export const nlNL: LocalizationResource = { }, }, socialButtonsBlockButton: 'Ga verder met {{provider|titleize}}', - socialButtonsBlockButtonManyInView: 'Ga verder met {{provider|titleize}}', + socialButtonsBlockButtonManyInView: '{{provider|titleize}}', unstable__errors: { already_a_member_in_organization: 'Je bent al lid van de organisatie.', captcha_invalid: diff --git a/packages/localizations/src/pt-PT.ts b/packages/localizations/src/pt-PT.ts index 157be4453a..a6b149349a 100644 --- a/packages/localizations/src/pt-PT.ts +++ b/packages/localizations/src/pt-PT.ts @@ -543,7 +543,7 @@ export const ptPT: LocalizationResource = { }, }, socialButtonsBlockButton: 'Continuar com {{provider|titleize}}', - socialButtonsBlockButtonManyInView: 'Escolha uma das opções abaixo', + socialButtonsBlockButtonManyInView: '{{provider|titleize}}', unstable__errors: { already_a_member_in_organization: 'Já é membro nesta organização.', captcha_invalid: diff --git a/packages/types/src/localization.ts b/packages/types/src/localization.ts index da660b2de3..69128e44c4 100644 --- a/packages/types/src/localization.ts +++ b/packages/types/src/localization.ts @@ -25,7 +25,12 @@ type _LocalizationResource = { [r: string]: LocalizationValue; }; socialButtonsBlockButton: LocalizationValue; - socialButtonsBlockButtonManyInView: LocalizationValue; + /** + * It should be used to provide a shorter variation of `socialButtonsBlockButton`. + * It is explicitly typed, in order to avoid contributions that use LLM tools to generate + * translations that misinterpret the correct usage of this property. + */ + socialButtonsBlockButtonManyInView: '{{provider|titleize}}' | undefined; dividerText: LocalizationValue; formFieldLabel__emailAddress: LocalizationValue; formFieldLabel__emailAddresses: LocalizationValue; From d1f4382d9f9480fd7377843aa5108956dd1317df Mon Sep 17 00:00:00 2001 From: panteliselef Date: Tue, 14 Jan 2025 13:00:37 +0200 Subject: [PATCH 2/5] relax the types --- packages/localizations/src/nl-NL.ts | 2 +- packages/types/src/localization.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/localizations/src/nl-NL.ts b/packages/localizations/src/nl-NL.ts index dcff8bf72b..d4f49b52b7 100644 --- a/packages/localizations/src/nl-NL.ts +++ b/packages/localizations/src/nl-NL.ts @@ -544,7 +544,7 @@ export const nlNL: LocalizationResource = { }, }, socialButtonsBlockButton: 'Ga verder met {{provider|titleize}}', - socialButtonsBlockButtonManyInView: '{{provider|titleize}}', + socialButtonsBlockButtonManyInView: 'Ga verder met {{provider|titleize}}', unstable__errors: { already_a_member_in_organization: 'Je bent al lid van de organisatie.', captcha_invalid: diff --git a/packages/types/src/localization.ts b/packages/types/src/localization.ts index 69128e44c4..f35df97ed9 100644 --- a/packages/types/src/localization.ts +++ b/packages/types/src/localization.ts @@ -30,7 +30,7 @@ type _LocalizationResource = { * It is explicitly typed, in order to avoid contributions that use LLM tools to generate * translations that misinterpret the correct usage of this property. */ - socialButtonsBlockButtonManyInView: '{{provider|titleize}}' | undefined; + socialButtonsBlockButtonManyInView: `${string}{{provider|titleize}}${string}` | undefined; dividerText: LocalizationValue; formFieldLabel__emailAddress: LocalizationValue; formFieldLabel__emailAddresses: LocalizationValue; From 3600dc9d57e907f708229ea1261b1229090bb906 Mon Sep 17 00:00:00 2001 From: panteliselef Date: Tue, 14 Jan 2025 13:01:56 +0200 Subject: [PATCH 3/5] change to undefined --- packages/localizations/src/es-ES.ts | 2 +- packages/localizations/src/fr-FR.ts | 2 +- packages/localizations/src/pt-PT.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/localizations/src/es-ES.ts b/packages/localizations/src/es-ES.ts index ce519e9693..4c525fd4a5 100644 --- a/packages/localizations/src/es-ES.ts +++ b/packages/localizations/src/es-ES.ts @@ -549,7 +549,7 @@ export const esES: LocalizationResource = { }, }, socialButtonsBlockButton: 'Continuar con {{provider|titleize}}', - socialButtonsBlockButtonManyInView: '{{provider|titleize}}', + socialButtonsBlockButtonManyInView: undefined, unstable__errors: { already_a_member_in_organization: '{{email}} ya es miembro de la organización.', captcha_invalid: diff --git a/packages/localizations/src/fr-FR.ts b/packages/localizations/src/fr-FR.ts index 33e94c1461..12993a30aa 100644 --- a/packages/localizations/src/fr-FR.ts +++ b/packages/localizations/src/fr-FR.ts @@ -548,7 +548,7 @@ export const frFR: LocalizationResource = { }, }, socialButtonsBlockButton: 'Continuer avec {{provider|titleize}}', - socialButtonsBlockButtonManyInView: '{{provider|titleize}}', + socialButtonsBlockButtonManyInView: undefined, unstable__errors: { already_a_member_in_organization: 'Vous êtes déjà membre de cette organisation.', captcha_invalid: diff --git a/packages/localizations/src/pt-PT.ts b/packages/localizations/src/pt-PT.ts index a6b149349a..93006ec09e 100644 --- a/packages/localizations/src/pt-PT.ts +++ b/packages/localizations/src/pt-PT.ts @@ -543,7 +543,7 @@ export const ptPT: LocalizationResource = { }, }, socialButtonsBlockButton: 'Continuar com {{provider|titleize}}', - socialButtonsBlockButtonManyInView: '{{provider|titleize}}', + socialButtonsBlockButtonManyInView: undefined, unstable__errors: { already_a_member_in_organization: 'Já é membro nesta organização.', captcha_invalid: From 0a00e782ca7007620f6e5b4d941188ccc09ff36a Mon Sep 17 00:00:00 2001 From: panteliselef Date: Tue, 14 Jan 2025 13:02:56 +0200 Subject: [PATCH 4/5] change to undefined --- packages/localizations/src/be-BY.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/localizations/src/be-BY.ts b/packages/localizations/src/be-BY.ts index 7f0c8a6a07..7cdd57ed5e 100644 --- a/packages/localizations/src/be-BY.ts +++ b/packages/localizations/src/be-BY.ts @@ -547,7 +547,7 @@ export const beBY: LocalizationResource = { }, }, socialButtonsBlockButton: 'Працягнуць з дапамогай {{provider|titleize}}', - socialButtonsBlockButtonManyInView: '{{provider|titleize}}', + socialButtonsBlockButtonManyInView: undefined, unstable__errors: { already_a_member_in_organization: 'Вы ўжо з’яўляецеся членам гэтай арганізацыі.', From 6f7f46c712ce996e5a7be1650c18bfcdddb0bde3 Mon Sep 17 00:00:00 2001 From: panteliselef Date: Tue, 14 Jan 2025 13:04:59 +0200 Subject: [PATCH 5/5] update changelog --- .changeset/lemon-ducks-hug.md | 2 +- packages/types/src/localization.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.changeset/lemon-ducks-hug.md b/.changeset/lemon-ducks-hug.md index 690afb5c5f..d5dace4456 100644 --- a/.changeset/lemon-ducks-hug.md +++ b/.changeset/lemon-ducks-hug.md @@ -3,4 +3,4 @@ '@clerk/types': patch --- -Update `socialButtonsBlockButtonManyInView` to only accept `'{{provider|titleize}}'` or `undefined`. +Update `socialButtonsBlockButtonManyInView` to only accept `'${string}{{provider|titleize}}${string}'` or `undefined`. diff --git a/packages/types/src/localization.ts b/packages/types/src/localization.ts index f35df97ed9..f6679fd9aa 100644 --- a/packages/types/src/localization.ts +++ b/packages/types/src/localization.ts @@ -30,7 +30,7 @@ type _LocalizationResource = { * It is explicitly typed, in order to avoid contributions that use LLM tools to generate * translations that misinterpret the correct usage of this property. */ - socialButtonsBlockButtonManyInView: `${string}{{provider|titleize}}${string}` | undefined; + socialButtonsBlockButtonManyInView: `${string}{{provider|titleize}}${string}`; dividerText: LocalizationValue; formFieldLabel__emailAddress: LocalizationValue; formFieldLabel__emailAddresses: LocalizationValue;