[stable-4.5] Support ?pseudolocalization=true|false
to enable/disable pseudolocalization; ?lang=
to force language (#3225)
#3244
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.
Manual backport of #3225
(conflict becase userLanguage is no longer exported)
?pseudolocalization=true|false
to enable/disable pseudolocalizationPseudlocalization (>>marking<< strings marked for translation, instead of actually translating them), is supported since #810 by setting
localStorage.test_l10n = true
in the browser console and reloading the page.This PR makes it easier to enable/disable by setting a
?pseudolocalization=true/false
URL param, which gets used to set/unsetlocalStorage.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)
Visiting the UI with
?pseudolocalization=true
setslocalStorage.test_l10n = true
, and?pseudolocalization=false
doesdelete localStorage.test_l10n
.Now, also
?lang=ja
setslocalStorage.override_l10n = 'ja'
, and?lang=
doesdelete 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.