The L10nRegistry solver builds bundles atomically per (locale, metasource): so every required resource must be satisfiable from sources in that metasource for that locale, or _no bundle is produced_. The "app" metasource's non-newtab sources (toolkit, browser) are packaged en-US only, so with a non-English langpack the (locale, "app") bundle can never be built — and the train-hop newtab XPI's locale-specific strings are unreachable, falling through to en-US. That is why train-hop-only widget strings (added to the XPI but not yet present in any langpack) were rendering in the wrong language. We make AboutNewTabResourceMapping also register a shadow newtab L10nFileSource into each active langpack's metasource, enumerated via Langpack.activeLangpackIds and kept in sync with webextension-langpack-startup/-shutdown observer notifications). Within the (locale, langpack) bundle, the solver now yields two valid orderings: one with the langpack's older newtab.ftl, one with the XPI's. Fluent falls through the former on missing keys and resolves train-hop-only strings from the latter, while strings the langpack already translates continue to come from the langpack. Differential Revision: https://phabricator.services.mozilla.com/D306857
45 lines
1.4 KiB
TOML
45 lines
1.4 KiB
TOML
[DEFAULT]
|
|
run-if = [
|
|
"os != 'android'",
|
|
]
|
|
firefox-appdir = "browser"
|
|
head = "../../../../extensions/newtab/test/xpcshell/head.js"
|
|
prefs = [
|
|
"browser.newtabpage.resource-mapping.log=true",
|
|
"browser.startup.homepage.abouthome_cache.testing=true",
|
|
]
|
|
support-files = [
|
|
"component-registrants/TestRegistrant1.sys.mjs",
|
|
"component-registrants/TestRegistrant2.sys.mjs",
|
|
"component-registrants/TestRegistrantDuplicateTypes.sys.mjs",
|
|
"component-registrants/TestRegistrantInvalidConfigs.sys.mjs",
|
|
"component-registrants/NotARegistrant.sys.mjs",
|
|
]
|
|
|
|
["test_AboutHomeStartupCacheChild.js"]
|
|
|
|
["test_AboutNewTab.js"]
|
|
|
|
["test_AboutNewTabComponentRegistry.js"]
|
|
|
|
["test_AboutNewTabRedirector.js"]
|
|
|
|
["test_AboutNewTabResourceMapping_emergencyFallback.js"]
|
|
|
|
["test_AboutNewTabResourceMapping_langpackShadow.js"]
|
|
|
|
["test_disableNewTabAsAddon_pref.js"]
|
|
prefs = ["browser.newtabpage.disableNewTabAsAddon=true"]
|
|
|
|
["test_nimbus_newtabTrainhopAddon.js"]
|
|
head = "../../../../extensions/newtab/test/xpcshell/head.js head_nimbus_trainhop.js"
|
|
skip-if = [
|
|
"os == 'linux' && os_version == '24.04' && arch == 'x86_64' && display == 'x11' && tsan", # Bug 1989373
|
|
]
|
|
|
|
["test_nimbus_newtabTrainhopAddon_firstStartup.js"]
|
|
head = "../../../../extensions/newtab/test/xpcshell/head.js head_nimbus_trainhop.js"
|
|
|
|
["test_nimbus_newtabTrainhopAddon_onBrowserReady.js"]
|
|
head = "../../../../extensions/newtab/test/xpcshell/head.js head_nimbus_trainhop.js"
|