bridge: Drop translations from manifests.js, introduce m-i18n.js #21516
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.
Pages don't (shouldn't) care about manifest translations when including
manifests.js
-- they usually do that to query for a package'sexistence or some feature flags.
Only the Shell cares about the translations. So drop translations from
manifests.js
, and support a newmanifests-i18n.js
which only theshell uses.
This isolates translations from different pages from another.
Concretely, subscription-manager-cockpit and our systemd page both
translate "$0 important hit" differently, and even to different data
types (in s-m it results in an array, in systemd in a normal string).
This caused a page crash, and also wrong strings, as s-m's translations
are really not expected to be used on the Overview page.
This also speeds up the loading of frames, as they now don't have to go
through umpteen
cockpit.locale()
calls any more.Note that this still leaves i18n conflicts in the shell itself, so this
isn't a full fix, just an "80%" mitigation.
Fixes #21486