src/third_party/mozjs/extract/intl/l10n/L10nRegistry.jsm
/**
   * Adds new resource source(s) to the L10nRegistry.
   *
   * Notice: Each invocation of this method flushes any changes out to extant
   * content processes, which is expensive. Please coalesce multiple
   * registrations into a single sources array and then call this method once.
   *
   * @param {Array<FileSource>} sources
   */
Adds new resource source(s) to the L10nRegistry.
Notice: Each invocation of this method flushes any changes out to extant
content processes, which is expensive. Please coalesce multiple
registrations into a single sources array and then call this method once.

@param {Array} sources
Adds new resource source ( s ) to the L10nRegistry . Notice : Each invocation of this method flushes any changes out to extant content processes which is expensive . Please coalesce multiple registrations into a single sources array and then call this method once . @param { Array } sources
registerSources(sources) {
    for (const source of sources) {
      if (this.hasSource(source.name)) {
        throw new Error(`Source with name "${source.name}" already registered.`);
      }
      this.sources.set(source.name, source);
    }
    if (isParentProcess && sources.length > 0) {
      this._synchronizeSharedData();
      Services.locale.availableLocales = this.getAvailableLocales();
    }
  }
registerSources ( sources ) { for ( const source of sources ) { if ( this . hasSource ( source . name ) ) { throw new Error ( ` ${ source . name } ` ) ; } this . sources . set ( source . name , source ) ; } if ( isParentProcess && sources . length > 0 ) { this . _synchronizeSharedData ( ) ; Services . locale . availableLocales = this . getAvailableLocales ( ) ; } }
Adds new resource source(s) to the L10nRegistry.
Adds new resource source ( s ) to the L10nRegistry .