Skip to content

Commit 0085104

Browse files
committed
LIME2-915 Add clinical view translations
1 parent 767579d commit 0085104

9 files changed

Lines changed: 24 additions & 16 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"packages/*"
88
],
99
"scripts": {
10-
"start": "openmrs develop --sources 'packages/esm-*-app/' --backend http://lime-mosul-dev.madiro.org",
10+
"start": "openmrs develop --sources 'packages/esm-*-app/' --backend http://lime-mosul-uat.madiro.org",
1111
"ci:publish": "yarn workspaces foreach --all --topological --exclude @madiro/openmrs-esm-lime npm publish --access public --tag latest",
1212
"ci:prepublish": "yarn workspaces foreach --all --topological --exclude @madiro/openmrs-esm-lime npm publish --access public --tag next",
1313
"release": "yarn workspaces foreach --all --topological version",

packages/esm-mental-health-app/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function startupApp() {
2222
registerExpressionHelper('getLatestOpenmrsObs', getLatestOpenmrsObs);
2323
}
2424

25-
// t('mentalHealth', 'Mental Health')
25+
// t('Mental Health')
2626
export const patientMentalHealthSummaryDashboardLink = getSyncLifecycle(
2727
createPatientChartDashboardLink({ ...patientChartDashboardMeta, moduleName }),
2828
options,

packages/esm-mental-health-app/src/mental-health/mental-health-summary.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface MentalHealthSummaryProps {
88

99
const MentalHealthSummary: React.FC<MentalHealthSummaryProps> = ({ patientUuid }) => {
1010
const { t } = useTranslation();
11-
const MentalHealthText = t('mentalHealth', 'Mental Health');
11+
const MentalHealthText = t('Mental Health');
1212

1313
return <EmptyState displayText={MentalHealthText} />;
1414
};
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"action": "الإجراء",
3-
"actions": "الإجراءات"
3+
"actions": "الإجراءات",
4+
"Mental Health": "الصحة النفسية"
45
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"emptyStateText": "There are no <1>{{displayText}}</1> to display",
3-
"mentalHealth": "Mental Health"
3+
"Mental Health": "Mental Health"
44
}

packages/esm-nutrition-app/src/empty-state/empty-state.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const EmptyState: React.FC<EmptyStateProps> = ({ displayText, launchForm
2929
<p className={styles.action}>
3030
{launchForm && (
3131
<Button onClick={() => launchForm()} kind="ghost" size={isTablet ? 'lg' : 'sm'}>
32-
{t('record', 'Record')} {displayText.toLowerCase()}
32+
{t('Record')} {displayText.toLowerCase()}
3333
</Button>
3434
)}
3535
</p>

packages/esm-nutrition-app/src/nutrition/nutrition-summary.component.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ interface NutritionSummaryProps {
3232

3333
const NutritionSummary: React.FC<NutritionSummaryProps> = ({ patientUuid }) => {
3434
const { t } = useTranslation();
35-
const nutritionSummaryText = t('nutritionSummary', 'Nutrition Summary');
35+
const nutritionSummaryText = t('Nutrition Summary', 'Nutrition Summary');
3636
const layout = useLayoutType();
3737
const isTablet = layout === 'tablet';
3838
const isDesktop = desktopLayout(layout);
@@ -54,7 +54,7 @@ const NutritionSummary: React.FC<NutritionSummaryProps> = ({ patientUuid }) => {
5454
...[
5555
{
5656
key: 'encounterDate',
57-
header: t('date', 'Date'),
57+
header: t('Date'),
5858
},
5959
],
6060
...(nutritionData ?? []).map((encounter: Encounter) => ({
@@ -79,13 +79,13 @@ const NutritionSummary: React.FC<NutritionSummaryProps> = ({ patientUuid }) => {
7979
const tableRows = useMemo(() => {
8080
return mealAmountConcepts.map((mealAmountConcept, index) => {
8181
let mealNumber = (index % 10) + 1;
82-
const row = { id: mealAmountConcept, encounterDate: `Meal ${mealNumber}` };
82+
const row = { id: mealAmountConcept, encounterDate: `${t('Meal')} ${mealNumber}` };
8383
nutritionData?.forEach((encounter) => {
8484
row[encounter.uuid] = getRowData(encounter, mealAmountConcept, index);
8585
});
8686
return row;
8787
});
88-
}, [nutritionData]);
88+
}, [nutritionData, t]);
8989

9090
if (isLoading) return <DataTableSkeleton role="progressbar" compact={isDesktop} zebra />;
9191
if (error) return <ErrorState error={error} headerTitle={nutritionSummaryText} />;
@@ -103,7 +103,7 @@ const NutritionSummary: React.FC<NutritionSummaryProps> = ({ patientUuid }) => {
103103
iconDescription="Add Nutrition Feeding"
104104
onClick={launchNutritionForm}
105105
>
106-
{t('add', 'Add')}
106+
{t('Add')}
107107
</Button>
108108
)}
109109
</CardHeader>
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
{
2+
"Add": "إضافة",
23
"action": "الإجراء",
3-
"actions": "الإجراءات"
4+
"actions": "الإجراءات",
5+
"Date": "التاريخ",
6+
"Meal": "الوجبة",
7+
"Nutrition": "التغذية",
8+
"Nutrition Summary": "ملخص التغذية",
9+
"Record": "تسجيل"
410
}
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
2-
"add": "Add",
3-
"date": "Date",
2+
"Add": "Add",
3+
"Date": "Date",
44
"emptyStateText": "There are no <1>{{displayText}}</1> to display",
5+
"Meal": "Meal",
56
"Nutrition": "Nutrition",
6-
"nutritionSummary": "Nutrition Summary",
7-
"record": "Record"
7+
"Nutrition Summary": "Nutrition Summary",
8+
"Record": "record"
89
}

0 commit comments

Comments
 (0)