diff --git a/i18n/en.pot b/i18n/en.pot index 370523a4b2..8759c0bc68 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2024-10-25T18:18:11.518Z\n" -"PO-Revision-Date: 2024-10-25T18:18:11.518Z\n" +"POT-Creation-Date: 2024-11-07T11:57:59.094Z\n" +"PO-Revision-Date: 2024-11-07T11:57:59.094Z\n" msgid "Choose one or more dates..." msgstr "Choose one or more dates..." @@ -1532,6 +1532,12 @@ msgstr "Change" msgid "Value" msgstr "Value" +msgid "File" +msgstr "File" + +msgid "Image" +msgstr "Image" + msgid "New {{trackedEntityTypeName}} relationship" msgstr "New {{trackedEntityTypeName}} relationship" diff --git a/src/core_modules/capture-core/components/WidgetProfile/OverflowMenu/OverflowMenu.types.js b/src/core_modules/capture-core/components/WidgetProfile/OverflowMenu/OverflowMenu.types.js index cfa6a518a3..84ea57e86a 100644 --- a/src/core_modules/capture-core/components/WidgetProfile/OverflowMenu/OverflowMenu.types.js +++ b/src/core_modules/capture-core/components/WidgetProfile/OverflowMenu/OverflowMenu.types.js @@ -5,7 +5,6 @@ export type Props = {| trackedEntityTypeName: string, trackedEntityData: Object, canWriteData: boolean, - trackedEntityData: Object, onDeleteSuccess?: () => void, displayChangelog: boolean, teiId: string, diff --git a/src/core_modules/capture-core/components/WidgetsChangelog/common/utils/getSubValueForChangelogData.js b/src/core_modules/capture-core/components/WidgetsChangelog/common/utils/getSubValueForChangelogData.js index ebf739818b..85b13724e2 100644 --- a/src/core_modules/capture-core/components/WidgetsChangelog/common/utils/getSubValueForChangelogData.js +++ b/src/core_modules/capture-core/components/WidgetsChangelog/common/utils/getSubValueForChangelogData.js @@ -1,5 +1,6 @@ // @flow import log from 'loglevel'; +import i18n from '@dhis2/d2-i18n'; import { errorCreator } from 'capture-core-utils'; import { dataElementTypes } from '../../../../metaData'; import type { QuerySingleResource } from '../../../../utils/api'; @@ -35,12 +36,12 @@ const buildTEAUrlByElementType: {| const { teiId, value } = trackedEntity; if (!value) return null; try { - const { id, displayName: name } = await querySingleResource({ resource: `fileResources/${value}` }); - if (!latestValue) { - return 'File'; + return i18n.t('File'); } + const { id, displayName: name } = await querySingleResource({ resource: `fileResources/${value}` }); + return { id, name, @@ -64,11 +65,10 @@ const buildTEAUrlByElementType: {| const { teiId, value } = trackedEntity; if (!value) return null; try { - const { id, displayName: name } = await querySingleResource({ resource: `fileResources/${value}` }); - if (!latestValue) { - return 'Image'; + return i18n.t('Image'); } + const { id, displayName: name } = await querySingleResource({ resource: `fileResources/${value}` }); return { id, @@ -93,12 +93,12 @@ const buildDataElementUrlByElementType: {| if (!value) return null; try { - const { id, displayName: name } = await querySingleResource({ resource: `fileResources/${value}` }); - if (!latestValue) { - return 'File'; + return i18n.t('File'); } + const { id, displayName: name } = await querySingleResource({ resource: `fileResources/${value}` }); + return { id, name, @@ -116,12 +116,12 @@ const buildDataElementUrlByElementType: {| if (!value) return null; try { - const { id, displayName: name } = await querySingleResource({ resource: `fileResources/${value}` }); - if (!latestValue) { - return 'Image'; + return i18n.t('Image'); } + const { id, displayName: name } = await querySingleResource({ resource: `fileResources/${value}` }); + return { id, name,