Skip to content

Commit 2c8e94a

Browse files
authored
CLDR-16665 Add key-type core paths for non-English (#4607)
1 parent 08af0b4 commit 2c8e94a

File tree

3 files changed

+57
-4
lines changed

3 files changed

+57
-4
lines changed

tools/cldr-code/src/main/java/org/unicode/cldr/util/ExtraPaths.java

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,59 @@ public class ExtraPaths {
7171
// core/extension for language names (languages at modern or moderate)
7272

7373
"//ldml/localeDisplayNames/languages/language[@type=\"ku\"][@menu=\"core\"]",
74-
"//ldml/localeDisplayNames/languages/language[@type=\"ku\"][@menu=\"extension\"]"));
74+
"//ldml/localeDisplayNames/languages/language[@type=\"ku\"][@menu=\"extension\"]",
75+
76+
// key/type scope
77+
78+
"//ldml/localeDisplayNames/types/type[@key=\"calendar\"][@type=\"buddhist\"][@scope=\"core\"]",
79+
"//ldml/localeDisplayNames/types/type[@key=\"calendar\"][@type=\"chinese\"][@scope=\"core\"]",
80+
"//ldml/localeDisplayNames/types/type[@key=\"calendar\"][@type=\"coptic\"][@scope=\"core\"]",
81+
"//ldml/localeDisplayNames/types/type[@key=\"calendar\"][@type=\"dangi\"][@scope=\"core\"]",
82+
"//ldml/localeDisplayNames/types/type[@key=\"calendar\"][@type=\"ethiopic-amete-alem\"][@scope=\"core\"]",
83+
"//ldml/localeDisplayNames/types/type[@key=\"calendar\"][@type=\"ethiopic\"][@scope=\"core\"]",
84+
"//ldml/localeDisplayNames/types/type[@key=\"calendar\"][@type=\"gregorian\"][@scope=\"core\"]",
85+
"//ldml/localeDisplayNames/types/type[@key=\"calendar\"][@type=\"hebrew\"][@scope=\"core\"]",
86+
"//ldml/localeDisplayNames/types/type[@key=\"calendar\"][@type=\"indian\"][@scope=\"core\"]",
87+
"//ldml/localeDisplayNames/types/type[@key=\"calendar\"][@type=\"islamic-civil\"][@scope=\"core\"]",
88+
"//ldml/localeDisplayNames/types/type[@key=\"calendar\"][@type=\"islamic\"][@scope=\"core\"]",
89+
"//ldml/localeDisplayNames/types/type[@key=\"calendar\"][@type=\"islamic-tbla\"][@scope=\"core\"]",
90+
"//ldml/localeDisplayNames/types/type[@key=\"calendar\"][@type=\"islamic-umalqura\"][@scope=\"core\"]",
91+
"//ldml/localeDisplayNames/types/type[@key=\"calendar\"][@type=\"japanese\"][@scope=\"core\"]",
92+
"//ldml/localeDisplayNames/types/type[@key=\"calendar\"][@type=\"persian\"][@scope=\"core\"]",
93+
"//ldml/localeDisplayNames/types/type[@key=\"calendar\"][@type=\"roc\"][@scope=\"core\"]",
94+
"//ldml/localeDisplayNames/types/type[@key=\"collation\"][@type=\"compat\"][@scope=\"core\"]",
95+
"//ldml/localeDisplayNames/types/type[@key=\"collation\"][@type=\"dictionary\"][@scope=\"core\"]",
96+
"//ldml/localeDisplayNames/types/type[@key=\"collation\"][@type=\"ducet\"][@scope=\"core\"]",
97+
"//ldml/localeDisplayNames/types/type[@key=\"collation\"][@type=\"phonebook\"][@scope=\"core\"]",
98+
"//ldml/localeDisplayNames/types/type[@key=\"collation\"][@type=\"phonetic\"][@scope=\"core\"]",
99+
"//ldml/localeDisplayNames/types/type[@key=\"collation\"][@type=\"pinyin\"][@scope=\"core\"]",
100+
"//ldml/localeDisplayNames/types/type[@key=\"collation\"][@type=\"search\"][@scope=\"core\"]",
101+
"//ldml/localeDisplayNames/types/type[@key=\"collation\"][@type=\"standard\"][@scope=\"core\"]",
102+
"//ldml/localeDisplayNames/types/type[@key=\"collation\"][@type=\"stroke\"][@scope=\"core\"]",
103+
"//ldml/localeDisplayNames/types/type[@key=\"collation\"][@type=\"traditional\"][@scope=\"core\"]",
104+
"//ldml/localeDisplayNames/types/type[@key=\"collation\"][@type=\"unihan\"][@scope=\"core\"]",
105+
"//ldml/localeDisplayNames/types/type[@key=\"collation\"][@type=\"zhuyin\"][@scope=\"core\"]",
106+
"//ldml/localeDisplayNames/types/type[@key=\"cf\"][@type=\"account\"][@scope=\"core\"]",
107+
"//ldml/localeDisplayNames/types/type[@key=\"cf\"][@type=\"standard\"][@scope=\"core\"]",
108+
"//ldml/localeDisplayNames/types/type[@key=\"em\"][@type=\"default\"][@scope=\"core\"]",
109+
"//ldml/localeDisplayNames/types/type[@key=\"em\"][@type=\"emoji\"][@scope=\"core\"]",
110+
"//ldml/localeDisplayNames/types/type[@key=\"em\"][@type=\"text\"][@scope=\"core\"]",
111+
"//ldml/localeDisplayNames/types/type[@key=\"hc\"][@type=\"h11\"][@scope=\"core\"]",
112+
"//ldml/localeDisplayNames/types/type[@key=\"hc\"][@type=\"h12\"][@scope=\"core\"]",
113+
"//ldml/localeDisplayNames/types/type[@key=\"hc\"][@type=\"h23\"][@scope=\"core\"]",
114+
"//ldml/localeDisplayNames/types/type[@key=\"hc\"][@type=\"h24\"][@scope=\"core\"]",
115+
"//ldml/localeDisplayNames/types/type[@key=\"lb\"][@type=\"loose\"][@scope=\"core\"]",
116+
"//ldml/localeDisplayNames/types/type[@key=\"lb\"][@type=\"normal\"][@scope=\"core\"]",
117+
"//ldml/localeDisplayNames/types/type[@key=\"lb\"][@type=\"strict\"][@scope=\"core\"]",
118+
"//ldml/localeDisplayNames/types/type[@key=\"lw\"][@type=\"breakall\"][@scope=\"core\"]",
119+
"//ldml/localeDisplayNames/types/type[@key=\"lw\"][@type=\"keepall\"][@scope=\"core\"]",
120+
"//ldml/localeDisplayNames/types/type[@key=\"lw\"][@type=\"normal\"][@scope=\"core\"]",
121+
"//ldml/localeDisplayNames/types/type[@key=\"lw\"][@type=\"phrase\"][@scope=\"core\"]",
122+
"//ldml/localeDisplayNames/types/type[@key=\"ms\"][@type=\"metric\"][@scope=\"core\"]",
123+
"//ldml/localeDisplayNames/types/type[@key=\"ms\"][@type=\"uksystem\"][@scope=\"core\"]",
124+
"//ldml/localeDisplayNames/types/type[@key=\"ms\"][@type=\"ussystem\"][@scope=\"core\"]",
125+
"//ldml/localeDisplayNames/types/type[@key=\"ss\"][@type=\"none\"][@scope=\"core\"]",
126+
"//ldml/localeDisplayNames/types/type[@key=\"ss\"][@type=\"standard\"][@scope=\"core\"]"));
75127

