Skip to content

fix: extract manifest translation strings on start command#958

Merged
KaiVandivier merged 1 commit into
masterfrom
fix/i18n-extract-strings-start-cmd
May 19, 2026
Merged

fix: extract manifest translation strings on start command#958
KaiVandivier merged 1 commit into
masterfrom
fix/i18n-extract-strings-start-cmd

Conversation

@d-rita

@d-rita d-rita commented May 18, 2026

Copy link
Copy Markdown
Contributor

Fixes LIBS-828


Description
Previously, the start command would extract and generate all the translatable strings without the app title, description and shortcuts. This PR adds the isApp flag just as is done in the build command during i18n extraction of strings. This pulls the app title, description and shortcuts from dhis2.config.js and adds them to the translatable strings.

@sonarqubecloud

Copy link
Copy Markdown

@d-rita
d-rita requested a review from a team May 18, 2026 12:02

@KaiVandivier KaiVandivier left a comment

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.

Awesome! 🙌

@KaiVandivier
KaiVandivier merged commit 0d7ac89 into master May 19, 2026
18 checks passed
@KaiVandivier
KaiVandivier deleted the fix/i18n-extract-strings-start-cmd branch May 19, 2026 10:07
dhis2-bot added a commit that referenced this pull request May 19, 2026
## [12.11.1](v12.11.0...v12.11.1) (2026-05-19)

### Bug Fixes

* **i18n:** extract manifest translation strings on start command ([#958](#958)) ([0d7ac89](0d7ac89))
@dhis2-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 12.11.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

eirikhaugstulen added a commit to dhis2-chap/chap-frontend that referenced this pull request Jun 11, 2026
…endency graphs (#212)

## Why

Two related dev-workflow fixes:

1. `en.pot` files were churning on every `pnpm start` / `pnpm build`.
Part of the cause: in cli-app-scripts 12.11.0, `build` injects the
`__MANIFEST_APP_TITLE` / `__MANIFEST_APP_DESCRIPTION` strings into the
pot (via `isApp`), but `start` does not — so alternating `start`/`build`
flip-flops those entries on every run. Fixed upstream in
[v12.11.1](https://github.com/dhis2/app-platform/releases/tag/v12.11.1)
(dhis2/app-platform#958).
2. The root `start` script excluded the uncertainty dashboard plugin by
name (`--filter=!...`), an exclusion list that would grow with every new
plugin — and the plugin's own start script didn't bring up the
`core`/`ui` watch builds it depends on.

## What

- Bump `@dhis2/cli-app-scripts` 12.11.0 → 12.11.1 everywhere it is
pinned (root, both apps, `packages/core`, `packages/ui`) and update the
lockfile.
- Commit the regenerated `apps/modeling-app/i18n/en.pot` with the
manifest strings 12.11.1 now extracts on `start`, so the pot is stable
from here on.
- `pnpm start` now uses turbo's dependency-aware filter
`--filter=@dhis2-chap/modeling-app...` — it starts the modeling app plus
everything it depends on (`core`, `ui`) and nothing else. New plugins
are excluded automatically because they aren't in the modeling app's
dependency graph.
- `pnpm start:uncertainty-dashboard-plugin` gets the same `...` suffix,
so it now also starts the `core`/`ui` watch builds on its own.
- The plugin's dev server is pinned to port `3001`, so both stacks can
run side by side without fighting over port 3000.

Verified with `turbo --dry=json`:
- `start` → `@dhis2-chap/modeling-app`, `@dhis2-chap/core`,
`@dhis2-chap/ui`
- `start:uncertainty-dashboard-plugin` →
`@dhis2-chap/uncertainty-dashboard-plugin`, `@dhis2-chap/core`,
`@dhis2-chap/ui`

## Notes

- Timestamp-only pot rewrites (`POT-Creation-Date` / `PO-Revision-Date`)
still happen: the extractor's skip-guard compares msgids with an
order-sensitive check, but the freshly scanned keys (source discovery
order) never match the sorted order written to the pot. That is a
separate upstream bug in dhis2/app-platform.
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