Upgrade Lingui from v5 to v6#377
Closed
blaipr wants to merge 1 commit into
Closed
Conversation
- Replace .linguirc with lingui.config.js: v6 removed string-based format config, so the po format now comes from the @lingui/format-po formatter. - Remove i18n.loadLocaleData() calls (API removed in v6; plural rules come from Intl.PluralRules since v4) from i18nLoader, enzymeHelpers and tests. - Drop the make-plural dependency — its only consumer was loadLocaleData. - Add a webpack rule relaxing fully-specified ESM resolution for node_modules: @lingui v6 packages are ESM-only and import 'react/jsx-runtime' without an extension, which react 17 (no exports map) cannot satisfy under strict resolution. - Re-extract and recompile locale catalogs with the v6 toolchain. Existing translations are preserved (es: 1896 -> 1898 filled msgstr); a handful of msgids are re-keyed because v6 names placeholders after the source variable instead of positionally ({0} -> {virtualEnvironment}).
This was referenced Jun 11, 2026
Contributor
Author
|
Superseded by #391, which combines this PR with the other two package-lock-regenerating toolchain upgrades (#377/#378/#387). The three were mutually conflicting on the lockfile (npm inserts their entries at the same alphabetical positions), so combining them is what makes the whole queue mergeable in any order. Content and verification are unchanged — see #391. |
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.
📋 Suggested merge order for all 15 open PRs
Same list on every PR. Hard requirement: #381 before #382/#383/#384. Per-PR rebase/conflict notes are below the list.
.po/.pot/messages.jsfile, so whichever merges second will conflict across ~16 catalog files. Don't hand-merge those — resolve by re-runningnpm run extract-strings && npm run compile-stringson the rebased branch.testUtils/enzymeHelpers.jsthat this PR also edits (it deletes the make-plural/loadLocaleData lines), and react-router migration batch 1: shared components, contexts and hooks #382 edits the top ofInstanceList.test.jswhere this PR removes an import. Both are trivial keep-both-changes resolutions.package-lock.json; whichever of those merges after another needs a trivialnpm installregen.SUMMARY
Migrates the UI i18n toolchain to Lingui 6 (latest):
.linguirc→lingui.config.js— v6 removed string-based format config; the po format now comes from the@lingui/format-poformatter (new devDependency).i18n.loadLocaleData()removed fromi18nLoader.js,testUtils/enzymeHelpers.jsand 15 test files — the API was removed in v6 (plural rules come fromIntl.PluralRulessince v4, so these calls were no-ops). Themake-pluraldependency is dropped: those calls were its only consumer (itslicenses/uifile is removed accordingly).resolve.fullySpecified: falsefor node_modules JS): @lingui v6 packages are ESM-only and importreact/jsx-runtimewithout an extension, which React 17 (no package exports map) cannot satisfy under webpack's strict ESM resolution..po/.potdiffs are large because extract re-sorts the whole catalog (normal); the actual content change is small. Existing translations are preserved (e.g.es: 1,896 → 1,898 filledmsgstr). A handful of msgids are re-keyed because v6 names placeholders after the source variable instead of positionally ({0}→{virtualEnvironment}) — those entries will need re-translation, consistent with the recent "will need to translate later" string updates.Independent of #374 and #376 — UI-only, no file overlap, mergeable in any order.
ISSUE TYPE
COMPONENT NAME
ASCENDER VERSION
ADDITIONAL INFORMATION
All UI gates run against exactly this branch state (unmodified main + only this change):
The full i18n workflow was exercised end to end under v6: extract-strings → compile-strings → lint → test → build.