From 0db8ee04110f18a9f0c030354a1ec6a909e79d4b Mon Sep 17 00:00:00 2001 From: alaa-yahia Date: Fri, 25 Oct 2024 01:24:45 +0300 Subject: [PATCH] fix: Add missing localization for 'Today' --- .../Stages/Stage/StageDetail/hooks/helpers.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageDetail/hooks/helpers.js b/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageDetail/hooks/helpers.js index aaa2781d78..9d7f31f63f 100644 --- a/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageDetail/hooks/helpers.js +++ b/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageDetail/hooks/helpers.js @@ -1,6 +1,7 @@ // @flow import React from 'react'; import moment from 'moment'; +import i18n from '@dhis2/d2-i18n'; import { statusTypes, translatedStatusTypes } from 'capture-core/events/statusTypes'; import { convertMomentToDateFormatString } from '../../../../../../utils/converters/date'; import { getSubValues } from '../../getEventDataWithSubValue'; @@ -30,7 +31,7 @@ const getEventStatus = (event: ApiEnrollmentEvent) => { } if (daysUntilDueDate === 0) { - return { status: statusTypes.SCHEDULE, options: 'today' }; + return { status: statusTypes.SCHEDULE, options: i18n.t('Today') }; } if (daysUntilDueDate < 14) {