Skip to content

Commit

Permalink
ICU-4309 Move the sr_YU locale alias from the installed locale list t…
Browse files Browse the repository at this point in the history
…o the alias list, and add a test for aliases.

X-SVN-Rev: 17089
  • Loading branch information
grhoten committed Jan 6, 2005
1 parent ce062b0 commit ab68bb3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions icu4c/source/data/locales/resfiles.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ GENRB_SYNTHETIC_ALIAS = in.txt in_ID.txt iw.txt iw_IL.txt\


# All aliases (to not be included under 'installed'), but not including root.
GENRB_ALIAS_SOURCE = $(GENRB_SYNTHETIC_ALIAS) sh.txt sh_YU.txt zh_CN.txt zh_HK.txt\
GENRB_ALIAS_SOURCE = $(GENRB_SYNTHETIC_ALIAS) sh.txt sh_YU.txt sr_YU.txt zh_CN.txt zh_HK.txt\
zh_MO.txt zh_SG.txt zh_TW.txt


Expand Down Expand Up @@ -75,7 +75,7 @@ GENRB_SOURCE = af.txt af_ZA.txt am.txt am_ET.txt\
sk.txt sk_SK.txt sl.txt sl_SI.txt so.txt\
so_DJ.txt so_ET.txt so_KE.txt so_SO.txt sq.txt\
sq_AL.txt sr.txt sr_Cyrl.txt sr_Cyrl_YU.txt sr_Latn.txt\
sr_Latn_YU.txt sr_YU.txt sv.txt sv_FI.txt sv_SE.txt\
sr_Latn_YU.txt sv.txt sv_FI.txt sv_SE.txt\
sw.txt sw_KE.txt sw_TZ.txt ta.txt ta_IN.txt\
te.txt te_IN.txt th.txt th_TH.txt ti.txt\
ti_ER.txt ti_ET.txt tr.txt tr_TR.txt uk.txt\
Expand Down
1 change: 1 addition & 0 deletions icu4c/source/data/xml/deprecatedList.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<alias from="th_TH_TRADITIONAL" to="th_TH@calendar=buddhist" xpath="//ldml/dates/calendars/default[@type='buddhist']" />
<aliasLocale locale="sh" />
<aliasLocale locale="sh_YU" />
<aliasLocale locale="sr_YU" />
<aliasLocale locale="zh_CN" />
<aliasLocale locale="zh_HK" />
<aliasLocale locale="zh_MO" />
Expand Down
9 changes: 8 additions & 1 deletion icu4c/source/test/cintltst/cldrtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ TestLocaleStructure(void) {
int32_t locCount = uloc_countAvailable();
int32_t locIndex;
UErrorCode errorCode = U_ZERO_ERROR;
const char *currLoc;
const char *currLoc, *resolvedLoc;

/* TODO: Compare against parent's data too. This code can't handle fallbacks that some tools do already. */
/* char locName[ULOC_FULLNAME_CAPACITY];
Expand Down Expand Up @@ -477,6 +477,13 @@ TestLocaleStructure(void) {
log_verbose("WARNING: The locale %s is experimental! It shouldn't be listed as an installed locale.\n",
currLoc);
}
resolvedLoc = ures_getLocaleByType(currentLocale, ULOC_ACTUAL_LOCALE, &errorCode);
if (strcmp(resolvedLoc, currLoc) != 0) {
/* All locales have at least a Version resource.
If it's absolutely empty, then the previous test will fail too.*/
log_err("Locale resolves to different locale. Is %s an alias of %s?\n",
currLoc, resolvedLoc);
}
TestKeyInRootRecursive(root, "root", currentLocale, currLoc);

testLCID(currentLocale, currLoc);
Expand Down

0 comments on commit ab68bb3

Please sign in to comment.