Skip to content

chore: [DHIS2-21969] Refine custom terminology label support - #4728

Open
henrikmv wants to merge 4 commits into
masterfrom
hv/chore/DHIS2-21969_refined-custom-terminology-support
Open

chore: [DHIS2-21969] Refine custom terminology label support#4728
henrikmv wants to merge 4 commits into
masterfrom
hv/chore/DHIS2-21969_refined-custom-terminology-support

Conversation

@henrikmv

@henrikmv henrikmv commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

DHIS2-21969

This PR replaces the multi-function custom terminology API (getProgramLabel, getStageLabel, useProgramLabel, useStageLabel, useTrackedEntityTypeLabel) with a unified two-function API:

// Non-hook (usable anywhere)
getTermLabel(key, { programId, stageId?, plural? })

// React hook (reads programId from Redux)
useTermLabel(key, { programId?, stageId?, plural? })

Additional changes:

  • withCustomLabels HOC — injects resolved terminology labels as props
  • i18n interpolator patch — auto-capitalizes leading custom-term variables and disables HTML escaping for them
  • Feature-gated plural fields — plural terminology fields are only requested from backend ≥ v43

@henrikmv
henrikmv marked this pull request as ready for review September 7, 2026 13:45
@henrikmv
henrikmv requested a review from a team as a code owner September 7, 2026 13:45
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

@henrikmv henrikmv added testing and removed testing labels Sep 8, 2026
@sonarqubecloud

sonarqubecloud Bot commented Sep 8, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant