... |
... |
@@ -1196,17 +1196,18 @@ var gMainPane = { |
1196
|
1196
|
gMainPane.recordBrowserLanguagesTelemetry("reorder");
|
1197
|
1197
|
|
1198
|
1198
|
switch (gMainPane.getLanguageSwitchTransitionType(newLocales)) {
|
1199
|
|
- // tor-browser#41417: Always prompt for the restart, until we switch to
|
1200
|
|
- // Fluent, since the current way we use to update languages does not allow
|
1201
|
|
- // live-reload. We could also call showConfirmLanguageChangeMessageBar in
|
1202
|
|
- // the official live-reload case, but the result is inconsistent and makes
|
1203
|
|
- // handling the locales-match case harder.
|
1204
|
1199
|
case "requires-restart":
|
1205
|
|
- case "live-reload":
|
1206
|
1200
|
// Prepare to change the locales, as they were different.
|
1207
|
1201
|
gMainPane.showConfirmLanguageChangeMessageBar(newLocales);
|
1208
|
1202
|
gMainPane.updatePrimaryBrowserLanguageUI(newLocales[0]);
|
1209
|
1203
|
break;
|
|
1204
|
+ case "live-reload":
|
|
1205
|
+ Services.locale.requestedLocales = newLocales;
|
|
1206
|
+ gMainPane.updatePrimaryBrowserLanguageUI(
|
|
1207
|
+ Services.locale.appLocaleAsBCP47
|
|
1208
|
+ );
|
|
1209
|
+ gMainPane.hideConfirmLanguageChangeMessageBar();
|
|
1210
|
+ break;
|
1210
|
1211
|
case "locales-match":
|
1211
|
1212
|
// They matched, so we can reset the UI.
|
1212
|
1213
|
gMainPane.updatePrimaryBrowserLanguageUI(
|
... |
... |
@@ -1459,12 +1460,18 @@ var gMainPane = { |
1459
|
1460
|
}
|
1460
|
1461
|
|
1461
|
1462
|
switch (gMainPane.getLanguageSwitchTransitionType(selected)) {
|
1462
|
|
- // tor-browser#41417: see onPrimaryBrowserLanguageMenuChange
|
1463
|
1463
|
case "requires-restart":
|
1464
|
|
- case "live-reload":
|
1465
|
1464
|
gMainPane.showConfirmLanguageChangeMessageBar(selected);
|
1466
|
1465
|
gMainPane.updatePrimaryBrowserLanguageUI(selected[0]);
|
1467
|
1466
|
break;
|
|
1467
|
+ case "live-reload":
|
|
1468
|
+ Services.locale.requestedLocales = selected;
|
|
1469
|
+
|
|
1470
|
+ gMainPane.updatePrimaryBrowserLanguageUI(
|
|
1471
|
+ Services.locale.appLocaleAsBCP47
|
|
1472
|
+ );
|
|
1473
|
+ gMainPane.hideConfirmLanguageChangeMessageBar();
|
|
1474
|
+ break;
|
1468
|
1475
|
case "locales-match":
|
1469
|
1476
|
// They matched, so we can reset the UI.
|
1470
|
1477
|
gMainPane.updatePrimaryBrowserLanguageUI(
|