Bug 1648631: Part 4 - Update docs to reflect L10nRegistry interface change; r=zbraniecki

Differential Revision: https://phabricator.services.mozilla.com/D81392
This commit is contained in:
Aaron Klotz 2020-06-26 21:04:44 +00:00
parent 5338289548
commit 4fe8e48486

View File

@ -451,6 +451,12 @@ process.
To check the mode the process is operating in, the :js:`LocaleService::IsServer` method is available.
Note that :js:`L10nRegistry.registerSources`, :js:`L10nRegistry.updateSources`, and
:js:`L10nRegistry.removeSources` each trigger an IPC synchronization between the parent
process and any extant content processes, which is expensive. If you need to change the
registration of multiple sources, the best way to do so is to coalesce multiple requests
into a single array and then call the method once.
Mozilla Exceptions
==================
@ -514,7 +520,7 @@ It may look like this:
"resource://mock-addon/localization/ar/test.ftl": "key = Value in Arabic"
};
L10nRegistry.registerSource(fs);
L10nRegistry.registerSources([fs]);
let availableLocales = Services.locale.availableLocales;