From 4dcbd4500a16f58a1915ac00c4fa0799ea993079 Mon Sep 17 00:00:00 2001 From: Nethmi Rodrigo Date: Sun, 27 Oct 2024 20:28:53 +0530 Subject: [PATCH] (fix): Wrap dashboard title in t function --- .../welcome-section/ohri-welcome-section.component.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/esm-commons-lib/src/components/ohri-home/welcome-section/ohri-welcome-section.component.tsx b/packages/esm-commons-lib/src/components/ohri-home/welcome-section/ohri-welcome-section.component.tsx index e35339dd6..afaab5ba4 100644 --- a/packages/esm-commons-lib/src/components/ohri-home/welcome-section/ohri-welcome-section.component.tsx +++ b/packages/esm-commons-lib/src/components/ohri-home/welcome-section/ohri-welcome-section.component.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { Calendar } from '@carbon/react/icons'; import { useSession } from '@openmrs/esm-framework'; +import { useTranslation } from 'react-i18next'; import styles from './ohri-welcome-section.scss'; @@ -11,13 +12,14 @@ interface OHRIWelcomeSectionProps { export const OHRIWelcomeSection: React.FC = ({ title, icon }) => { const userSession = useSession(); + const { t } = useTranslation(); return (
{icon}
{userSession?.sessionLocation.display}
-
{title}
+
{t(title)}
{new Date().toLocaleDateString() + ''}