From 8912423aeb6d6cefc562eea1ac3eaa6fe7378112 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Fri, 26 Jun 2026 18:15:51 -0400 Subject: [PATCH] i18n: complete DeviceVerification + PasswordStage dialog translation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Review flagged that wrapping only the buttons left the dialog body copy hardcoded (mixed-language dialogs once a non-en locale ships). Wrap the remaining body/waiting strings ("Please accept…", "Confirm the emoji…", "Do not Match", "Your device is verified.", etc.) and the PasswordStage prompt, adding hooks to the sub-components that lacked one. Keys added to en.json; all t() keys verified to resolve. Co-Authored-By: Claude Opus 4.8 --- public/locales/en.json | 15 +++++++++-- src/app/components/DeviceVerification.tsx | 26 +++++++++++-------- .../components/uia-stages/PasswordStage.tsx | 5 +--- 3 files changed, 29 insertions(+), 17 deletions(-) diff --git a/public/locales/en.json b/public/locales/en.json index bf8cb08f9..8a9507171 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -25,7 +25,17 @@ "close": "Close", "accept": "Accept", "they_match": "They Match", - "okay": "Okay" + "okay": "Okay", + "do_not_match": "Do not Match", + "please_accept": "Please accept the request from other device.", + "waiting_accept": "Waiting for request to be accepted...", + "click_accept": "Click accept to start the verification process.", + "request_accepted": "Verification request has been accepted.", + "waiting_response": "Waiting for the response from other device...", + "starting_emoji": "Starting verification using emoji comparison...", + "confirm_emoji": "Confirm the emoji below are displayed on both devices, in the same order:", + "device_verified": "Your device is verified.", + "verification_canceled": "Verification has been canceled." }, "UrlPreview": { "join_server": "Join Server" @@ -41,7 +51,8 @@ "PasswordStage": { "account_password": "Account Password", "password": "Password", - "invalid_password": "Invalid Password!" + "invalid_password": "Invalid Password!", + "authenticate_prompt": "To perform this action you need to authenticate yourself by entering you account password." } } } diff --git a/src/app/components/DeviceVerification.tsx b/src/app/components/DeviceVerification.tsx index 1ef4a094e..f0f327b02 100644 --- a/src/app/components/DeviceVerification.tsx +++ b/src/app/components/DeviceVerification.tsx @@ -64,10 +64,11 @@ function VerificationUnexpected({ message, onClose }: VerificationUnexpectedProp } function VerificationWaitAccept() { + const { t } = useTranslation(); return ( - Please accept the request from other device. - + {t('Organisms.DeviceVerification.please_accept')} + ); } @@ -82,7 +83,7 @@ function VerificationAccept({ onAccept }: VerificationAcceptProps) { const accepting = acceptState.status === AsyncStatus.Loading; return ( - Click accept to start the verification process. + {t('Organisms.DeviceVerification.click_accept')} @@ -181,6 +184,7 @@ type SasVerificationProps = { onCancel: () => void; }; function SasVerification({ verifier, onCancel }: SasVerificationProps) { + const { t } = useTranslation(); const [sasData, setSasData] = useState(); useVerifierShowSas(verifier, setSasData); @@ -196,7 +200,7 @@ function SasVerification({ verifier, onCancel }: SasVerificationProps) { return ( - + ); } @@ -209,7 +213,7 @@ function VerificationDone({ onExit }: VerificationDoneProps) { return (
- Your device is verified. + {t('Organisms.DeviceVerification.device_verified')}
diff --git a/src/app/components/uia-stages/PasswordStage.tsx b/src/app/components/uia-stages/PasswordStage.tsx index 445049e68..c3fd5c38a 100644 --- a/src/app/components/uia-stages/PasswordStage.tsx +++ b/src/app/components/uia-stages/PasswordStage.tsx @@ -61,10 +61,7 @@ export function PasswordStage({ gap="400" > - - To perform this action you need to authenticate yourself by entering you account - password. - + {t('Organisms.PasswordStage.authenticate_prompt')} {t('Organisms.PasswordStage.password')}