diff --git a/Frontend/src/locales/en.json b/Frontend/src/locales/en.json index b9f49f6..17ac53f 100644 --- a/Frontend/src/locales/en.json +++ b/Frontend/src/locales/en.json @@ -67,8 +67,16 @@ "hero_card3_read_more": "Read more", "hero_card4_image_alt": "product image", "hero_card5_title": "Noteworthy technology acquisitions 2021", - "hero_card5_body": "Here are the biggest enterprise technology acquisitions of 2021 so far, in reverse chronological order." - + "hero_card5_body": "Here are the biggest enterprise technology acquisitions of 2021 so far, in reverse chronological order.", + "testimonial_heading": "WHY CHOOSE US?", + "testimonial_typewriter": "Unparalleled management for crops & farms.", + "testimonial_card1_title": "Excellent Dashboards", + "testimonial_card1_body": "Our descriptive dashboards give insights into your crop's health and keep track of your burning expenses.", + "testimonial_card2_title": "Crop Disease Prediction", + "testimonial_card2_body": "Predict the possible crop diseases based on their shown symptoms.", + "testimonial_card3_title": "Crop Planner", + "testimonial_card3_body": "Based on previous season's crop and used fertilizers and pesticides, plan what crops would best suit the present state of your soil.", + "testimonial_check_out": "Check Out" } diff --git a/Frontend/src/locales/fr.json b/Frontend/src/locales/fr.json index 27548b2..ad1db2b 100644 --- a/Frontend/src/locales/fr.json +++ b/Frontend/src/locales/fr.json @@ -67,8 +67,16 @@ "hero_card3_read_more": "Lire la suite", "hero_card4_image_alt": "image du produit", "hero_card5_title": "Acquisitions technologiques remarquables 2021", - "hero_card5_body": "Voici les plus grandes acquisitions technologiques d'entreprise de 2021 à ce jour, par ordre chronologique inverse." - + "hero_card5_body": "Voici les plus grandes acquisitions technologiques d'entreprise de 2021 à ce jour, par ordre chronologique inverse.", + "testimonial_heading": "POURQUOI NOUS CHOISIR ?", + "testimonial_typewriter": "Gestion inégalée pour les cultures et les fermes.", + "testimonial_card1_title": "Tableaux de bord excellents", + "testimonial_card1_body": "Nos tableaux de bord descriptifs donnent un aperçu de la santé de vos cultures et suivent vos dépenses importantes.", + "testimonial_card2_title": "Prédiction des maladies des cultures", + "testimonial_card2_body": "Prédisez les maladies possibles des cultures en fonction des symptômes observés.", + "testimonial_card3_title": "Planificateur de cultures", + "testimonial_card3_body": "En fonction des cultures de la saison précédente et des engrais et pesticides utilisés, planifiez les cultures qui conviendraient le mieux à l’état actuel de votre sol.", + "testimonial_check_out": "Voir" } diff --git a/Frontend/src/pages/Home/Testimonial.jsx b/Frontend/src/pages/Home/Testimonial.jsx index aa317d0..ec81378 100644 --- a/Frontend/src/pages/Home/Testimonial.jsx +++ b/Frontend/src/pages/Home/Testimonial.jsx @@ -6,6 +6,8 @@ import { motion } from "framer-motion"; import { useInView } from "react-intersection-observer"; import TypeWriterEffect from "react-typewriter-effect"; import cards from "./Cards"; +import { t } from "../../service/translation"; +import { useOutletContext } from "react-router-dom"; const ScrollReveal = ({ children, direction = "left" }) => { const { ref, inView } = useInView({ triggerOnce: true, threshold: 0.5 }); @@ -29,17 +31,22 @@ const ScrollReveal = ({ children, direction = "left" }) => { ); }; -const Testimonial = () => { +const Testimonial = (props) => { + // Get language from context or props, default to 'en' + const outletContext = useOutletContext?.(); + const language = + (outletContext && outletContext.language) || props.language || "en"; + const myRef = document.querySelector(".scrollable-div"); return ( <> -
+
-
+

- WHY CHOOSE US? + {t("testimonial_heading", language)}

@@ -50,35 +57,30 @@ const Testimonial = () => { scrollArea={myRef} startDelay={100} cursorColor="white" - text="⠀Unparalled management for crops & farms." + text={t("testimonial_typewriter", language)} typeSpeed={100} />
-
+
- dashboard + dashboard
- Excellent Dashboards + {t("testimonial_card1_title", language)}

- Our descriptive dashboards give insights into your crop's - health and keeps track of your burning expenses. + {t("testimonial_card1_body", language)}

- Check Out + {t("testimonial_check_out", language)} @@ -103,19 +105,17 @@ const Testimonial = () => {
- {" "} - Crop Disease Prediction{" "} + {t("testimonial_card2_title", language)}

- Predict the possible crop diseases based on their shown - symptoms. + {t("testimonial_card2_body", language)}

- Check Out + {t("testimonial_check_out", language)} @@ -140,19 +140,17 @@ const Testimonial = () => {
- Crop Planner + {t("testimonial_card3_title", language)}

- Based on previous season's crop and used pertilizers and - pesticides, plan what crops would best suit the present state - of your soil. + {t("testimonial_card3_body", language)}

- Check Out + {t("testimonial_check_out", language)}