Skip to content
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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: 2026-08-07T13:57:55.501Z\n"
"PO-Revision-Date: 2026-08-07T13:57:55.501Z\n"
"POT-Creation-Date: 2026-08-07T14:02:01.671Z\n"
"PO-Revision-Date: 2026-08-07T14:02:01.671Z\n"

msgid "The application could not be loaded."
msgstr "The application could not be loaded."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const baseFields = [
];

const pluralFields = [
'displayEnrollmentsLabel,displayProgramStagesLabel,displayEventsLabel',
'displayEnrollmentsLabel,displayRelationshipsLabel,displayNotesLabel,' +
'displayTrackedEntityAttributesLabel,displayProgramStagesLabel,displayEventsLabel',
];

export const useProgram = (programId: string) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@ export const CUSTOM_LABEL_FIELDS = {
},
note: {
singular: { field: 'displayNoteLabel', english: 'note' },
plural: { field: 'displayNotesLabel', english: 'notes' },
},
relationship: {
singular: { field: 'displayRelationshipLabel', english: 'relationship' },
plural: { field: 'displayRelationshipsLabel', english: 'relationships' },
},
attribute: {
singular: { field: 'displayTrackedEntityAttributeLabel', english: 'attribute' },
plural: { field: 'displayTrackedEntityAttributesLabel', english: 'attributes' },
},
programStage: {
singular: { field: 'displayProgramStageLabel', english: 'program stage' },
Expand Down Expand Up @@ -73,6 +76,5 @@ export const resolveCustomLabel = (
const term: CustomLabelField = CUSTOM_LABEL_FIELDS[key];
const list = Array.isArray(sources) ? sources : [sources];
const form = plural && term.plural ? term.plural : term.singular;
if (!form) return undefined;
return list.find(source => source?.[form.field])?.[form.field];
};
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ const baseProgramFields = [

const pluralProgramFields = [
'displayEnrollmentsLabel',
'displayRelationshipsLabel',
'displayNotesLabel',
'displayTrackedEntityAttributesLabel',
'displayProgramStagesLabel',
'displayEventsLabel',
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,11 @@ type apiProgram = {
displayFollowUpLabel?: string | null,
displayOrgUnitLabel?: string | null,
displayRelationshipLabel?: string | null,
displayRelationshipsLabel?: string | null,
displayNoteLabel?: string | null,
displayNotesLabel?: string | null,
displayTrackedEntityAttributeLabel?: string | null,
displayTrackedEntityAttributesLabel?: string | null,
displayProgramStageLabel?: string | null,
displayProgramStagesLabel?: string | null,
displayEventLabel?: string | null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,11 @@ export type CachedProgram = {
displayFollowUpLabel?: string | null,
displayOrgUnitLabel?: string | null,
displayRelationshipLabel?: string | null,
displayRelationshipsLabel?: string | null,
displayNoteLabel?: string | null,
displayNotesLabel?: string | null,
displayTrackedEntityAttributeLabel?: string | null,
displayTrackedEntityAttributesLabel?: string | null,
displayProgramStageLabel?: string | null,
displayProgramStagesLabel?: string | null,
displayEventLabel?: string | null,
Expand Down
Loading