Skip to content

Commit 7159e33

Browse files
committed
ICU-21480 integrate CLDR release 39 alpha1 to ICU trunk
1 parent dcfa2a7 commit 7159e33

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1332
-6654
lines changed

icu4c/source/common/locid.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,8 +523,8 @@ static const char* const KNOWN_CANONICALIZED[] = {
523523
"it", "it_IT", "ja", "ja_JP", "jv", "jv_ID", "ka", "ka_GE", "kk", "kk_KZ",
524524
"km", "km_KH", "kn", "kn_IN", "ko", "ko_KR", "ky", "ky_KG", "lo", "lo_LA",
525525
"lt", "lt_LT", "lv", "lv_LV", "mk", "mk_MK", "ml", "ml_IN", "mn", "mn_MN",
526-
"mr", "mr_IN", "ms", "ms_MY", "my", "my_MM", "ne", "ne_NP", "nl", "nl_NL",
527-
"no", "no_NO", "or", "or_IN", "pa", "pa_IN", "pl", "pl_PL", "ps", "ps_AF",
526+
"mr", "mr_IN", "ms", "ms_MY", "my", "my_MM", "nb", "nb_NO", "ne", "ne_NP",
527+
"nl", "nl_NL", "no", "or", "or_IN", "pa", "pa_IN", "pl", "pl_PL", "ps", "ps_AF",
528528
"pt", "pt_BR", "pt_PT", "ro", "ro_RO", "ru", "ru_RU", "sd", "sd_IN", "si",
529529
"si_LK", "sk", "sk_SK", "sl", "sl_SI", "so", "so_SO", "sq", "sq_AL", "sr",
530530
"sr_Cyrl_RS", "sr_Latn", "sr_RS", "sv", "sv_SE", "sw", "sw_TZ", "ta",

icu4c/source/common/locmap.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,8 +526,8 @@ ILCID_POSIX_SUBTABLE(nl) {
526526
ILCID_POSIX_SUBTABLE(no) {
527527
{0x14, "no"}, /* really nb_NO - actually Windows differentiates between neutral (no region) and specific (with region) */
528528
{0x7c14, "nb"}, /* really nb */
529-
{0x0414, "no_NO"}, /* really no_NO. Keep first in the 414 list. */
530-
{0x0414, "nb_NO"}, /* really no_NO */
529+
{0x0414, "nb_NO"}, /* really nb_NO. Keep first in the 414 list. */
530+
{0x0414, "no_NO"}, /* really nb_NO */
531531
{0x0814, "nn_NO"}, /* really nn_NO. Keep first in the 814 list. */
532532
{0x7814, "nn"}, /* It's 0x14 or 0x814, pick one to make the test program happy. */
533533
{0x0814, "no_NO_NY"}/* really nn_NO */

icu4c/source/common/uresbund.cpp

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,15 @@ static UBool chopLocale(char *name) {
9191
return FALSE;
9292
}
9393

94+
/**
95+
* Called to check whether a name without '_' needs to be checked for a parent.
96+
* Some code had assumed that locale IDs with '_' could not have a non-root parent.
97+
* We may want a better way of doing this.
98+
*/
99+
static UBool mayHaveParent(char *name) {
100+
return (name[0] != 0 && uprv_strstr("nb nn",name) != nullptr);
101+
}
102+
94103
/**
95104
* Internal function
96105
*/
@@ -529,8 +538,8 @@ loadParentsExceptRoot(UResourceDataEntry *&t1,
529538
char name[], int32_t nameCapacity,
530539
UBool usingUSRData, char usrDataPath[], UErrorCode *status) {
531540
if (U_FAILURE(*status)) { return FALSE; }
532-
UBool hasChopped = TRUE;
533-
while (hasChopped && t1->fParent == NULL && !t1->fData.noFallback &&
541+
UBool checkParent = TRUE;
542+
while (checkParent && t1->fParent == NULL && !t1->fData.noFallback &&
534543
res_getResource(&t1->fData,"%%ParentIsRoot") == RES_BOGUS) {
535544
Resource parentRes = res_getResource(&t1->fData, "%%Parent");
536545
if (parentRes != RES_BOGUS) { // An explicit parent was found.
@@ -573,7 +582,7 @@ loadParentsExceptRoot(UResourceDataEntry *&t1,
573582
}
574583
}
575584
t1 = t2;
576-
hasChopped = chopLocale(name);
585+
checkParent = chopLocale(name) || mayHaveParent(name);
577586
}
578587
return TRUE;
579588
}
@@ -692,7 +701,7 @@ static UResourceDataEntry *entryOpen(const char* path, const char* localeID,
692701
}
693702
}
694703
}
695-
if (hasChopped && !isRoot) {
704+
if ((hasChopped || mayHaveParent(name)) && !isRoot) {
696705
if (!loadParentsExceptRoot(t1, name, UPRV_LENGTHOF(name), usingUSRData, usrDataPath, status)) {
697706
goto finish;
698707
}
@@ -716,7 +725,7 @@ static UResourceDataEntry *entryOpen(const char* path, const char* localeID,
716725
hasRealData = TRUE;
717726
isDefault = TRUE;
718727
// TODO: Why not if (usingUSRData) { ... } like in the non-default-locale code path?
719-
if (hasChopped && !isRoot) {
728+
if ((hasChopped || mayHaveParent(name)) && !isRoot) {
720729
if (!loadParentsExceptRoot(t1, name, UPRV_LENGTHOF(name), usingUSRData, usrDataPath, status)) {
721730
goto finish;
722731
}

icu4c/source/data/coll/LOCALE_DEPS.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
"iw": "he",
1212
"iw_IL": "he_IL",
1313
"mo": "ro",
14-
"nb": "no",
15-
"nb_NO": "no_NO",
14+
"no_NO": "no",
1615
"pa_IN": "pa_Guru_IN",
1716
"sh": "sr_Latn",
1817
"sh_BA": "sr_Latn_BA",
@@ -34,6 +33,7 @@
3433
},
3534
"parents": {
3635
"ff_Adlm": "root",
36+
"nb": "no",
3737
"nn": "no"
3838
}
3939
}

icu4c/source/data/coll/nb.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
// License & terms of use: http://www.unicode.org/copyright.html
33
// Generated using tools/cldr/cldr-to-icu/build-icu-data.xml
44
nb{
5-
"%%ALIAS"{"no"}
5+
%%Parent{"no"}
66
}

icu4c/source/data/coll/nb_NO.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
// License & terms of use: http://www.unicode.org/copyright.html
33
// Generated using tools/cldr/cldr-to-icu/build-icu-data.xml
44
nb_NO{
5-
"%%ALIAS"{"no_NO"}
65
}

icu4c/source/data/coll/no_NO.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
// License & terms of use: http://www.unicode.org/copyright.html
33
// Generated using tools/cldr/cldr-to-icu/build-icu-data.xml
44
no_NO{
5+
"%%ALIAS"{"no"}
56
}

icu4c/source/data/curr/LOCALE_DEPS.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@
2121
"ks_IN": "ks_Arab_IN",
2222
"mni_IN": "mni_Beng_IN",
2323
"mo": "ro",
24-
"nb": "no",
25-
"nb_NO": "no_NO",
26-
"nb_SJ": "no_SJ",
24+
"no_NO": "no",
2725
"no_NO_NY": "nn_NO",
2826
"pa_IN": "pa_Guru_IN",
2927
"pa_PK": "pa_Arab_PK",
@@ -178,6 +176,7 @@
178176
"es_UY": "es_419",
179177
"es_VE": "es_419",
180178
"ff_Adlm": "root",
179+
"nb": "no",
181180
"nn": "no",
182181
"pa_Arab": "root",
183182
"pt_AO": "pt_PT",

icu4c/source/data/curr/nb.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
// License & terms of use: http://www.unicode.org/copyright.html
33
// Generated using tools/cldr/cldr-to-icu/build-icu-data.xml
44
nb{
5-
"%%ALIAS"{"no"}
5+
%%Parent{"no"}
66
}

icu4c/source/data/curr/nb_NO.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)