Skip to content

CLDR-14218 CLDR 38 BRS A14.1 #665

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
167 changes: 86 additions & 81 deletions common/supplemental/languageGroup.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ public TestAll() {
"org.unicode.cldr.unittest.TestIdentity",
"org.unicode.cldr.unittest.TestInheritance",
"org.unicode.cldr.unittest.TestKeyboardModifierSet",
"org.unicode.cldr.unittest.TestLanguageGroup",
"org.unicode.cldr.unittest.TestLdml2ICU",
"org.unicode.cldr.unittest.TestLocalCurrency",
"org.unicode.cldr.unittest.TestLocale",
Expand Down
3 changes: 3 additions & 0 deletions tools/java/org/unicode/cldr/draft/FileUtilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,9 @@ public static void copyFile(Class<?> class1, String sourceFile, String targetDir

public static String getRelativeFileName(Class<?> class1, String filename) {
URL resource = class1.getResource(filename);
if(resource == null) {
throw new NullPointerException("Resource Not found: " + filename);
}
String resourceString = resource.toString();
if (resourceString.startsWith("file:")) {
return resourceString.substring(5);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.unicode.cldr.util.CLDRConfig;
import org.unicode.cldr.util.CLDRFile;
import org.unicode.cldr.util.CLDRPaths;
import org.unicode.cldr.util.CldrUtility;
import org.unicode.cldr.util.Containment;
import org.unicode.cldr.util.DtdType;
import org.unicode.cldr.util.Iso639Data;
Expand Down Expand Up @@ -51,17 +52,17 @@ public class GenerateLanguageContainment {
private static final CLDRConfig CONFIG = CLDRConfig.getInstance();
static final Splitter TAB = Splitter.on('\t').trimResults();
static final CLDRFile ENGLISH = CONFIG.getEnglish();
static final String relDir = "../util/data/languages/";
static final String relDir = "data/languages/";
static final Map<String, R2<List<String>, String>> ALIAS_MAP = CONFIG
.getSupplementalDataInfo()
.getLocaleAliasInfo()
.get("language");
static final Map<String, String> entityToLabel = loadTsvPairsUnique(GenerateLanguageContainment.class, relDir + "entityToLabel.tsv",
static final Map<String, String> entityToLabel = loadTsvPairsUnique(CldrUtility.class, relDir + "entityToLabel.tsv",
null, null, null);

static final Function<String, String> NAME = code -> code.equals("mul") ? "root" : ENGLISH.getName(code) + " (" + code + ")";

static final Map<String, String> entityToCode = loadTsvPairsUnique(GenerateLanguageContainment.class, relDir + "entityToCode.tsv",
static final Map<String, String> entityToCode = loadTsvPairsUnique(CldrUtility.class, relDir + "entityToCode.tsv",
code -> {
code = code.replace("\"", "");
R2<List<String>, String> v = ALIAS_MAP.get(code);
Expand All @@ -77,7 +78,7 @@ public class GenerateLanguageContainment {
static final Multimap<String, String> codeToEntity = ImmutableMultimap.copyOf(
Multimaps.invertFrom(Multimaps.forMap(entityToCode), LinkedHashMultimap.create()));

static final Multimap<String, String> childToParent = loadTsvPairs(GenerateLanguageContainment.class, relDir + "childToParent.tsv",
static final Multimap<String, String> childToParent = loadTsvPairs(CldrUtility.class, relDir + "childToParent.tsv",
code -> getEntityName(code), code -> getEntityName(code));

static final Set<String> COLLECTIONS;
Expand Down
12,980 changes: 8,668 additions & 4,312 deletions tools/java/org/unicode/cldr/util/data/languages/childToParent.tsv

Large diffs are not rendered by default.

Loading