src/third_party/mozjs/extract/intl/l10n/L10nRegistry.jsm
/**
 * Generates a single FluentBundle by loading all resources
 * from the listed sources for a given locale.
 *
 * The function casts all error cases into a Promise that resolves with
 * value `null`.
 * This allows the caller to be an async generator without using
 * try/catch clauses.
 *
 * Notice: Any changes to this method should be copied
 * to the `generateResourceSetSync` equivalent below.
 *
 * @param {String} locale
 * @param {Array} sourcesOrder
 * @param {Array} resourceIds
 * @returns {Promise<FluentBundle>}
 */
Generates a single FluentBundle by loading all resources
from the listed sources for a given locale.

The function casts all error cases into a Promise that resolves with
value `null`.
This allows the caller to be an async generator without using
try/catch clauses.

Any changes to this method should be copied
to the `generateResourceSetSync` equivalent below.

@param {String} locale
@param {Array} sourcesOrder
@param {Array} resourceIds
@returns {Promise}
Generates a single FluentBundle by loading all resources from the listed sources for a given locale . The function casts all error cases into a Promise that resolves with value ` null ` . This allows the caller to be an async generator without using try / catch clauses . Any changes to this method should be copied to the ` generateResourceSetSync ` equivalent below . @param { String } locale @param { Array } sourcesOrder @param { Array } resourceIds @returns { Promise }
function generateResourceSet(locale, sourcesOrder, resourceIds) {
  return Promise.all(resourceIds.map((resourceId, i) => {
    const source = L10nRegistry.sources.get(sourcesOrder[i]);
    if (!source) {
      return false;
    }
    return source.fetchFile(locale, resourceId);
  }));
}
function generateResourceSet ( locale , sourcesOrder , resourceIds ) { return Promise . all ( resourceIds . map ( ( resourceId , i ) => { const source = L10nRegistry . sources . get ( sourcesOrder [ i ] ) ; if ( ! source ) { return false ; } return source . fetchFile ( locale , resourceId ) ; } ) ) ; }
Generates a single FluentBundle by loading all resources
 from the listed sources for a given locale.
Generates a single FluentBundle by loading all resources from the listed sources for a given locale .