diff --git a/tools/cldr-code/src/main/java/org/unicode/cldr/util/Organization.java b/tools/cldr-code/src/main/java/org/unicode/cldr/util/Organization.java index 1208a7fcbbc..2c42b213c71 100644 --- a/tools/cldr-code/src/main/java/org/unicode/cldr/util/Organization.java +++ b/tools/cldr-code/src/main/java/org/unicode/cldr/util/Organization.java @@ -17,6 +17,7 @@ public enum Organization { afghan_csa("Afghan CSA"), afghan_mcit("Afghan MCIT"), afrigen("Afrigen"), + airbnb("Airbnb"), anii("Anii Research Group"), apple("Apple"), bangladesh("Bangladesh", "Bangladesh Computer Council"), diff --git a/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/Locales.txt b/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/Locales.txt index 9c82da122f3..ecda6781f22 100644 --- a/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/Locales.txt +++ b/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/Locales.txt @@ -38,6 +38,68 @@ # This is an optional comment which can be used to give the name of the locale, # or any other organization-specific information such as tiers (T0, T1, …) +Airbnb ; ar ; modern ; T2 Arabic +Airbnb ; az ; modern ; T3 Azerbaijani +Airbnb ; bg ; modern ; T3 Bulgarian +Airbnb ; ca ; modern ; T2 Catalan +Airbnb ; cs ; modern ; T2 Czech +Airbnb ; da ; modern ; T2 Danish +Airbnb ; de ; modern ; T1 German +Airbnb ; el ; modern ; T2 Greek +Airbnb ; en ; modern ; T0 American English +Airbnb ; en_AU ; modern ; T1 English (Australia) +Airbnb ; en_CA ; modern ; T1 English (Canada) +Airbnb ; en_GB ; modern ; T1 English (Great Britain) +Airbnb ; es ; modern ; T1 Spanish (Spain) +Airbnb ; es_MX ; modern ; T1 Spanish (Mexico) +Airbnb ; es_419 ; modern ; T2 Spanish (Latin America) +Airbnb ; et ; modern ; T3 Estonian +Airbnb ; fi ; modern ; T2 Finnish +Airbnb ; fr ; modern ; T1 French +Airbnb ; fr_CA ; modern ; T2 French (Canada) +Airbnb ; ga ; modern ; T3 Gaelic +Airbnb ; he ; modern ; T2 Hebrew +Airbnb ; hi ; modern ; T3 Hindi +Airbnb ; hr ; modern ; T3 Croatian +Airbnb ; hu ; modern ; T2 Hungarian +Airbnb ; hy ; modern ; T3 Armenian +Airbnb ; id ; modern ; T3 Indonesian +Airbnb ; is ; modern ; T3 Icelandic +Airbnb ; it ; modern ; T1 Italian +Airbnb ; ja ; modern ; T1 Japanese +Airbnb ; ka ; modern ; T3 Georgian +Airbnb ; kn ; modern ; T3 Kannada +Airbnb ; ko ; modern ; T1 Korean +Airbnb ; lt ; modern ; T3 Lithuanian +Airbnb ; lv ; modern ; T3 Latvian +Airbnb ; mk ; modern ; T3 Macedonian +Airbnb ; mr ; modern ; T3 Marathi +Airbnb ; ms ; modern ; T3 Malay +Airbnb ; nl ; modern ; T1 Dutch +Airbnb ; nl_BE ; modern ; T3 Flemish +Airbnb ; no ; modern ; T3 Norwegian +Airbnb ; pl ; modern ; T2 Polish +Airbnb ; pt ; modern ; T1 Portuguese (Brazil) +Airbnb ; pt_PT ; modern ; T2 Portuguese (Portugal) +Airbnb ; ro ; modern ; T3 Romanian +Airbnb ; ru ; modern ; T1 Russian +Airbnb ; sk ; modern ; T3 Slovak +Airbnb ; sl ; modern ; T3 Slovenian +Airbnb ; sq ; modern ; T3 Albanian +Airbnb ; sr ; modern ; T3 Serbian +Airbnb ; sr_Cyrl_ME ; modern ; T3 Serbian (Montenegro) +Airbnb ; sv ; modern ; T2 Swedish +Airbnb ; sw ; modern ; T3 Swahili +Airbnb ; th ; modern ; T3 Thai +Airbnb ; fil ; modern ; T3 Filipino +Airbnb ; tr ; modern ; T2 Turkish +Airbnb ; uk ; modern ; T3 Ukrainian +Airbnb ; vi ; modern ; T2 Vietnamese +Airbnb ; xh ; moderate ; T3 Xhosa +Airbnb ; zh ; modern ; T1 Simplified Chinese +Airbnb ; zh_Hant ; modern ; T2 Traditional Chinese (Taiwan) +Airbnb ; zh_Hant_HK ; modern ; T2 Traditional Chinese (Hong Kong) +Airbnb ; zu ; modern ; T3 Zulu # http://java.sun.com/j2se/1.5.0/docs/guide/intl/locale.doc.html # http://developers.sun.com/techtopics/global/index.html diff --git a/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestCLDRLocaleCoverage.java b/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestCLDRLocaleCoverage.java index 1094ac1d188..2099a76e2ee 100644 --- a/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestCLDRLocaleCoverage.java +++ b/tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestCLDRLocaleCoverage.java @@ -376,33 +376,42 @@ private void checkDisjoint( } public void TestParentCoverage() { + final SupplementalDataInfo sd = SupplementalDataInfo.getInstance(); + final Set defaultContentLocales = sd.getDefaultContentLocales(); + for (Organization organization : sc.getLocaleCoverageOrganizations()) { if (organization == Organization.special) { continue; } final Map localesToLevels = sc.getLocalesToLevelsFor(organization); for (Entry localeAndLevel : localesToLevels.entrySet()) { - String originalLevel = localeAndLevel.getKey(); + String originalLocale = localeAndLevel.getKey(); Level level = localeAndLevel.getValue(); - String locale = originalLevel; + String locale = originalLocale; while (true) { String parent = LocaleIDParser.getParent(locale); if (parent == null || parent.equals(LocaleNames.ROOT)) { break; } - if (!parent.equals("en_001")) { // en_001 is generated later from en_GB + if (!defaultContentLocales.contains(parent) + && !parent.equals("en_001")) { // en_001 is generated later from en_GB Level parentLevel = localesToLevels.get(parent); - assertTrue( - organization - + "; locale=" - + originalLevel - + "; level=" - + level - + "; parent=" - + parent - + "; level=" - + parentLevel, - parentLevel != null && parentLevel.compareTo(level) >= 0); + if (assertNotNull( + String.format( + "Locales.txt: Entry '%s ; %s ; ...' is missing parent '%s ; %s ; ...'", + organization, originalLocale, organization, parent), + parentLevel)) { + assertTrue( + String.format( + "Locales.txt: Entry '%s ; %s ; %s' should not be higher than parent '%s ; %s ; %s'", + organization, + originalLocale, + level, + organization, + parent, + parentLevel), + parentLevel.compareTo(level) >= 0); + } } locale = parent; }