From 83bb34e50537d3bb3260fcc10ff5c684720bbba0 Mon Sep 17 00:00:00 2001 From: Christopher Drosos Date: Thu, 18 Sep 2025 16:57:34 +0300 Subject: [PATCH] Update Intro.js added translatable error messages --- src/routes/Intro/Intro.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/routes/Intro/Intro.js b/src/routes/Intro/Intro.js index 48acadcd4..811c4859c 100644 --- a/src/routes/Intro/Intro.js +++ b/src/routes/Intro/Intro.js @@ -138,11 +138,11 @@ const Intro = ({ queryParams }) => { }, []); const loginWithEmail = React.useCallback(() => { if (typeof state.email !== 'string' || state.email.length === 0 || !emailRef.current.validity.valid) { - dispatch({ type: 'error', error: 'Invalid email' }); + dispatch({ type: 'error', error: t('INVALID_EMAIL') }); return; } if (typeof state.password !== 'string' || state.password.length === 0) { - dispatch({ type: 'error', error: 'Invalid password' }); + dispatch({ type: 'error', error: t('INVALID_PASSWORD') }); return; } openLoaderModal(); @@ -160,26 +160,26 @@ const Intro = ({ queryParams }) => { }, [state.email, state.password]); const loginAsGuest = React.useCallback(() => { if (!state.termsAccepted) { - dispatch({ type: 'error', error: 'You must accept the Terms of Service' }); + dispatch({ type: 'error', error: t('MUST_ACCEPT_TERMS') }); return; } window.location = '#/'; }, [state.termsAccepted]); const signup = React.useCallback(() => { if (typeof state.email !== 'string' || state.email.length === 0 || !emailRef.current.validity.valid) { - dispatch({ type: 'error', error: 'Invalid email' }); + dispatch({ type: 'error', error: t('INVALID_EMAIL') }); return; } if (typeof state.password !== 'string' || state.password.length === 0) { - dispatch({ type: 'error', error: 'Invalid password' }); + dispatch({ type: 'error', error: t('INVALID_PASSWORD') }); return; } if (state.password !== state.confirmPassword) { - dispatch({ type: 'error', error: 'Passwords do not match' }); + dispatch({ type: 'error', error: t('PASSWORDS_NOMATCH') }); return; } if (!state.termsAccepted) { - dispatch({ type: 'error', error: 'You must accept the Terms of Service' }); + dispatch({ type: 'error', error: t('MUST_ACCEPT_TERMS') }); return; } if (!state.privacyPolicyAccepted) {