From 9c33be03beee212b18f6f34e9f1bf0e2a076beba Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Tue, 7 Apr 2026 08:57:49 -0700 Subject: [PATCH 1/3] fix(clerk-js): Localize API keys revoke confirmation input --- .changeset/fix-api-keys-revoke-localization.md | 7 +++++++ packages/localizations/src/en-US.ts | 1 + packages/shared/src/types/localization.ts | 1 + .../components/APIKeys/RevokeAPIKeyConfirmationModal.tsx | 7 ++++--- 4 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 .changeset/fix-api-keys-revoke-localization.md diff --git a/.changeset/fix-api-keys-revoke-localization.md b/.changeset/fix-api-keys-revoke-localization.md new file mode 100644 index 00000000000..a89c88d1b6e --- /dev/null +++ b/.changeset/fix-api-keys-revoke-localization.md @@ -0,0 +1,7 @@ +--- +'@clerk/localizations': patch +'@clerk/shared': patch +'@clerk/clerk-js': patch +--- + +Fix API keys "Revoke" confirmation modal being stuck disabled when using a localization. The input label and placeholder now show the localized confirmation text that the user is required to type, instead of being hard-coded to English "Revoke". diff --git a/packages/localizations/src/en-US.ts b/packages/localizations/src/en-US.ts index bb5ca6fb42e..54f4c870bfc 100644 --- a/packages/localizations/src/en-US.ts +++ b/packages/localizations/src/en-US.ts @@ -36,6 +36,7 @@ export const enUS: LocalizationResource = { menuAction__revoke: 'Revoke key', revokeConfirmation: { confirmationText: 'Revoke', + inputLabel: 'Type the confirmation text below to revoke this key.', formButtonPrimary__revoke: 'Revoke key', formHint: 'Are you sure you want to delete this Secret key?', formTitle: 'Revoke "{{apiKeyName}}" secret key?', diff --git a/packages/shared/src/types/localization.ts b/packages/shared/src/types/localization.ts index 6a2656c2b61..b1142118f42 100644 --- a/packages/shared/src/types/localization.ts +++ b/packages/shared/src/types/localization.ts @@ -1287,6 +1287,7 @@ export type __internal_LocalizationResource = { formHint: LocalizationValue; formButtonPrimary__revoke: LocalizationValue; confirmationText: LocalizationValue; + inputLabel: LocalizationValue; }; lastUsed__seconds: LocalizationValue<'seconds'>; lastUsed__minutes: LocalizationValue<'minutes'>; diff --git a/packages/ui/src/components/APIKeys/RevokeAPIKeyConfirmationModal.tsx b/packages/ui/src/components/APIKeys/RevokeAPIKeyConfirmationModal.tsx index c21e709931b..b15c716b806 100644 --- a/packages/ui/src/components/APIKeys/RevokeAPIKeyConfirmationModal.tsx +++ b/packages/ui/src/components/APIKeys/RevokeAPIKeyConfirmationModal.tsx @@ -34,12 +34,13 @@ export const RevokeAPIKeyConfirmationModal = ({ const revokeField = useFormControl('apiKeyRevokeConfirmation', '', { type: 'text', - label: `Type "Revoke" to confirm`, - placeholder: 'Revoke', + label: localizationKeys('apiKeys.revokeConfirmation.inputLabel'), + placeholder: localizationKeys('apiKeys.revokeConfirmation.confirmationText'), isRequired: true, }); - const canSubmit = revokeField.value === t(localizationKeys('apiKeys.revokeConfirmation.confirmationText')); + const canSubmit = + revokeField.value === (t(localizationKeys('apiKeys.revokeConfirmation.confirmationText')) || 'Revoke'); const handleClose = () => { onClose(); From 6bda52d8f6bfe0dcbf19a048633bd9d18ac5d4d4 Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Tue, 7 Apr 2026 09:02:50 -0700 Subject: [PATCH 2/3] fix(localizations): restore "Type \"Revoke\" to confirm" label --- packages/localizations/src/en-US.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/localizations/src/en-US.ts b/packages/localizations/src/en-US.ts index 54f4c870bfc..130d121b173 100644 --- a/packages/localizations/src/en-US.ts +++ b/packages/localizations/src/en-US.ts @@ -36,7 +36,7 @@ export const enUS: LocalizationResource = { menuAction__revoke: 'Revoke key', revokeConfirmation: { confirmationText: 'Revoke', - inputLabel: 'Type the confirmation text below to revoke this key.', + inputLabel: 'Type "Revoke" to confirm', formButtonPrimary__revoke: 'Revoke key', formHint: 'Are you sure you want to delete this Secret key?', formTitle: 'Revoke "{{apiKeyName}}" secret key?', From a5126211528ba6e1a59f5f0ce73595f6a0e71ef8 Mon Sep 17 00:00:00 2001 From: Robert Soriano Date: Tue, 7 Apr 2026 09:10:36 -0700 Subject: [PATCH 3/3] chore: update changeset --- .changeset/fix-api-keys-revoke-localization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/fix-api-keys-revoke-localization.md b/.changeset/fix-api-keys-revoke-localization.md index a89c88d1b6e..e5d42db3cfd 100644 --- a/.changeset/fix-api-keys-revoke-localization.md +++ b/.changeset/fix-api-keys-revoke-localization.md @@ -4,4 +4,4 @@ '@clerk/clerk-js': patch --- -Fix API keys "Revoke" confirmation modal being stuck disabled when using a localization. The input label and placeholder now show the localized confirmation text that the user is required to type, instead of being hard-coded to English "Revoke". +Fixed API keys "Revoke" confirmation modal being stuck disabled when using a localization.