diff --git a/server/src/l10n.js b/server/src/l10n.js index b357cdcca7..e6bd0fb496 100644 --- a/server/src/l10n.js +++ b/server/src/l10n.js @@ -46,19 +46,12 @@ exports.init = function(localeStringMap) { return initPromise; }; -exports.getText = function(locales, userAgent) { +exports.getText = function(locales) { const bundles = {}; const availableLocales = exports.getUserLocales(locales); - // This is a temporary fix for https://github.com/mozilla-services/screenshots/issues/4863 - // to be reverted in https://github.com/mozilla-services/screenshots/issues/4993 - let useIsolating = true; - if (userAgent && userAgent.includes("Win")) { - useIsolating = false; - } - availableLocales.forEach((locale) => { - bundles[locale] = getFluentBundle(locale, useIsolating); + bundles[locale] = getFluentBundle(locale); }); return function(l10nID, args) { @@ -99,9 +92,9 @@ function useLocaleData(localeStringMap) { return initPromise; } -function getFluentBundle(locale, useIsolating) { +function getFluentBundle(locale) { if (!fluentBundles[locale]) { - const bundle = new FluentBundle(locale, {useIsolating}); + const bundle = new FluentBundle(locale); bundle.addMessages(rawStrings[locale]); fluentBundles[locale] = bundle; } diff --git a/server/src/middleware/l10n.js b/server/src/middleware/l10n.js index ac8290690a..16797a8592 100644 --- a/server/src/middleware/l10n.js +++ b/server/src/middleware/l10n.js @@ -17,7 +17,7 @@ exports.getLanguages = function(req) { exports.l10n = function(req, res, next) { l10n.init().then(() => { const languages = exports.getLanguages(req); - req.getText = l10n.getText(languages, req.headers["user-agent"]); + req.getText = l10n.getText(languages); req.userLocales = l10n.getUserLocales(languages); req.messages = l10n.getStrings(languages); next(); diff --git a/server/src/reactruntime.js b/server/src/reactruntime.js index 7c1369134b..c3aaab65e0 100644 --- a/server/src/reactruntime.js +++ b/server/src/reactruntime.js @@ -8,15 +8,13 @@ require("fluent-intl-polyfill/compat"); const { FluentBundle } = require("fluent/compat"); const { LocalizationProvider } = require("fluent-react/compat"); const { getLocaleMessages } = require("./locale-messages"); -const bundles = []; function generateBundles(messages, locales) { + const bundles = []; for (const locale of locales) { - if (!messages[locale]) { - const bundle = new FluentBundle(locale); - bundle.addMessages(messages[locale]); - bundles.push(bundle); - } + const bundle = new FluentBundle(locale); + bundle.addMessages(messages[locale]); + bundles.push(bundle); } return bundles; }