tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

unicode-bcp47-locale-ids-region-mappings.js (1081B)


      1 // |reftest| skip-if(!this.hasOwnProperty("Intl"))
      2 
      3 // For the most part the mappings from IANA are a subset of the CLDR mappings.
      4 // So there are mappings which are consistent across both databases.
      5 assertEq(Intl.getCanonicalLocales("de-DD")[0], "de-DE");
      6 
      7 // CLDR contains additional mappings:
      8 //   <territoryAlias type="QU" replacement="EU" reason="deprecated"/>
      9 //   <territoryAlias type="UK" replacement="GB" reason="deprecated"/>
     10 assertEq(Intl.getCanonicalLocales("und-QU")[0], "und-EU");
     11 assertEq(Intl.getCanonicalLocales("en-UK")[0], "en-GB");
     12 
     13 // CLDR additional maps ISO 3166-1 numeric to ISO 3166-1 alpha-2 codes:
     14 //   <territoryAlias type="280" replacement="DE" reason="deprecated"/>
     15 //   <territoryAlias type="278" replacement="DE" reason="overlong"/>
     16 //   <territoryAlias type="276" replacement="DE" reason="overlong"/>
     17 assertEq(Intl.getCanonicalLocales("de-280")[0], "de-DE");
     18 assertEq(Intl.getCanonicalLocales("de-278")[0], "de-DE");
     19 assertEq(Intl.getCanonicalLocales("de-276")[0], "de-DE");
     20 
     21 if (typeof reportCompare === "function")
     22    reportCompare(true, true);