Skip to content

feat: load custom translations from data store#953

Merged
KaiVandivier merged 5 commits intomasterfrom
beta
Mar 17, 2026
Merged

feat: load custom translations from data store#953
KaiVandivier merged 5 commits intomasterfrom
beta

Conversation

@KaiVandivier
Copy link
Copy Markdown
Contributor

No description provided.

KaiVandivier and others added 2 commits March 2, 2026 21:48
* feat: add urlSlug (d2config.name) to app config

* feat: check datastore for custom translations

* refactor: update DHIS2 locale parsing comments

* refactor: move custom translations to new file

* fix: use data engine for better control flow

* fix: check custom translations setting (wip), await datastore result

* refactor: double underscore for format

* fix: check system settings before fetching translations

* refactor: use debug instead of log

* refactor: sonarqube recommendations

* fix: version check and tests
# [12.11.0-beta.1](v12.10.4...v12.11.0-beta.1) (2026-03-02)

### Features

* load custom translations from datastore ([#950](#950)) ([6053917](6053917))
@KaiVandivier KaiVandivier requested a review from kabaros March 10, 2026 12:47
Comment thread adapter/src/utils/useLocale.js Outdated
Comment thread adapter/src/utils/useLocale.js
Comment thread adapter/src/utils/customTranslations.js
Comment thread adapter/src/utils/customTranslations.js
[engine, appUrlSlug]
)

return getCustomTranslations
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might be too late to cater for this - but generally I think we're jumping over a lot of hoops to avoid having a backend change. If the backend does the check for controller and server a flag with the app (which should be easy) then this whole logic can be simplified a lot imo.

We're anyhow only supporting v43+, and we will have to backport the setting anyhow so we might as well backport such a change, to avoid shifting the complexity to the FE.

Copy link
Copy Markdown
Contributor Author

@KaiVandivier KaiVandivier Mar 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be worth migrating to a more robust solution as you said at some point -- do you think it'd be possible before v43?

And if not... do you think it's feasible to do this now, then improve upon it later?

(Might be worth having a call to think it through)

Comment thread cli/src/lib/i18n/templates/locales.hbs
Comment thread adapter/src/utils/customTranslations.js Outdated
KaiVandivier and others added 3 commits March 16, 2026 18:47
# [12.11.0-beta.2](v12.11.0-beta.1...v12.11.0-beta.2) (2026-03-17)

### Bug Fixes

* separate error messages for fetching and loading translations ([4fb3703](4fb3703))
* use right console method, refactor custom translations hook ([0edc993](0edc993))
@sonarqubecloud
Copy link
Copy Markdown

@KaiVandivier KaiVandivier enabled auto-merge (squash) March 17, 2026 08:43
@KaiVandivier KaiVandivier disabled auto-merge March 17, 2026 08:43
@KaiVandivier KaiVandivier enabled auto-merge (squash) March 17, 2026 08:43
@KaiVandivier KaiVandivier merged commit af406ab into master Mar 17, 2026
12 checks passed
@KaiVandivier KaiVandivier deleted the beta branch March 17, 2026 08:58
dhis2-bot added a commit that referenced this pull request Mar 17, 2026
# [12.11.0](v12.10.4...v12.11.0) (2026-03-17)

### Features

* load custom translations from data store ([#953](#953)) ([af406ab](af406ab)), closes [#950](#950) [#950](#950)
* rerun ci pipeline ([2f1f81e](2f1f81e))
@dhis2-bot
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 12.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

3 participants