Pier Angelo Vendrame pushed to branch tor-browser-102.10.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits: 7cf4e447 by Pier Angelo Vendrame at 2023-04-20T20:16:02+02:00 fixup! Bug 41417: Always prompt users to restart after changing language
Bug 41738: Drop the patch to disable live reload
Revert "Bug 41417: Always prompt users to restart after changing language"
This reverts commit bad85a459ea24b34f3c09924c6d2b9f0bc750d88.
- - - - - 4ae88530 by Pier Angelo Vendrame at 2023-04-20T20:16:02+02:00 fixup! Firefox preference overrides.
Bug 41738: Drop the patch to disable live reload and use the pref
- - - - -
2 changed files:
- browser/app/profile/001-base-profile.js - browser/components/preferences/main.js
Changes:
===================================== browser/app/profile/001-base-profile.js ===================================== @@ -499,6 +499,10 @@ pref("browser.urlbar.suggest.topsites", false); // is only reported via telemetry (which is disabled). See tor-browser#40048. pref("corroborator.enabled", false);
+// tor-browser#41417: do not allow live reload until we switch to Fluent and +// stop using .textContent. +pref("intl.multilingual.liveReload", false); + // Onboarding. pref("browser.onboarding.tourset-version", 5); pref("browser.onboarding.newtour", "welcome,privacy,tor-network-9.0,circuit-display,security,expect-differences,onion-services,learn-more");
===================================== browser/components/preferences/main.js ===================================== @@ -1196,17 +1196,18 @@ var gMainPane = { gMainPane.recordBrowserLanguagesTelemetry("reorder");
switch (gMainPane.getLanguageSwitchTransitionType(newLocales)) { - // tor-browser#41417: Always prompt for the restart, until we switch to - // Fluent, since the current way we use to update languages does not allow - // live-reload. We could also call showConfirmLanguageChangeMessageBar in - // the official live-reload case, but the result is inconsistent and makes - // handling the locales-match case harder. case "requires-restart": - case "live-reload": // Prepare to change the locales, as they were different. gMainPane.showConfirmLanguageChangeMessageBar(newLocales); gMainPane.updatePrimaryBrowserLanguageUI(newLocales[0]); break; + case "live-reload": + Services.locale.requestedLocales = newLocales; + gMainPane.updatePrimaryBrowserLanguageUI( + Services.locale.appLocaleAsBCP47 + ); + gMainPane.hideConfirmLanguageChangeMessageBar(); + break; case "locales-match": // They matched, so we can reset the UI. gMainPane.updatePrimaryBrowserLanguageUI( @@ -1459,12 +1460,18 @@ var gMainPane = { }
switch (gMainPane.getLanguageSwitchTransitionType(selected)) { - // tor-browser#41417: see onPrimaryBrowserLanguageMenuChange case "requires-restart": - case "live-reload": gMainPane.showConfirmLanguageChangeMessageBar(selected); gMainPane.updatePrimaryBrowserLanguageUI(selected[0]); break; + case "live-reload": + Services.locale.requestedLocales = selected; + + gMainPane.updatePrimaryBrowserLanguageUI( + Services.locale.appLocaleAsBCP47 + ); + gMainPane.hideConfirmLanguageChangeMessageBar(); + break; case "locales-match": // They matched, so we can reset the UI. gMainPane.updatePrimaryBrowserLanguageUI(
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/337dcb9...