-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bridge: Drop translations from manifests.js, introduce m-i18n.js
Pages don't (shouldn't) care about manifest translations when including `manifests.js` -- they usually do that to query for a package's existence or some feature flags. Only the Shell cares about the translations. So drop translations from `manifests.js`, and support a new `manifests-i18n.js` which only the shell 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
- Loading branch information
1 parent
4e5920c
commit f48fea8
Showing
3 changed files
with
19 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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