[tbb-commits] [Git][tpo/applications/tor-browser][tor-browser-102.10.0esr-12.5-1] 2 commits: fixup! Bug 41417: Always prompt users to restart after changing language
Pier Angelo Vendrame (@pierov)
git at gitlab.torproject.org
Thu Apr 20 18:16:36 UTC 2023
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/337dcb9147c539fa040831914cb58d15a736e3a6...4ae8853092bda294b037881f1940b6bdaa7f41a3
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/337dcb9147c539fa040831914cb58d15a736e3a6...4ae8853092bda294b037881f1940b6bdaa7f41a3
You're receiving this email because of your account on gitlab.torproject.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20230420/0e914f2b/attachment-0001.htm>
More information about the tbb-commits
mailing list