From 867bcaf744cd1a63730bdb2f085f9a24a2688f75 Mon Sep 17 00:00:00 2001 From: Tanmay Deep Sharma Date: Wed, 22 Apr 2026 11:25:43 +0700 Subject: [PATCH] refactor(mfa): address review feedback on low-backup-codes banner - use useMapGetter for current account id - drop onBeforeUnmount cleanup; banner lives in the persistent app shell - switch pluralization to the {n} convention used across en.json --- .../components/app/LowBackupCodesBanner.vue | 17 ++++------------- .../dashboard/i18n/locale/en/mfa.json | 2 +- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/app/javascript/dashboard/components/app/LowBackupCodesBanner.vue b/app/javascript/dashboard/components/app/LowBackupCodesBanner.vue index 5c84153d5..a51024abd 100644 --- a/app/javascript/dashboard/components/app/LowBackupCodesBanner.vue +++ b/app/javascript/dashboard/components/app/LowBackupCodesBanner.vue @@ -1,24 +1,23 @@ diff --git a/app/javascript/dashboard/i18n/locale/en/mfa.json b/app/javascript/dashboard/i18n/locale/en/mfa.json index aff04db85..f6091891c 100644 --- a/app/javascript/dashboard/i18n/locale/en/mfa.json +++ b/app/javascript/dashboard/i18n/locale/en/mfa.json @@ -50,7 +50,7 @@ "DISABLE_BUTTON": "Disable Two-Factor Authentication" }, "LOW_BACKUP_CODES": { - "MESSAGE": "You have {count} backup code remaining. Generate new codes to avoid getting locked out if you lose access to your authenticator. | You have {count} backup codes remaining. Generate new codes to avoid getting locked out if you lose access to your authenticator.", + "MESSAGE": "You have {n} backup code remaining. Generate new codes to avoid getting locked out if you lose access to your authenticator. | You have {n} backup codes remaining. Generate new codes to avoid getting locked out if you lose access to your authenticator.", "NONE_LEFT": "You have no backup codes remaining. Generate new codes now to avoid getting locked out if you lose access to your authenticator.", "ACTION": "Generate codes" },