src/third_party/mozjs/extract/intl/l10n/L10nRegistry.jsm
/**
   * Based on the list of requested languages and resource Ids,
   * this function returns an lazy iterator over message context permutations.
   *
   * Notice: Any changes to this method should be copied
   * to the `generateBundlesSync` equivalent below.
   *
   * @param {Array} requestedLangs
   * @param {Array} resourceIds
   * @returns {AsyncIterator<FluentBundle>}
   */
Based on the list of requested languages and resource Ids,
this function returns an lazy iterator over message context permutations.

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

@param {Array} requestedLangs
@param {Array} resourceIds
@returns {AsyncIterator}
Based on the list of requested languages and resource Ids this function returns an lazy iterator over message context permutations . Any changes to this method should be copied to the ` generateBundlesSync ` equivalent below . @param { Array } requestedLangs @param { Array } resourceIds @returns { AsyncIterator }
async* generateBundles(requestedLangs, resourceIds) {
    const resourceIdsDedup = Array.from(new Set(resourceIds));
    const sourcesOrder = Array.from(this.sources.keys()).reverse();
    const pseudoStrategy = Services.prefs.getStringPref("intl.l10n.pseudo", "");
    for (const locale of requestedLangs) {
      for await (const dataSets of generateResourceSetsForLocale(locale, sourcesOrder, resourceIdsDedup)) {
        const bundle = new FluentBundle(locale, {
          ...MSG_CONTEXT_OPTIONS,
          pseudoStrategy,
        });
        for (const data of dataSets) {
          if (data === null) {
            return;
          }
          bundle.addResource(data);
        }
        yield bundle;
      }
    }
  }
async * generateBundles ( requestedLangs , resourceIds ) { const resourceIdsDedup = Array . from ( new Set ( resourceIds ) ) ; const sourcesOrder = Array . from ( this . sources . keys ( ) ) . reverse ( ) ; const pseudoStrategy = Services . prefs . getStringPref ( "intl.l10n.pseudo" , "" ) ; for ( const locale of requestedLangs ) { for await ( const dataSets of generateResourceSetsForLocale ( locale , sourcesOrder , resourceIdsDedup ) ) { const bundle = new FluentBundle ( locale , { ... MSG_CONTEXT_OPTIONS , pseudoStrategy , } ) ; for ( const data of dataSets ) { if ( data === null ) { return ; } bundle . addResource ( data ) ; } yield bundle ; } } }
Based on the list of requested languages and resource Ids,
 this function returns an lazy iterator over message context permutations.
Based on the list of requested languages and resource Ids this function returns an lazy iterator over message context permutations .