From 7a003c1d873aaffb2b1c38d6f30c5f80eeefe72f Mon Sep 17 00:00:00 2001 From: mamadoudicko Date: Thu, 26 Oct 2023 14:33:09 +0200 Subject: [PATCH] feat: update translations --- .../MagicLinkLogin/hooks/useMagicLinkLogin.ts | 5 ----- .../login/components/MagicLinkLogin/index.tsx | 21 ++++++++++++++----- frontend/public/locales/en/login.json | 6 +++++- frontend/public/locales/es/login.json | 19 +++++++++++------ frontend/public/locales/fr/login.json | 19 +++++++++++------ frontend/public/locales/pt-br/login.json | 19 +++++++++++------ frontend/public/locales/ru/login.json | 19 +++++++++++------ frontend/public/locales/zh-cn/login.json | 19 +++++++++++------ 8 files changed, 86 insertions(+), 41 deletions(-) diff --git a/frontend/app/(auth)/login/components/MagicLinkLogin/hooks/useMagicLinkLogin.ts b/frontend/app/(auth)/login/components/MagicLinkLogin/hooks/useMagicLinkLogin.ts index 7a1db3666aa2..73b3f69edb5b 100644 --- a/frontend/app/(auth)/login/components/MagicLinkLogin/hooks/useMagicLinkLogin.ts +++ b/frontend/app/(auth)/login/components/MagicLinkLogin/hooks/useMagicLinkLogin.ts @@ -50,11 +50,6 @@ export const useMagicLinkLogin = () => { throw error; // this error is caught by react-hook-form } - publish({ - variant: "success", - text: "Magic link sent successfully if email recognized", - }); - setValue("email", ""); }); diff --git a/frontend/app/(auth)/login/components/MagicLinkLogin/index.tsx b/frontend/app/(auth)/login/components/MagicLinkLogin/index.tsx index 855525527729..316f5595e9d5 100644 --- a/frontend/app/(auth)/login/components/MagicLinkLogin/index.tsx +++ b/frontend/app/(auth)/login/components/MagicLinkLogin/index.tsx @@ -20,13 +20,24 @@ export const MagicLinkLogin = (): JSX.Element => { if (isSubmitSuccessful) { return ( - <> -

{t("check_your_email", { ns: "login" })}

+

- {t("cant_find", { ns: "login" })}{" "} - + {t("check_your_email.part1", { ns: "login" })}{" "} + + {t("check_your_email.magic_link", { ns: "login" })} + {" "} + {t("check_your_email.part2", { ns: "login" })}

- +
+ {t("cant_find", { ns: "login" })}{" "} + void reset()} + > + {t("try_again")} + +
+
); } diff --git a/frontend/public/locales/en/login.json b/frontend/public/locales/en/login.json index 4d14a49acf0d..172a9c5204a9 100644 --- a/frontend/public/locales/en/login.json +++ b/frontend/public/locales/en/login.json @@ -7,5 +7,9 @@ "email":"Email address", "cant_find":"Can't find it ?", "try_again":"Try again", - "check_your_email":"We just sent you a Magic link, check your emails and follow the steps." + "check_your_email":{ + "part1":"We just sent you a ", + "magic_link":"Magic link", + "part2":", check your emails and follow the steps." + } } \ No newline at end of file diff --git a/frontend/public/locales/es/login.json b/frontend/public/locales/es/login.json index 6ae97fc8730f..6dbd3a6e9e06 100644 --- a/frontend/public/locales/es/login.json +++ b/frontend/public/locales/es/login.json @@ -1,8 +1,15 @@ { -"googleLogin": "Continuar con Google", -"magicLink": "Continuar con correo electrónico", -"errorMailMissed": "Por favor, ingrese su dirección de correo electrónico", -"talk_to": "Hablar con", -"restriction_message": "Los usuarios no pagos tienen acceso a una demostración gratuita y limitada de Quivr", -"email":"Dirección de correo electrónico" + "googleLogin": "Continuar con Google", + "magicLink": "Continuar con correo electrónico", + "errorMailMissed": "Por favor, ingrese su dirección de correo electrónico", + "talk_to": "Hablar con", + "restriction_message": "Los usuarios no pagos tienen acceso a una demostración gratuita y limitada de Quivr", + "email":"Dirección de correo electrónico", + "cant_find":"¿No lo encuentras?", + "try_again":"Inténtalo de nuevo", + "check_your_email": { + "part1":"Acabamos de enviarte un ", + "magic_link":"enlace mágico", + "part2":". Revisa tus correos electrónicos y sigue los pasos." + } } \ No newline at end of file diff --git a/frontend/public/locales/fr/login.json b/frontend/public/locales/fr/login.json index f7c95fc76932..2044f377b709 100644 --- a/frontend/public/locales/fr/login.json +++ b/frontend/public/locales/fr/login.json @@ -1,8 +1,15 @@ { -"googleLogin": "Continuer avec Google", -"magicLink": "Continuer avec e-mail", -"errorMailMissed": "Veuillez saisir votre adresse e-mail", -"talk_to": "Parler à", -"restriction_message": "Les utilisateurs non payants ont accès à une démonstration gratuite et limitée de Quivr", -"email":"Adresse e-mail" + "googleLogin": "Continuer avec Google", + "magicLink": "Continuer avec e-mail", + "errorMailMissed": "Veuillez saisir votre adresse e-mail", + "talk_to": "Parler à", + "restriction_message": "Les utilisateurs non payants ont accès à une démonstration gratuite et limitée de Quivr", + "email":"Adresse e-mail", + "cant_find":"Vous ne le trouvez pas ?", + "try_again":"Réessayez", + "check_your_email": { + "part1":"Nous venons de vous envoyer un ", + "magic_link":"lien magique", + "part2":". Vérifiez vos e-mails et suivez les étapes." + } } \ No newline at end of file diff --git a/frontend/public/locales/pt-br/login.json b/frontend/public/locales/pt-br/login.json index 2a52441833bb..57b7b49f86b1 100644 --- a/frontend/public/locales/pt-br/login.json +++ b/frontend/public/locales/pt-br/login.json @@ -1,8 +1,15 @@ { -"googleLogin": "Continuar com o Google", -"magicLink": "Continuar com o e-mail", -"errorMailMissed": "Por favor, insira seu endereço de e-mail", -"talk_to": "Converse com", -"restriction_message": "Usuários não pagos têm acesso a uma demonstração gratuita e limitada do Quivr", -"email":"Email address" + "googleLogin": "Continuar com o Google", + "magicLink": "Continuar com o e-mail", + "errorMailMissed": "Por favor, insira seu endereço de e-mail", + "talk_to": "Converse com", + "restriction_message": "Usuários não pagos têm acesso a uma demonstração gratuita e limitada do Quivr", + "email":"Email address", + "cant_find":"Não consegue encontrar?", + "try_again":"Tente novamente", + "check_your_email":{ + "part1":"Acabamos de enviar um ", + "magic_link":"link mágico", + "part2":" para você, verifique seus emails e siga as instruções." + } } \ No newline at end of file diff --git a/frontend/public/locales/ru/login.json b/frontend/public/locales/ru/login.json index 4e6e5d02e74a..67664f6d690b 100644 --- a/frontend/public/locales/ru/login.json +++ b/frontend/public/locales/ru/login.json @@ -1,8 +1,15 @@ { -"googleLogin": "Продолжить с Google", -"magicLink": "Продолжить с электронной почтой", -"errorMailMissed": "Пожалуйста, введите ваш адрес электронной почты", -"talk_to": "Общение с", -"restriction_message": "Неоплаченным пользователям доступен бесплатный и ограниченный демонстрационный доступ к Quivr", -"email":"Адрес электронной почты" + "googleLogin": "Продолжить с Google", + "magicLink": "Продолжить с электронной почтой", + "errorMailMissed": "Пожалуйста, введите ваш адрес электронной почты", + "talk_to": "Общение с", + "restriction_message": "Неоплаченным пользователям доступен бесплатный и ограниченный демонстрационный доступ к Quivr", + "email":"Адрес электронной почты", + "cant_find":"Не можете найти?", + "try_again":"Попробуйте еще раз", + "check_your_email": { + "part1":"Мы только что отправили вам ", + "magic_link":"волшебную ссылку", + "part2":". Проверьте свою электронную почту и следуйте инструкциям." + } } \ No newline at end of file diff --git a/frontend/public/locales/zh-cn/login.json b/frontend/public/locales/zh-cn/login.json index 8c7a2678f2dd..16b8d2573b82 100644 --- a/frontend/public/locales/zh-cn/login.json +++ b/frontend/public/locales/zh-cn/login.json @@ -1,8 +1,15 @@ { -"googleLogin": "使用Google继续", -"magicLink": "使用电子邮件继续", -"errorMailMissed": "请输入您的电子邮件地址", -"talk_to": "与之交谈", -"restriction_message": "未付费用户可以访问 Quivr 的免费和有限演示", -"email":"电子邮件地址" + "googleLogin": "使用Google继续", + "magicLink": "使用电子邮件继续", + "errorMailMissed": "请输入您的电子邮件地址", + "talk_to": "与之交谈", + "restriction_message": "未付费用户可以访问 Quivr 的免费和有限演示", + "email":"电子邮件地址", + "cant_find":"找不到吗?", + "try_again":"再试一次", + "check_your_email": { + "part1":"我们刚刚发送了一个", + "magic_link":"魔法链接", + "part2":",请查看您的电子邮件并按照步骤进行操作。" + } } \ No newline at end of file