diff --git a/src/Components/Common/Sidebar/Sidebar.tsx b/src/Components/Common/Sidebar/Sidebar.tsx index 4072d521f22..001d70a18de 100644 --- a/src/Components/Common/Sidebar/Sidebar.tsx +++ b/src/Components/Common/Sidebar/Sidebar.tsx @@ -14,6 +14,7 @@ import { TooltipProvider, TooltipTrigger, } from "@/Components/ui/tooltip"; +import { useTranslation } from "react-i18next"; export const SIDEBAR_SHRINK_PREFERENCE_KEY = "sidebarShrinkPreference"; @@ -38,19 +39,20 @@ const StatelessSidebar = ({ setShrinked, onItemClick, }: StatelessSidebarProps) => { + const { t } = useTranslation(); const NavItems: { text: string; to: string; icon: IconName; }[] = [ - { text: "Facilities", to: "/facility", icon: "l-hospital" }, - { text: "Patients", to: "/patients", icon: "l-user-injured" }, - { text: "Assets", to: "/assets", icon: "l-shopping-cart-alt" }, - { text: "Sample Test", to: "/sample", icon: "l-medkit" }, - { text: "Shifting", to: "/shifting", icon: "l-ambulance" }, - { text: "Resource", to: "/resource", icon: "l-heart-medical" }, - { text: "Users", to: "/users", icon: "l-users-alt" }, - { text: "Notice Board", to: "/notice_board", icon: "l-meeting-board" }, + { text: t("facilities"), to: "/facility", icon: "l-hospital" }, + { text: t("patients"), to: "/patients", icon: "l-user-injured" }, + { text: t("assets"), to: "/assets", icon: "l-shopping-cart-alt" }, + { text: t("sample_test"), to: "/sample", icon: "l-medkit" }, + { text: t("shifting"), to: "/shifting", icon: "l-ambulance" }, + { text: t("resource"), to: "/resource", icon: "l-heart-medical" }, + { text: t("users"), to: "/users", icon: "l-users-alt" }, + { text: t("notice_board"), to: "/notice_board", icon: "l-meeting-board" }, ]; const activeLink = useActiveLink(); @@ -223,27 +225,30 @@ interface ToggleShrinkProps { toggle: () => void; } -const ToggleShrink = ({ shrinked, toggle }: ToggleShrinkProps) => ( - - - - - - -

{shrinked ? "Expand Sidebar" : "Collapse Sidebar"}

-
-
-
-); +const ToggleShrink = ({ shrinked, toggle }: ToggleShrinkProps) => { + const { t } = useTranslation(); + return ( + + + + + + +

{shrinked ? t("expand_sidebar") : t("collapse_sidebar")}

+
+
+
+ ); +}; diff --git a/src/Components/Facility/HospitalList.tsx b/src/Components/Facility/HospitalList.tsx index e7949440307..aa9ddac9a31 100644 --- a/src/Components/Facility/HospitalList.tsx +++ b/src/Components/Facility/HospitalList.tsx @@ -145,7 +145,7 @@ export const HospitalList = () => { return ( { if (loading) return ; return ( - +
{notices}
); diff --git a/src/Components/Patient/ManagePatients.tsx b/src/Components/Patient/ManagePatients.tsx index 0be6fe6b819..c5cf85b36af 100644 --- a/src/Components/Patient/ManagePatients.tsx +++ b/src/Components/Patient/ManagePatients.tsx @@ -785,7 +785,7 @@ export const PatientManager = () => { return (