Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLDR-17669 add Organization.airbnb #3747

Merged
merged 5 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srl295 - Can we reorder fil so it's alphabetical?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, tl -> fil

yes – want a new PR for it? i'm not sure all of the others are alphabetical though. some might be by tiers

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, tl -> fil

yes – want a new PR for it? i'm not sure all of the others are alphabetical though. some might be by tiers

yes - sgtm! In the past it was by tier. I've been meaning to reorganize the others, but it's been low priority. I've just been adding things alphabetically for anything new.

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);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two-for-one test condition

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
Loading