76128
public static void addConstant(Collection<String> toAddTo) {
77129
toAddTo.addAll(SingletonHelper.INSTANCE.paths);

tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/PathHeader.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@
6363
//ldml/localeDisplayNames/localeDisplayPattern/%E ; Locale Display Names ; Locale Name Patterns ; Locale Formatting ; &localePattern($1)
6464
//ldml/localeDisplayNames/codePatterns/codePattern[@type="%A"] ; Locale Display Names ; Locale Name Patterns ; Locale Field Fallbacks ; $1
6565
//ldml/localeDisplayNames/languages/language[@type="%A"][@menu="%A"] ; Locale Display Names ; &languageSection($1) ; &firstLetter($1) ; &languageSort($1)-$2
66-
//ldml/localeDisplayNames/languages/language[@type="%A"] ; Locale Display Names ; &languageSection($1) ; &firstLetter($1) ; &languageSort($1)
66+
//ldml/localeDisplayNames/languages/language[@type="%A"] ; Locale Display Names ; &languageSection($1) ; &firstLetter($1) ; *&languageSort($1)
6767
//ldml/localeDisplayNames/scripts/script[@type="%A"] ; Locale Display Names ; Scripts ; &categoryFromScript($1) ; $1
6868
//ldml/localeDisplayNames/territories/territory[@type="%A"] ; Locale Display Names ; &territorySection($1) ; &categoryFromTerritory($1) ; $1
6969
//ldml/localeDisplayNames/subdivisions/subdivision[@type="%A"] ; Locale Display Names ; &territorySection($1) ; &categoryFromTerritory($1)-Subdivisions ; $1
7070
//ldml/localeDisplayNames/variants/variant[@type="%A"] ; Locale Display Names ; Locale Variants ; null ; $1
7171
//ldml/localeDisplayNames/keys/key[@type="%A"] ; Locale Display Names ; Keys ; &categoryFromKey($1) ; $1
72-
//ldml/localeDisplayNames/types/type[@key="%A"][@type="%A"][@scope="%A"] ; Locale Display Names ; Keys ; *&categoryFromKey($1) ; $1-$2-scope
73-
//ldml/localeDisplayNames/types/type[@key="%A"][@type="%A"] ; Locale Display Names ; Keys ; *&categoryFromKey($1) ; $1-$2
72+
//ldml/localeDisplayNames/types/type[@key="%A"][@type="%A"][@scope="%A"] ; Locale Display Names ; Keys ; *&categoryFromKey($1) ; $1-$2-$3
73+
//ldml/localeDisplayNames/types/type[@key="%A"][@type="%A"] ; Locale Display Names ; Keys ; *&categoryFromKey($1) ; *$1-$2
7474

7575
### Date & Time Formatting
7676
//ldml/dates/fields/field[@type="%A"]/displayName ; DateTime ; Fields ; Date Fields ; &datefield($1)

tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestCLDRFile.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ public void testExtraPaths() {
196196
|| path.startsWith(
197197
"//ldml/localeDisplayNames/territories/territory")
198198
|| path.startsWith("//ldml/localeDisplayNames/variants/variant")
199+
|| path.startsWith("//ldml/localeDisplayNames/types/type")
199200
|| path.startsWith("//ldml/numbers/currencies/currency")
200201
|| path.startsWith("//ldml/personNames/sampleName")
201202
|| path.contains("/availableFormats")

0 commit comments

Comments
 (0)