Skip to content

Commit

Permalink
CLDR-17669 add Organization.airbnb (#3747)
Browse files Browse the repository at this point in the history
  • Loading branch information
srl295 authored May 23, 2024
1 parent 3f430d3 commit 05e9986
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,33 +376,42 @@ private void checkDisjoint(
}

public void TestParentCoverage() {
final SupplementalDataInfo sd = SupplementalDataInfo.getInstance();
final Set<String> defaultContentLocales = sd.getDefaultContentLocales();

for (Organization organization : sc.getLocaleCoverageOrganizations()) {
if (organization == Organization.special) {
continue;
}
final Map<String, Level> localesToLevels = sc.getLocalesToLevelsFor(organization);
for (Entry<String, Level> 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;
}
Expand Down

0 comments on commit 05e9986

Please sign in to comment.