From 452b1b85396b5856e7cfb6cd7653a555779dfab2 Mon Sep 17 00:00:00 2001 From: William Grant Date: Tue, 14 May 2024 16:37:14 +1000 Subject: [PATCH] fix: use localised strings for qr password toggle button --- _locales/en/messages.json | 2 ++ ts/components/settings/section/CategoryRecoveryPassword.tsx | 4 ++-- ts/types/LocalizerKeys.ts | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 72d933528..13de1fcf9 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -381,6 +381,7 @@ "orJoinOneOfThese": "Or join one of these...", "otherPlural": "$number$ others", "otherSingular": "$number$ other", + "passwordView": "View as Password", "passwordCharacterError": "Password must only contain letters, numbers and symbols", "passwordCreate": "Create your password", "passwordLengthError": "Password must be between 6 and 64 characters long", @@ -406,6 +407,7 @@ "pruneSettingDescription": "Delete messages older than 6 months from Communities that have over 2,000 messages.", "pruneSettingTitle": "Trim Communities", "publicChatExists": "You are already connected to this community", + "qrView": "View QR", "quoteThumbnailAlt": "Thumbnail of image from quoted message", "rateLimitReactMessage": "Slow down! You've sent too many emoji reacts. Try again soon", "reactionListCountPlural": "And $otherPlural$ have reacted $emoji$ to this message", diff --git a/ts/components/settings/section/CategoryRecoveryPassword.tsx b/ts/components/settings/section/CategoryRecoveryPassword.tsx index 5f6eba6b9..8f3877757 100644 --- a/ts/components/settings/section/CategoryRecoveryPassword.tsx +++ b/ts/components/settings/section/CategoryRecoveryPassword.tsx @@ -151,7 +151,7 @@ export const SettingsCategoryRecoveryPassword = () => { { marginLeft: isQRVisible ? '-8px' : undefined, }} > - {isQRVisible ? 'View as Password' : 'View QR'} + {isQRVisible ? window.i18n('passwordView') : window.i18n('qrView')} {!hideRecoveryPassword ? ( diff --git a/ts/types/LocalizerKeys.ts b/ts/types/LocalizerKeys.ts index 3e6175aa5..383d41ff3 100644 --- a/ts/types/LocalizerKeys.ts +++ b/ts/types/LocalizerKeys.ts @@ -385,6 +385,7 @@ export type LocalizerKeys = | 'passwordCreate' | 'passwordLengthError' | 'passwordTypeError' + | 'passwordView' | 'passwordViewTitle' | 'passwordsDoNotMatch' | 'permissionsSettingsTitle' @@ -406,6 +407,7 @@ export type LocalizerKeys = | 'pruneSettingDescription' | 'pruneSettingTitle' | 'publicChatExists' + | 'qrView' | 'quoteThumbnailAlt' | 'rateLimitReactMessage' | 'reactionListCountPlural'