From 17d6fa34486b3a1ac88960c7e911c045d4645500 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Thu, 29 Sep 2022 17:42:47 -0500 Subject: [Apps:Mail] Re-run and disable original Thunderbird locales via the profile ui migration in prep for support of community-contributed language packs when Ascendant fully lands. Language Pack policy will have to be established so once we take advantage of the fact that we have easy en-US generation without the former MozNonsense so we can support community-supplied locales or our own. Though I am not entirely optimistic of the long term sustainability of language packs without either a team to produce them or users with true dedication to their contributed locale. But we shall see! --- apps/mail/modules/mailMigrator.js | 40 ++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/apps/mail/modules/mailMigrator.js b/apps/mail/modules/mailMigrator.js index 151735221..ee42756d6 100644 --- a/apps/mail/modules/mailMigrator.js +++ b/apps/mail/modules/mailMigrator.js @@ -378,25 +378,6 @@ var MailMigrator = { } } - // Interlink doesn't support langpacks so we need to reset the UI lang pref - if (currentUIVersion < 16) { - Services.prefs.clearUserPref("general.useragent.locale"); - - var disableLangPacks16 = function() { - Cu.import("resource://gre/modules/AddonManager.jsm"); - - function disableAddons(aAddons) { - for each(let addon in aAddons) { - addon.userDisabled = true; - } - } - - AddonManager.getAddonsByTypes(['locale'], disableAddons); - } - - disableLangPacks16(); - } - // UXP Milestone NOT-29 changed the prefs regarding HWA so in true comm style // steal the UI migration code from the defacto browser and proofread it for // god damned fucking typos that kill the everything @@ -418,6 +399,27 @@ var MailMigrator = { Services.prefs.clearUserPref("media.hardware-video-decoding.failed"); } + // Interlink doesn't support the original Thunderbird locales (the strings don't match + // so the result would be entity errors all over the place. Luckily this is a runonce + // that won't impact the future. + if (currentUIVersion < 20) { + Services.prefs.clearUserPref("general.useragent.locale"); + + var disableLocales20 = function() { + Cu.import("resource://gre/modules/AddonManager.jsm"); + + function disableAddons(aAddons) { + for each(let addon in aAddons) { + addon.userDisabled = true; + } + } + + AddonManager.getAddonsByTypes(['locale'], disableAddons); + } + + disableLocales20(); + } + // Update the migration version. Services.prefs.setIntPref(UI_VERSION_PREF, UI_VERSION); -- cgit v1.2.3