Skip to content

Commit

Permalink
(fix): Wrap page header in t function
Browse files Browse the repository at this point in the history
  • Loading branch information
NethmiRodrigo committed Oct 29, 2024
1 parent 1d4b954 commit 5b1a247
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import React from 'react';
import { PageHeader, HomePictogram } from '@openmrs/esm-framework';
import { useTranslation } from 'react-i18next';
import styles from './page-header.scss';

interface PageHeaderProps {
dashboardTitle: string;
}

const HomePageHeader: React.FC<PageHeaderProps> = ({ dashboardTitle }) => {
return <PageHeader illustration={<HomePictogram />} title={dashboardTitle} className={styles.pageHeader} />;
const { t } = useTranslation();
return <PageHeader illustration={<HomePictogram />} title={t(dashboardTitle)} className={styles.pageHeader} />;
};

export default HomePageHeader;
3 changes: 2 additions & 1 deletion packages/esm-home-app/translations/am.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"home": "Home"
"home": "Home",
"Home": "Home"
}
3 changes: 2 additions & 1 deletion packages/esm-home-app/translations/ar.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"home": "الصفحة الرئيسية"
"home": "الصفحة الرئيسية",
"Home": "الصفحة الرئيسية"
}
3 changes: 2 additions & 1 deletion packages/esm-home-app/translations/es.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"home": "Inicio"
"home": "Inicio",
"Home": "Inicio"
}
3 changes: 2 additions & 1 deletion packages/esm-home-app/translations/fr.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"home": "Accueil"
"home": "Accueil",
"Home": "Accueil"
}
3 changes: 2 additions & 1 deletion packages/esm-home-app/translations/he.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"home": "בית"
"home": "בית",
"Home": "בית"
}
3 changes: 2 additions & 1 deletion packages/esm-home-app/translations/hi_IN.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"home": "Home"
"home": "Home",
"Home": "Home"
}
3 changes: 2 additions & 1 deletion packages/esm-home-app/translations/km.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"home": "ផ្ទះ"
"home": "ផ្ទះ",
"Home": "ផ្ទះ"
}
3 changes: 2 additions & 1 deletion packages/esm-home-app/translations/qu.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"home": "Home"
"home": "Home",
"Home": "Home"
}
3 changes: 2 additions & 1 deletion packages/esm-home-app/translations/zh.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"home": "首页"
"home": "首页",
"Home": "首页"
}
3 changes: 2 additions & 1 deletion packages/esm-home-app/translations/zh_CN.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"home": "首页"
"home": "首页",
"Home": "首页"
}

0 comments on commit 5b1a247

Please sign in to comment.