Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support
?pseudolocalization=true|false
to enable/disable pseudoloca…
…lization; `?lang=` to force language (ansible#3225) * Support `?pseudolocalization=true|false` to enable/disable pseudolocalization Pseudlocalization (>>marking<< strings marked for translation, instead of actually translating them), is supported since ansible#810 by setting `localStorage.test_l10n = true` in the browser console and reloading the page. > Note: the current lingui implementation needs `npm run gettext:extract; npm run gettext:compile` for any new strings before they appear as marked. We should try to remove that limitation during the i18next switch. This PR makes it easier to enable/disable by setting a `?pseudolocalization=true/false` URL param, which gets used to set/unset `localStorage.test_l10n`. (Thus, after using `?pseudolocalization=true` once, you will see it until you explicitly set `?pseudolocalization=false`, even when visiting URLs without the param.) No-Issue (but really AAP-4750) * Allow ?lang=ja to override detected language, ?lang= to unset it Visiting the UI with `?pseudolocalization=true` sets `localStorage.test_l10n = true`, and `?pseudolocalization=false` does `delete localStorage.test_l10n`. Now, also `?lang=ja` sets `localStorage.override_l10n = 'ja'`, and `?lang=` does `delete localStorage.override_l10n`. This allows the user to override the language by adding an URL param, and the UI will remember the choice until unset. Also adding two `console.debug` messages when pseudolocalization or langugage override are enabled, with URLs to disable again. (cherry picked from commit 6ba2b97)
- Loading branch information