fix(i18n): emit manifest strings from config in standalone extract#961
Merged
Conversation
The standalone `d2-app-scripts i18n extract` command produced a different `i18n/en.pot` than `build` and `start`, because it omitted the `__MANIFEST_APP_*` / `__MANIFEST_SHORTCUT_*` translation strings. All three paths call `extract()`, which only emitted those manifest strings inside an `if (isApp)` block. `build` and `start` passed `isApp`; `commands/i18n.js` did not, so the CLI command dropped them. Decide whether to emit the manifest strings from the parsed config instead of a caller-supplied flag: emit them when `config.entryPoints?.app` is present. This removes the now-redundant `isApp` argument from `extract` and its call sites, so all three paths emit the same strings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
kabaros
approved these changes
Jun 14, 2026
dhis2-bot
added a commit
that referenced
this pull request
Jun 15, 2026
## [12.11.3](v12.11.2...v12.11.3) (2026-06-15) ### Bug Fixes * **i18n:** emit manifest strings from config in standalone extract ([#961](#961)) ([5562b0f](5562b0f))
Contributor
|
🎉 This PR is included in version 12.11.3 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Problem
d2-app-scripts i18n extractproduced a differenti18n/en.potthanbuildandstart, because it dropped the__MANIFEST_APP_*/__MANIFEST_SHORTCUT_*strings.All three call
extract(), which only emitted those strings insideif (isApp).buildandstartpassedisApp; the standalonei18ncommand didn't.Fix
extract()now decides from the config it already parses — emitting the manifest strings whenconfig.entryPoints?.appis present — instead of a caller-supplied flag. The redundantisAppargument is removed fromextractand its call sites. All three paths now emit the same strings.Tests
Added
src/lib/i18n/extract.test.js: manifest strings are emitted iff the config has an app entry point.🤖 Generated with Claude Code
fixes https://dhis2.atlassian.net/browse/LIBS-828