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')} - Verification request has been accepted. - + {t('Organisms.DeviceVerification.request_accepted')} + ); } @@ -109,13 +111,14 @@ type VerificationStartProps = { onStart: () => Promise; }; function AutoVerificationStart({ onStart }: VerificationStartProps) { + const { t } = useTranslation(); useEffect(() => { onStart(); }, [onStart]); return ( - + ); } @@ -129,7 +132,7 @@ function CompareEmoji({ sasData }: { sasData: ShowSasCallbacks }) { return ( - Confirm the emoji below are displayed on both devices, in the same order: + {t('Organisms.DeviceVerification.confirm_emoji')} sasData.mismatch()} disabled={confirming} > - Do not Match + {t('Organisms.DeviceVerification.do_not_match')} @@ -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')} {t('Organisms.DeviceVerification.okay')} @@ -225,7 +229,7 @@ function VerificationCanceled({ onClose }: VerificationCanceledProps) { const { t } = useTranslation(); return ( - Verification has been canceled. + {t('Organisms.DeviceVerification.verification_canceled')} {t('Organisms.DeviceVerification.close')} 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')}