Create a LocaleTestingUtils.jsm with utilities for testing live language switching
Categories
(Core :: Internationalization, task, P2)
Tracking
()
People
(Reporter: gregtatum, Assigned: gregtatum)
References
Details
Attachments
(1 obsolete file)
Testing the features for live language switching has been pretty tough. It would be much better to have testing utils to make this easy. I've started working on these locally, but haven't been able to get them done in time for Firefox 100. This bug is for tracking following up with these utilities.
Assignee | ||
Comment 1•3 years ago
|
||
This would do something like:
const { LocaleTestUtils } = ChromeUtils.import(
"resource://testing-common/LocaleTestUtils.jsm"
);
const langpack = LocaleTestUtils.createLangpack({
locale: "es-ES",
files: [
{
path: `browser/chrome/features/formautofill@mozilla.org/es-ES/locale/es-ES/formautofill.properties`,
contents: `autofillHeader=Bueno`,
},
],
});
Services.locale.requestedLocales = ["es-ES"]
Assignee | ||
Comment 2•3 years ago
|
||
I'm doing this in Bug 1764802.
Assignee | ||
Comment 3•3 years ago
|
||
Assignee | ||
Comment 4•3 years ago
|
||
I moved the patch over here to land it before Bug 1764802.
Comment 6•3 years ago
|
||
Backed out changeset 015c2c72a2a2 (Bug 1761835) for causing failures in browser_stringBundleInvalidation.js CLOSED TREE
Log: https://treeherder.mozilla.org/logviewer?job_id=375234749&repo=autoland&lineNumber=9257
Backout: https://hg.mozilla.org/integration/autoland/rev/cecd1565c462f9ca637a38dfbc0b2d6fc86236a5
Assignee | ||
Comment 7•3 years ago
|
||
This may still be worth completing, but I realized that you can reliably test locale changes with pseudo-locales if you remove the pref observers and always trigger intl:app-locale-changed
.
Assignee | ||
Comment 9•2 years ago
|
||
I'm going to close this since I'm not going to get to addressing the review feedback, and intl:app-locale-changed
should be good enough.
Updated•2 years ago
|
Description
•