diff --git a/Frontend/src/locales/en.json b/Frontend/src/locales/en.json index 17ac53f..c75b99a 100644 --- a/Frontend/src/locales/en.json +++ b/Frontend/src/locales/en.json @@ -17,6 +17,24 @@ "login_signup": "Signup", "main_login_heading": "Welcome to the Login Portal", + "signup_register_heading": "Register Your account", + "signup_welcome": "Welcome to Crop Compass.", + "signup_subtitle": "Please register your new account.", + "signup_first_name_label": "First Name", + "signup_first_name_placeholder": "John", + "signup_last_name_label": "Last Name", + "signup_last_name_placeholder": "Doe", + "signup_email_label": "Email", + "signup_email_placeholder": "user@mail.com", + "signup_password_label": "Password", + "signup_password_placeholder": "At least 6 unique Characters.. ", + "signup_remember_me": "Remember Me", + "signup_register_button": "Register your Account", + "signup_already_have_account": "Already have an Account?", + "signup_login": "Login", + "signup_journey_heading": "Start your Journey", + "signup_with": "with", + "hero_one_stop_solution": "One stop solution for every farmer's need.", "hero_plant_alt": "plant", diff --git a/Frontend/src/locales/fr.json b/Frontend/src/locales/fr.json index ad1db2b..b789943 100644 --- a/Frontend/src/locales/fr.json +++ b/Frontend/src/locales/fr.json @@ -17,6 +17,24 @@ "login_signup": "S'inscrire", "main_login_heading": "Bienvenue sur le portail de connexion", + "signup_register_heading": "Enregistrez votre compte", + "signup_welcome": "Bienvenue sur Crop Compass.", + "signup_subtitle": "Veuillez enregistrer votre nouveau compte.", + "signup_first_name_label": "Prénom", + "signup_first_name_placeholder": "Jean", + "signup_last_name_label": "Nom", + "signup_last_name_placeholder": "Dupont", + "signup_email_label": "E-mail", + "signup_email_placeholder": "utilisateur@mail.com", + "signup_password_label": "Mot de passe", + "signup_password_placeholder": "Au moins 6 caractères uniques.. ", + "signup_remember_me": "Se souvenir de moi", + "signup_register_button": "Enregistrer votre compte", + "signup_already_have_account": "Vous avez déjà un compte ?", + "signup_login": "Connexion", + "signup_journey_heading": "Commencez votre aventure", + "signup_with": "avec", + "hero_one_stop_solution": "Une solution unique pour tous les besoins des agriculteurs.", "hero_plant_alt": "plante", diff --git a/Frontend/src/pages/Login/SignupPage.jsx b/Frontend/src/pages/Login/SignupPage.jsx index f2cd7d1..ee38806 100644 --- a/Frontend/src/pages/Login/SignupPage.jsx +++ b/Frontend/src/pages/Login/SignupPage.jsx @@ -1,8 +1,14 @@ import React, { useRef } from "react"; import { Link, useNavigate } from "react-router-dom"; import { BACKEND_URL } from "../../constants"; +import { t } from "../../service/translation"; +import { useOutletContext } from "react-router-dom"; + +const SignupPage = (props) => { + const outletContext = useOutletContext?.(); + const language = + (outletContext && outletContext.language) || props.language || "en"; -const SignupPage = () => { const firstNameElement = useRef(); const lastNameElement = useRef(); const emailElement = useRef(); @@ -46,57 +52,45 @@ const SignupPage = () => { return (
- {/*
-
- -

- Welcome to Crop Compass -

-
-
*/}

- Register Your account + {t("signup_register_heading", language)}

-

Welcome to Crop Compass.

+

{t("signup_welcome", language)}

- Please register your new account. + {t("signup_subtitle", language)}

@@ -104,17 +98,17 @@ const SignupPage = () => {
@@ -123,14 +117,14 @@ const SignupPage = () => { htmlFor="password" className="block mb-2 text-sm font-medium text-gray-900 dark:text-white" > - Password + {t("signup_password_label", language)}
@@ -146,29 +140,22 @@ const SignupPage = () => { htmlFor="remember_me" className="ml-2 text-sm font-medium text-gray-900 dark:text-gray-300" > - Remember Me + {t("signup_remember_me", language)}
-
-
+

- Already have an Account ?{" "} - - Login + {t("signup_already_have_account", language)}{" "} + + {t("signup_login", language)}

@@ -176,26 +163,15 @@ const SignupPage = () => {
-

- Start your Journey +

+ {t("signup_journey_heading", language)} +
+ {t("signup_with", language)}
- with
Crop Compass

- {/*
-
- -

- Welcome to MentorFlux! -

-
-
*/}
);