Commit d25d6e32 authored by Alex Catarineu's avatar Alex Catarineu Committed by Matthew Finkel
Browse files

Bug 28196: preparations for using torbutton tor-browser-brand.ftl

A small change to Fluent FileSource class is required so that we
can register a new source without its supported locales being
counted as available locales for the browser.
parent 87395903
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
# For Tor Browser, we use a new file (different than the brand.ftl file
# that is used by Firefox) to avoid picking up the -brand-short-name values
# that Mozilla includes in the Firefox language packs.

-brand-shorter-name = Tor Browser
-brand-short-name = Tor Browser
-brand-full-name = Tor Browser
# This brand name can be used in messages where the product name needs to
# remain unchanged across different versions (Nightly, Beta, etc.).
-brand-product-name = Tor Browser
-vendor-short-name = Tor Project
trademarkInfo = Firefox and the Firefox logos are trademarks of the Mozilla Foundation.
+0 −12
Original line number Diff line number Diff line
# For Tor Browser, we use a new file (different than the brand.ftl file
# that is used by Firefox) to avoid picking up the -brand-short-name values
# that Mozilla includes in the Firefox language packs.

-brand-shorter-name = Tor Browser
-brand-short-name = Tor Browser
-brand-full-name = Tor Browser
# This brand name can be used in messages where the product name needs to
# remain unchanged across different versions (Nightly, Beta, etc.).
-brand-product-name = Tor Browser
-vendor-short-name = Tor Project
trademarkInfo = Firefox and the Firefox logos are trademarks of the Mozilla Foundation.
+0 −12
Original line number Diff line number Diff line
# For Tor Browser, we use a new file (different than the brand.ftl file
# that is used by Firefox) to avoid picking up the -brand-short-name values
# that Mozilla includes in the Firefox language packs.

-brand-shorter-name = Tor Browser
-brand-short-name = Tor Browser
-brand-full-name = Tor Browser
# This brand name can be used in messages where the product name needs to
# remain unchanged across different versions (Nightly, Beta, etc.).
-brand-product-name = Tor Browser
-vendor-short-name = Tor Project
trademarkInfo = Firefox and the Firefox logos are trademarks of the Mozilla Foundation.
+5 −2
Original line number Diff line number Diff line
@@ -266,9 +266,11 @@ class L10nRegistryService {

    for (const source of this.sources.values()) {
      for (const locale of source.locales) {
        if (!source.skipForAvailableLocales) {
          locales.add(locale);
        }
      }
    }
    return Array.from(locales);
  }
}
@@ -574,10 +576,11 @@ class FileSource {
   *
   * @returns {FileSource}
   */
  constructor(name, locales, prePath) {
  constructor(name, locales, prePath, skipForAvailableLocales = false) {
    this.name = name;
    this.locales = locales;
    this.prePath = prePath;
    this.skipForAvailableLocales = skipForAvailableLocales;
    this.indexed = false;

    // The cache object stores information about the resources available