Skip to content

feat: support for v44 custom labels and translations (DHIS2-21717) - #1874

Draft
janhenrikoverland wants to merge 4 commits into
masterfrom
feat/ptrp-labels-translations
Draft

janhenrikoverland wants to merge 4 commits into
masterfrom
feat/ptrp-labels-translations

Conversation

@janhenrikoverland

@janhenrikoverland janhenrikoverland commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Implements DHIS2-21717

Description

Version toggling for this featre has become so complex that I decided to split things into versioned files. The idea is that when a version goes out of support we can just delete the file instead of trying to remove 42 specific behaviour from a file where all versions are mixed up.

Quick overview:

42: The server has no API for enabled period types, so all period types and relative periods come from the hardcoded client lists.

43: Fetches the enabled period types from /configuration/dataOutputPeriodTypes and filters the client lists against them. Each period type has a single label, and the client builds the relative period names from it ("This {label}", "Last {label}" etc). Works, but not ideal, as it will look non-native in most other languages than English.

44: The server returns the enabled period types with their relative periods nested, and each has a displayName that's already translated for the user's locale. The client no longer builds any names. It only maps server period types to client ids so it can generate the fixed periods. The weekly and financial year relative periods are taken from the variant set in the system settings.


TODO

  • Tests added
  • PRs for all affected apps created
  • Storybook added

Screenshots

supporting text

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 New issue
1 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant