From 73a1c521d5c4050c35777e9601ca69cfdc2dd99d Mon Sep 17 00:00:00 2001 From: Kshitij <160704796+kshitij-ka@users.noreply.github.com> Date: Fri, 27 Jun 2025 00:00:33 +0530 Subject: [PATCH] Performed translation for some components in ./src - Footer.jsx - Sidebar.jsx Also, added key:value pairs (English + French for now) for all the text in src/locales. Need to perform translation for FileList.jsx & FileUploadModal.jsx. Will do once backend is accessible again. --- Frontend/src/components/Footer.jsx | 41 +++++++++++++++-------------- Frontend/src/components/Sidebar.jsx | 18 +++++++------ Frontend/src/locales/en.json | 31 +++++++++++++++++++++- Frontend/src/locales/fr.json | 31 +++++++++++++++++++++- 4 files changed, 91 insertions(+), 30 deletions(-) diff --git a/Frontend/src/components/Footer.jsx b/Frontend/src/components/Footer.jsx index 528c0c5..82a7ae0 100644 --- a/Frontend/src/components/Footer.jsx +++ b/Frontend/src/components/Footer.jsx @@ -8,15 +8,17 @@ import { Phone, MapPin, } from "lucide-react"; +import { useTranslation } from "react-i18next"; // for multilinguality const Footer = () => { + const { t } = useTranslation(); // for multilinguality const [email, setEmail] = useState(""); //Currently storing user email in localstorage const handleSubscribe = () => { if (email.trim() !== "") { localStorage.setItem("subscribedEmail", email); - alert("You have successfully subscribed!"); + alert(t("subscribe_success")); setEmail(""); } }; @@ -42,10 +44,10 @@ const Footer = () => { /> -
- Your secure cloud storage solution for all your digital needs. + {t("footer_tagline")}
- Get exclusive tips, updates on new features, and special offers - directly in your inbox. + {t("footer_newsletter_desc")}
© {new Date().getFullYear()} Skycrate. All rights reserved.
+© {new Date().getFullYear()} {t("footer_brand")}. {t("footer_rights")}
@@ -109,7 +111,7 @@ const Sidebar = () => {
className="w-full text-left px-4 py-2 text-lg text-white hover:bg-[#37A0EA]"
role="menuitem"
>
- Log out
+ {t("sidebar_logout")}
@@ -139,7 +141,7 @@ const Sidebar = () => {
>