src/third_party/mozjs/extract/intl/l10n/L10nRegistry.jsm
/**
   * This is a synchronous version of the `generateBundles`
   * method and should stay completely in sync with it at all
   * times except of the async/await changes.
   *
   * Notice: This method should be avoided at all costs
   * You can think of it similarly to a synchronous XMLHttpRequest.
   *
   * @param {Array} requestedLangs
   * @param {Array} resourceIds
   * @returns {Iterator<FluentBundle>}
   */
This is a synchronous version of the `generateBundles`
method and should stay completely in sync with it at all
times except of the async/await changes.

This method should be avoided at all costs
You can think of it similarly to a synchronous XMLHttpRequest.

@param {Array} requestedLangs
@param {Array} resourceIds
@returns {Iterator}
This is a synchronous version of the ` generateBundles ` method and should stay completely in sync with it at all times except of the async / await changes . This method should be avoided at all costs You can think of it similarly to a synchronous XMLHttpRequest . @param { Array } requestedLangs @param { Array } resourceIds @returns { Iterator }
* generateBundlesSync(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 (const dataSets of generateResourceSetsForLocaleSync(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;
      }
    }
  }
* generateBundlesSync ( 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 ( const dataSets of generateResourceSetsForLocaleSync ( 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 ; } } }
This is a synchronous version of the `generateBundles`
 method and should stay completely in sync with it at all
 times except of the async/await changes.
This is a synchronous version of the ` generateBundles ` method and should stay completely in sync with it at all times except of the async / await changes .