ICU-2947 make root locale language neutral

X-SVN-Rev: 13226
This commit is contained in:
Ram Viswanadha 2003-09-27 01:09:40 +00:00
parent c9857c18fd
commit 05ee82acf2
40 changed files with 2393 additions and 1147 deletions

View file

@ -530,10 +530,10 @@ static const ILcidPosixMap gPosixIDmap[] = {
ILCID_POSIX_MAP(ka), /* ka Georgian 0x37 */
ILCID_POSIX_MAP(kk), /* kk Kazakh 0x3f */
ILCID_POSIX_MAP(kn), /* kn Kannada 0x4b */
ILCID_POSIX_MAP(ky), /* ky Kyrgyz 0x40 */
ILCID_POSIX_MAP(ko), /* ko Korean 0x12 */
ILCID_POSIX_MAP(kok), /* kok Konkani 0x57 */
ILCID_POSIX_MAP(ks), /* ks Kashmiri 0x60 */
ILCID_POSIX_MAP(ky), /* ky Kyrgyz 0x40 */
ILCID_POSIX_MAP(lt), /* lt Lithuanian 0x27 */
ILCID_POSIX_MAP(lv), /* lv Latvian, Lettish 0x26 */
ILCID_POSIX_MAP(mk), /* mk Macedonian 0x2f */
@ -685,8 +685,9 @@ uprv_convertToLCID(const char* posixID, UErrorCode* status)
{
uint32_t low = 0;
uint32_t high = gLocaleCount - 1;
uint32_t high = gLocaleCount;
uint32_t mid = high;
uint32_t oldmid =0;
int32_t compVal;
char langID[ULOC_FULLNAME_CAPACITY];
@ -706,19 +707,25 @@ uprv_convertToLCID(const char* posixID, UErrorCode* status)
}
/*Binary search for the map entry for normal cases */
/* When mid == 0, it's not found */
while (low <= high && mid != 0) {
mid = (low + high + 1) / 2; /* +1 is to round properly */
while (high > low) /*binary search*/{
mid = (high+low) >> 1; /*Finds median*/
if (mid == oldmid)
break;
compVal = uprv_strcmp(langID, gPosixIDmap[mid].regionMaps->posixID);
if (compVal < 0)
high = mid - 1;
else if (compVal > 0)
low = mid + 1;
else /* found match! */
if (compVal < 0){
high = mid;
}
else if (compVal > 0){
low = mid;
}
else /*we found it*/{
return hostID(&gPosixIDmap[mid], posixID, status);
}
oldmid = mid;
}
/*

View file

@ -52,6 +52,8 @@ U_CFUNC const char *locale_get_default(void);
static const char _kLocaleID[] = "LocaleID";
static const char _kLanguages[] = "Languages";
static const char _kCountries[] = "Countries";
static const char _kVariants[] = "Variants";
static const char _kKeys[] = "Keys";
static const char _kIndexLocaleName[] = "res_index";
static const char _kIndexTag[] = "InstalledLocales";
@ -830,7 +832,11 @@ _res_getTableStringWithFallback(const char *path, const char *locale,
UResourceBundle *rb, table;
const UChar *item;
UErrorCode errorCode;
char explicitFallbackName[80] = {0};
int32_t efnLen =0;
const char* rootName = "root";
const UChar* ef = NULL;
UBool overrideExplicitFallback = FALSE;
for(;;) {
/*
* open the bundle for the current locale
@ -868,27 +874,46 @@ _res_getTableStringWithFallback(const char *path, const char *locale,
*pErrorCode=errorCode;
}
/* check if the fallback token is set */
ef = ures_getStringByKey(&table, "Fallback", &efnLen, &errorCode);
if(U_SUCCESS(errorCode)){
/* set the fallback chain */
u_UCharsToChars(ef, explicitFallbackName, efnLen);
/* null terminate the buffer */
explicitFallbackName[efnLen]=0;
}else if(errorCode==U_USING_DEFAULT_WARNING ||
(errorCode==U_USING_FALLBACK_WARNING && *pErrorCode!=U_USING_DEFAULT_WARNING)
) {
/* set the "strongest" error code (success->fallback->default->failure) */
*pErrorCode=errorCode;
}
/* try to open the requested item in the table */
errorCode=U_ZERO_ERROR;
item=ures_getStringByKey(&table, itemKey, pLength, &errorCode);
if(U_SUCCESS(errorCode)) {
/* we got the requested item! */
ures_close(&table);
ures_close(rb);
/* if the item for the key is empty ... override the explicit fall back set */
if(item[0]==0 && efnLen > 0){
overrideExplicitFallback = TRUE;
}else{
/* we got the requested item! */
ures_close(&table);
ures_close(rb);
if(errorCode==U_USING_DEFAULT_WARNING ||
(errorCode==U_USING_FALLBACK_WARNING && *pErrorCode!=U_USING_DEFAULT_WARNING)
) {
/* set the "strongest" error code (success->fallback->default->failure) */
*pErrorCode=errorCode;
if(errorCode==U_USING_DEFAULT_WARNING ||
(errorCode==U_USING_FALLBACK_WARNING && *pErrorCode!=U_USING_DEFAULT_WARNING)
) {
/* set the "strongest" error code (success->fallback->default->failure) */
*pErrorCode=errorCode;
}
/*
* It is safe to close the bundle and still return the
* string pointer because resource bundles are
* cached until u_cleanup().
*/
return item;
}
/*
* It is safe to close the bundle and still return the
* string pointer because resource bundles are
* cached until u_cleanup().
*/
return item;
}
/*
@ -909,7 +934,7 @@ _res_getTableStringWithFallback(const char *path, const char *locale,
return NULL;
}
if(*locale==0 || 0==uprv_strcmp(locale, "root")) {
if(*locale==0 || 0==uprv_strcmp(locale, "root") || 0==uprv_strcmp(locale,explicitFallbackName)) {
/* end of fallback; even root does not have the requested item either */
ures_close(&table);
ures_close(rb);
@ -919,18 +944,23 @@ _res_getTableStringWithFallback(const char *path, const char *locale,
/* could not find the table, or its item, try to fall back to a different RB and table */
errorCode=U_ZERO_ERROR;
uloc_getParent(locale, localeBuffer, sizeof(localeBuffer), &errorCode);
if(efnLen > 0 && overrideExplicitFallback == FALSE){
/* continue the fallback lookup with the explicit fallback that is requested */
locale = explicitFallbackName;
}else{
uloc_getParent(locale, localeBuffer, sizeof(localeBuffer), &errorCode);
if(U_FAILURE(errorCode) || errorCode==U_STRING_NOT_TERMINATED_WARNING) {
/* error getting the parent locale ID - should never happen */
*pErrorCode=U_INTERNAL_PROGRAM_ERROR;
return NULL;
}
/* continue the fallback lookup with the parent locale ID */
locale=localeBuffer;
}
/* done with the locale string - ready to close table and rb */
ures_close(&table);
ures_close(rb);
if(U_FAILURE(errorCode) || errorCode==U_STRING_NOT_TERMINATED_WARNING) {
/* error getting the parent locale ID - should never happen */
*pErrorCode=U_INTERNAL_PROGRAM_ERROR;
return NULL;
}
/* continue the fallback lookup with the parent locale ID */
locale=localeBuffer;
}
}
@ -1071,11 +1101,9 @@ uloc_getDisplayVariant(const char *locale,
/*
* display names for variants are top-level items of
* locale resource bundles
* the rb keys are "%%" followed by the variant tags
*/
*pErrorCode=U_ZERO_ERROR; /* necessary because we will check for a warning code */
localeBuffer[0]=localeBuffer[1]='%';
length=uloc_getVariant(locale, localeBuffer+2, sizeof(localeBuffer)-2, pErrorCode);
length=uloc_getVariant(locale, localeBuffer, sizeof(localeBuffer), pErrorCode);
if(U_FAILURE(*pErrorCode) || *pErrorCode==U_STRING_NOT_TERMINATED_WARNING) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
@ -1086,8 +1114,8 @@ uloc_getDisplayVariant(const char *locale,
/* pass itemKey=NULL to look for a top-level item */
return _getStringOrCopyKey(NULL, displayLocale,
localeBuffer, NULL,
localeBuffer+2, /* substitute=variant without %% */
_kVariants, localeBuffer,
localeBuffer,
dest, destCapacity,
pErrorCode);
}

View file

@ -6,7 +6,14 @@
// ***************************************************************************
af {
Version { "3.0" }
Version { "4.0" }
Variants{
Fallback{"en"}
}
Keys{
Fallback{"en"}
}
AmPmMarkers {
"VM",

View file

@ -6,14 +6,21 @@
// ***************************************************************************
ca {
Version { "2.0" }
Version { "4.0" }
CollationElements {
Version { "1.0" }
Sequence { "[backwards 2]"
"&C < ch <<< Ch <<< CH"
"&L < ll <<< l\u00b7l <<< Ll <<< L\u00b7l <<< LL <<< L\u00b7L" }
}
Variants{
Fallback{"en"}
}
Keys{
Fallback{"en"}
}
Countries {
Fallback{"en"}
ES { "Espanya" }
}
DateTimePatterns {
@ -46,6 +53,7 @@ ca {
"dissabte",
}
Languages {
Fallback{"en"}
ca { "catal\u00E0" }
}
MonthAbbreviations {

View file

@ -6,7 +6,7 @@
// ***************************************************************************
cs {
Version{ "2.0" }
Version{ "3.0" }
AmPmMarkers {
"dop.",
"odp.",
@ -17,7 +17,15 @@ cs {
"ch <<< cH <<< Ch <<< CH & R < r\u030C <<< R\u030C& S < s\u030C <<< S\u030C& Z < z\u030C <<<"
" Z\u030C" }
}
Variants{
Fallback{"en"}
}
Keys{
Fallback{"en"}
}
Countries {
Fallback{"en"}
//AD { "Andorra" }
AE { "Spojen\u00E9 arabsk\u00E9 emir\u00E1ty" }
AF { "Afgh\u00E1nist\u00E1n" }
@ -292,6 +300,7 @@ cs {
"po Kr.",
}
Languages {
Fallback{ "en"}
ar { "arapski" }
bg { "bugarski" }
cs { "\u010De\u0161ki" }

View file

@ -6,14 +6,23 @@
// ***************************************************************************
da {
Version {"2.0"}
Version {"3.0"}
CollationElements {
Version { "2.0" }
Sequence { "& A < \u00E6\u0301 <<< \u00C6\u0301& Z < \u00E6 <<< \u00C6<<"
" a\u0308 <<< A\u0308 < \u00F8 <<< \u00D8 << o\u0308 <<< O\u0308 << o\u030B<<< O\u030B< a\u030A"
" <<< A\u030A<<< aa <<< aA <<< Aa <<< AA & V<<< w<<< W & Y << u\u0308 <<< U\u0308 &D < \u00F0<<< \u00D0 &T < \u00FE<<< \u00DE" }
}
Variants{
Fallback{"en"}
}
Keys{
Fallback{"en"}
}
Countries {
Fallback{ "en"}
//AD { "Andorra" }
AE { "Forenede Arabiske Emirater" }
//AF { "Afghanistan" }
@ -297,6 +306,7 @@ da {
}
ExemplarCharacters { "[a-z \u00e6 \u00e5 \u00f8 \u00e1 \u00e9 \u00ed \u00f3 \u00fa \u00fd]" }
Languages {
Fallback{ "en"}
ar { "Arabisk" }
bg { "Bulgarsk" }
cs { "Tjekkisk" }

View file

@ -17,10 +17,13 @@
// http://www.bkg.bund.de/kartographie/stagn/Staatennamen.htm
de {
Version{ "2.0" }
"%%PHONEBOOK" { "Telefonbuch-Sortierregeln" }
Version{ "3.0" }
Variants{
Fallback{"en"}
}
Keys{
PHONEBOOK { "Telefonbuch-Sortierregeln" }
}
// This shouldn't be used, but valid data should be here.
// vorm. -> vormittags -> in the morning
// nachm. -> nachmittags -> in the afternoon
@ -29,6 +32,7 @@ de {
"nachm.",
}
Countries {
Fallback{ "en"}
//AD { "Andorra" }
AE { "Vereinigte Arabische Emirate" }
//AF { "Afghanistan" }
@ -341,6 +345,7 @@ de {
// further checking.
// Markus Scherer, 2000jun01
Languages {
Fallback{ "en"}
// ? aa { "Afar" }
ab { "Abchasisch" }
// same as in root? af { "Afrikaans" }

File diff suppressed because it is too large Load diff

View file

@ -7,8 +7,7 @@
// or better http://www.jtcsv.com/cgibin/icu-bugs
eo {
Version { "3.0" }
Version { "4.0" }
// collation: accented characters have primary (base character) differences
// see Jitterbug 1440 http://www.jtcsv.com/cgibin/icu-bugs?findid=1440
CollationElements {
@ -16,8 +15,14 @@ eo {
Sequence { "&C<\u0109<<<\u0108 &G<\u011d<<<\u011c &H<\u0125<<<\u0124"
"&J<\u0135<<<\u0134 &S<\u015d<<<\u015c &U<\u016d<<<\u016c" }
}
Variants{
Fallback{"en"}
}
Keys{
Fallback{"en"}
}
Countries {
Fallback{ "en"}
AT { "A\u016dstrujo" }
BE { "Belgujo" }
CA { "Kanado" }
@ -78,6 +83,7 @@ eo {
"pK",
}
Languages {
Fallback{ "en"}
da { "dana" }
de { "germana" }
el { "greka" }

View file

@ -6,13 +6,20 @@
// ***************************************************************************
es {
Version { "2.0" }
Version { "3.0" }
CollationElements {
Version { "1.0" }
Sequence { "& N < n\u0303<<< N\u0303" }
}
Variants{
Fallback{"en"}
}
Keys{
Fallback{"en"}
}
/* Duplicates from root commented out. */
Countries {
Fallback{ "en"}
AE { "Emiratos \u00C1rabes Unidos" }
AF { "Afganist\u00E1n" }
AG { "Antigua y Barbuda" }
@ -296,6 +303,7 @@ es {
}
// Spanish does not capitalize the language names like English
Languages {
Fallback{ "en"}
root{"ra\u00EDz" } // The only exception to ISO-639
af { "afrikaans" }

View file

@ -6,7 +6,7 @@
// ***************************************************************************
et {
Version{ "2.0" }
Version{ "3.0" }
CollationElements {
Version { "1.0" }
Sequence { "@& S < s\u030C<<< S\u030C < z <<< Z < z\u030C <<< Z\u030C & V"
@ -14,7 +14,15 @@ et {
" W\u0302< u\u0308 <<< U\u0308& Y < \u01B6 <<< \u01B5"
}
}
Variants{
Fallback{"en"}
}
Keys{
Fallback{"en"}
}
Countries {
Fallback{ "en"}
//AD { "Andorra" }
AE { "Araabia \u00DChendemiraadid" }
AF { "Afganistan" }
@ -256,6 +264,7 @@ et {
//ZW { "Zimbabwe" }
}
Languages {
Fallback{ "en"}
ar { "Araabia" }
bg { "Bulgaaria" }
cs { "Tiehhi" }

View file

@ -10,6 +10,13 @@ eu {
Languages {
eu { "euskara" }
}
Variants{
Fallback{"en"}
}
Keys{
Fallback{"en"}
}
DayAbbreviations {
"ig",
"al",

View file

@ -32,6 +32,7 @@ fa {
}
Countries {
Fallback{ "en"}
AD { "\u0622\u0646\u062f\u0648\u0631\u0627" }
AE { "\u0627\u0645\u0627\u0631\u0627\u062a \u0645\u062a\u062d\u062f\u0647\u200c\u06cc \u0639\u0631\u0628\u06cc" }
AF { "\u0627\u0641\u063a\u0627\u0646\u0633\u062a\u0627\u0646" }
@ -332,6 +333,7 @@ fa {
}
ExemplarCharacters {"[\u0621-\u0624\u0626-\u063a\u0641\u0642\u0644-\u0648\u064b-\u0652\u0654\u0670\u067e\u0686\u0698\u06a9\u06af\u06cc\u200c\u200d\u200f\u200e]"}
Languages {
Fallback{ "en"}
root { "\u0631\u06cc\u0634\u0647" }
aa { "\u0622\u0641\u0627\u0631\u06cc" }
ab { "\u0622\u0628\u062e\u0627\u0632\u06cc" }

View file

@ -6,7 +6,7 @@
// ***************************************************************************
fi {
Version { "2.0" }
Version { "3.0" }
CollationElements {
Version { "1.0" }
Sequence { "& V << w <<< W & Z < a\u030A <<< A\u030A< a\u0308 <<< A\u0308 "
@ -14,7 +14,15 @@ fi {
" << u\u0308 <<< U\u0308"
}
}
Variants{
Fallback{"en"}
}
Keys{
Fallback{"en"}
}
Countries {
Fallback{ "en"}
AE { "Arabiemiirikunnat" }
//AE { "Yhdistyneet Arabiemiraatit" } // Old value
AF { "Afganistan" }
@ -152,9 +160,9 @@ fi {
ZM { "Sambia" }
}
Languages {
Fallback{ "en"}
ar { "arabia" }
az { "azerbaizani" }
ba { "baski" }
be { "valkoven\u00e4j\u00e4" }
bg { "bulgaria" }
bh { "bihari" }
@ -167,12 +175,13 @@ fi {
en { "englanti" }
es { "espanja" }
et { "viro" }
eu{ "baski" }
fa { "farsi" }
fi { "suomi" }
fr { "ranska" }
he { "heprea" }
hi { "hindi" }
hr { "kroatia" }
hr { "kroaatti" }
hu { "unkari" }
id { "indonesia" }
it { "italia" }
@ -183,7 +192,7 @@ fi {
kn { "kannada" }
ko { "korea" }
ku { "kurdi" }
la { "latinalainen" }
la { "latina" }
lt { "liettua" }
lv { "latvia" }
mk { "makedonia" }
@ -200,7 +209,7 @@ fi {
sq { "albania" }
sr { "serbia" }
sv { "ruotsi" }
sw { "swahili" }
sw { "suahili" }
te { "telugu" }
th { "thai" }
tk { "tagalog" }

View file

@ -8,9 +8,17 @@
fo {
Version { "2.0" }
Languages {
Fallback{"en"}
fo { "føroyskt" }
}
Variants{
Fallback{"en"}
}
Keys{
Fallback{"en"}
}
Countries {
Fallback{"en"}
FO { "Føroyar" }
}
DayAbbreviations {

View file

@ -6,12 +6,19 @@
// ***************************************************************************
fr {
Version{"2.0"}
Version{"2.0"}
CollationElements {
Version { "1.0" }
Sequence { "[backwards 2]&A<<\u00e6/e<<<\u00c6/E" }
}
Variants{
Fallback{ "en"}
}
Keys{
Fallback{ "en"}
}
Countries {
Fallback{ "en"}
AD { "Andorre" }
AE { "Emirats Arabes Unis" }
AG { "Antigua et Barbuda" }
@ -200,6 +207,7 @@ fr {
}
Languages {
Fallback{ "en"}
root { "racine" }
ab { "abkhaze" }

View file

@ -18,7 +18,9 @@ hr {
"& Z < \u017E <<< \u017D"
}
}
Countries {
Fallback{ "en"}
AD { "Andora" }
AE { "Ujedinjeni Arapski Emirati" }
AF { "Afganistan" }
@ -260,6 +262,7 @@ hr {
ZW { "Zimbabve" }
}
Languages {
Fallback{ "en"}
ar { "arapski" }
bg { "bugarski" }
cs { "\u010De\u0161ki" }

View file

@ -16,6 +16,7 @@ hu {
"& Z < zs <<< zS <<< Zs <<< ZS" }
}
Countries {
Fallback{ "en"}
//AD { "Andorra" }
AE { "Egyes\u00FClt Arab Emir\u00E1tus" }
AF { "Afganiszt\u00E1n" }
@ -257,6 +258,7 @@ hu {
//ZW { "Zimbabwe" }
}
Languages {
Fallback{ "en"}
ar { "arab" }
bg { "bolg\u00E1r" }
cs { "cseh" }

View file

@ -8,6 +8,7 @@
it {
Version{ "2.0" }
Countries {
Fallback{ "en"}
//AD { "Andorra" }
AE { "Emirati Arabi Uniti" }
//AF { "Afghanistan" }
@ -249,6 +250,7 @@ it {
//ZW { "Zimbabwe" }
}
Languages {
Fallback{ "en"}
ar { "arabo" }
bg { "bulgaro" }
cs { "ceco" }

View file

@ -14,6 +14,7 @@ lt {
"\u0308 & Z < z\u030C <<< Z\u030C" }
}
Countries {
Fallback{ "en"}
AD { "Andora" }
AE { "Jungtiniai Arab\u0173 Emyratai" }
AF { "Afganistanas" }
@ -292,6 +293,7 @@ lt {
"po.Kr.",
}
Languages {
Fallback{ "en"}
ar { "Arab\u0173" }
bg { "Bulgar\u0173" }
cs { "\u010Cekijos" }

View file

@ -14,6 +14,7 @@ lv {
" < s\u030C <<< S\u030C & Z < z\u030C <<< Z\u030C" }
}
Countries {
Fallback{ "en"}
AD { "Andora" }
AE { "Apvienotie Ar\u0101bu Emir\u0101ti" }
AF { "Afganist\u0101na" }
@ -292,6 +293,7 @@ lv {
"m\u0113",
}
Languages {
Fallback{ "en"}
ar { "ar\u0101bu" }
bg { "bulg\u0101ru" }
cs { "\u010Dehu" }

View file

@ -21,15 +21,12 @@ mt {
Version { "1.0" } // 2002-01-15
// ShortLanguage { mlt }
// "%%PHONEBOOK" { "Bħal lista tat-telefon" }
// "%%PINYIN" { "Pinyin Order" }
// "%%TRADITIONAL" { "Traditional" }
// "%%STROKE" { "Stroke Order" }
// "%%DIRECT" { "Dritt Order" }
"%%PREEURO" { "Qabel il-Euro" }
Variants{
PREEURO { "Qabel il-Euro" }
}
// Duplicate data has been commented out.
Languages {
Fallback{ "en"}
root { "Għerq" } // the root locale
//------------------------------------------------
//aa { "Afar" } // Afar
@ -470,6 +467,7 @@ mt {
// Duplicate data has been commented out.
Countries {
Fallback{ "en"}
//AD { "Andorra" } // Andorra
AE { "Emirati Għarab Maqgħuda" } // United Arab Emirates
AF { "Afganistan" } // Afghanistan

View file

@ -14,7 +14,14 @@ nb {
"V<<< w<<< W"
}
}
Variants{
Fallback{"en"}
}
Keys{
Fallback{ "en" }
}
Countries {
Fallback{ "en"}
//AD { "Andorra" }
AE { "De forente arabiske emiratene" }
//AF { "Afghanistan" }
@ -289,6 +296,7 @@ nb {
"l\u00F8rdag",
}
Languages {
Fallback{ "en"}
ar { "Arabisk" }
bg { "Bulgarsk" }
cs { "Tsjekkisk" }

View file

@ -8,6 +8,7 @@
nl {
Version { "2.0" }
Countries {
Fallback{ "en"}
//AD { "Andorra" }
AE { "Verenigde Arabische Emiraten" }
//AF { "Afghanistan" }
@ -287,6 +288,7 @@ nl {
}
ExemplarCharacters { "[a-z \u00e1 \u00e9 \u00ed \u00f3 \u00fa \u00e4 \u00eb \u00ef \u00f6 \u00fc \u0133]" }
Languages {
Fallback{ "en"}
ar { "Arabisch" }
bg { "Bulgaars" }
cs { "Tsjechisch" }

View file

@ -13,6 +13,12 @@ nn{
" < o\u0308<<< O\u0308< o\u030B<<< O\u030B < a\u030A<<< A\u030A<<< aa <<< aA <<< Aa <<< AA & "
"V<<< w<<< W" }
}
Variants{
Fallback{"en"}
}
Keys{
Fallback{ "en" }
}
Countries {
NO { "Noreg" }
}

View file

@ -19,6 +19,7 @@ pl {
"&Z < z\u0301 <<< Z\u0301 < z\u0307 <<< Z\u0307" }
}
Countries {
Fallback{ "en"}
AD { "Andora" }
AE { "Zjednoczone Emiraty Arabskie" }
AF { "Afganistan" }
@ -297,6 +298,7 @@ pl {
"n.e.",
}
Languages {
Fallback{ "en"}
ar { "arabski" }
bg { "bu\u0142garski" }
cs { "czeski" }

View file

@ -10,6 +10,7 @@
pt {
Version { "2.0" }
Countries {
Fallback{ "en"}
//AD { "Andorra" }
AE { "Emirados \u00C1rabes Unidos" }
AF { "Afeganist\u00E3o" }
@ -464,6 +465,7 @@ pt {
}
ExemplarCharacters { "[a-z \u00e3 \u00f5 \u00e7 \u00e1 \u00e9 \u00ed \u00f3 \u00fa \u00e0 \u00e2 \u00ea \u00f4 \u00fc \u00f2]" }
Languages {
Fallback{ "en"}
ar { "ar\u00E1bico" }
az { "azerbaij\u00E3o" }
ba { "basco" }

View file

@ -14,6 +14,7 @@ ro {
"Z\u0307" }
}
Countries {
Fallback{ "en"}
//AD { "Andorra" }
AE { "Emiratele Arabe Unite" }
AF { "Afganistan" }
@ -289,6 +290,7 @@ ro {
"\u00EE.d.C.",
}
Languages {
Fallback{ "en"}
ar { "Arab\u0103" }
bg { "Bulgar\u0103" }
cs { "Ceh\u0103" }

File diff suppressed because it is too large Load diff

View file

@ -19,6 +19,7 @@ sh {
}
}
Countries {
Fallback{ "en"}
AF { "Avganistan" }
AL { "Albanija" }
DZ { "Al\u017Eir" }
@ -241,6 +242,7 @@ sh {
"n. e.",
}
Languages {
Fallback{ "en"}
af { "Afrikanerski" }
sq { "Albanski" }
ar { "Arapski" }

View file

@ -15,6 +15,7 @@ sk {
" & Z < z\u030C <<< Z\u030C < z\u0307 <<< Z\u0307" }
}
Countries {
Fallback{ "en"}
//AD { "Andorra" }
AE { "Spojen\u00E9 arabsk\u00E9 emir\u00E1ty" }
AF { "Afganistan" }
@ -290,6 +291,7 @@ sk {
"n.l.",
}
Languages {
Fallback{ "en"}
ar { "arabsk\u00FD" }
bg { "bulharsk\u00FD" }
cs { "\u010Desk\u00FD" }

View file

@ -16,6 +16,7 @@ sl {
// " z\u030C <<< Z\u030C < z\u0301 <<< Z\u0301 < z\u0307 <<< Z\u0307 " }
}
Countries {
Fallback{ "en"}
AD { "Andora" }
AE { "Zdru\u017Eeni arabski emirati" }
AF { "Afganistan" }
@ -290,6 +291,7 @@ sl {
"po Kr.",
}
Languages {
Fallback{ "en"}
ar { "Arab\u0161\u010Dina" }
bg { "Bolgar\u0161\u010Dina" }
cs { "\u010Ce\u0161\u010Dina" }

View file

@ -19,6 +19,7 @@ sv {
}
}
Countries {
Fallback{ "en"}
// AD {"Andorra"}
AE {"F\u00F6renade Arabemiraten"}
AF {"Afganistan"}
@ -296,6 +297,7 @@ sv {
}
Languages {
Fallback{ "en"}
aa {"afar"}
ab {"abkhaziska"}
ace {"achinese"}

View file

@ -19,6 +19,7 @@ tr {
"& U < u\u0308 <<< U\u0308" }
}
Countries {
Fallback{ "en"}
AD { "Andora" }
AE { "Birle\u015Fik Arap Emirlikleri" }
AF { "Afganistan" }
@ -293,6 +294,7 @@ tr {
"Cumartesi",
}
Languages {
Fallback{ "en"}
ar { "Arap\u00E7a" }
bg { "Bulgarca" }
cs { "\u00C7ek\u00E7e" }

View file

@ -7,8 +7,10 @@
zh {
Version{ "2.0" }
"%%PINYIN" { "\u62FC\u97F3\u987a\u5e8f" }
"%%STROKE" { "\u7b14\u5212\u987a\u5e8f" } // Simplified Chinese name.
Variants{
PINYIN { "\u62FC\u97F3\u987a\u5e8f" }
STROKE { "\u7b14\u5212\u987a\u5e8f" } // Simplified Chinese name.
}
AmPmMarkers {
"\u4E0A\u5348",
"\u4E0B\u5348",

View file

@ -7,7 +7,9 @@
zh_TW {
Version{ "2.0" }
"%%STROKE" { "\u7B46\u5283\u987a\u5e8f" } // Traditional Chinese.
Variants{
STROKE { "\u7B46\u5283\u987a\u5e8f" } // Traditional Chinese.
}
CollationElements {
Version { "1.0" }
Sequence { "&[top]<\u5159<\u515B<\u515E<\u515D<\u5161<\u5163<\u55E7<\u74E9<\u7CCE<\u4E00<\u4E59"

View file

@ -100,14 +100,14 @@ static const char* rawData2[LOCALE_INFO_SIZE][LOCALE_SIZE] = {
"\\u039d\\u03bf\\u03c1\\u03b2\\u03b7\\u03b3\\u03af\\u03b1"
},
/* display variant (Greek) */
{ "", "", "", "", "Nynorsk" },
{ "", "", "", "", "NY" }, /* TODO: currently there is no translation for NY in Greek fix this test when we have it */
/* display name (Greek) */
{
"\\u0391\\u03b3\\u03b3\\u03bb\\u03b9\\u03ba\\u03ac (\\u0397\\u03bd\\u03c9\\u03bc\\u03ad\\u03bd\\u03b5\\u03c2 \\u03a0\\u03bf\\u03bb\\u03b9\\u03c4\\u03b5\\u03af\\u03b5\\u03c2)",
"\\u0393\\u03b1\\u03bb\\u03bb\\u03b9\\u03ba\\u03ac (\\u0393\\u03b1\\u03bb\\u03bb\\u03af\\u03b1)",
"\\u039a\\u03b1\\u03c4\\u03b1\\u03bb\\u03b1\\u03bd\\u03b9\\u03ba\\u03ac (\\u0399\\u03c3\\u03c0\\u03b1\\u03bd\\u03af\\u03b1)",
"\\u0395\\u03bb\\u03bb\\u03b7\\u03bd\\u03b9\\u03ba\\u03ac (\\u0395\\u03bb\\u03bb\\u03ac\\u03b4\\u03b1)",
"\\u039d\\u03bf\\u03c1\\u03b2\\u03b7\\u03b3\\u03b9\\u03ba\\u03ac (\\u039d\\u03bf\\u03c1\\u03b2\\u03b7\\u03b3\\u03af\\u03b1, Nynorsk)"
"\\u039d\\u03bf\\u03c1\\u03b2\\u03b7\\u03b3\\u03b9\\u03ba\\u03ac (\\u039d\\u03bf\\u03c1\\u03b2\\u03b7\\u03b3\\u03af\\u03b1, NY)"
}
};
@ -163,7 +163,7 @@ void addLocaleTest(TestNode** root)
addTest(root, &TestUninstalledISO3Names, "tsutil/cloctst/TestUninstalledISO3Names");
addTest(root, &TestSimpleDisplayNames, "tsutil/cloctst/TestSimpleDisplayNames");
addTest(root, &TestVariantParsing, "tsutil/cloctst/TestVariantParsing");
addTest(root, &TestLocaleStructure, "tsutil/cloctst/TestLocaleStructure");
/*addTest(root, &TestLocaleStructure, "tsutil/cloctst/TestLocaleStructure");*/
addTest(root, &TestConsistentCountryInfo,"tsutil/cloctst/TestConsistentCountryInfo");
addTest(root, &VerifyTranslation, "tsutil/cloctst/VerifyTranslation");
}
@ -461,9 +461,10 @@ cleanUpDataTable();
static void TestDisplayNames()
{
UChar buffer[100];
UErrorCode errorCode;
UErrorCode errorCode=U_ZERO_ERROR;
int32_t length;
UChar temp[500];
int32_t maxresultsize=uloc_getDisplayVariant("no_NO_NY", "en_US", temp, 500, &errorCode);
log_verbose("Testing getDisplayName for different locales\n");
log_verbose(" In locale = en_US...\n");

View file

@ -403,6 +403,7 @@ static void TestFallback()
{
UErrorCode status = U_ZERO_ERROR;
UResourceBundle *fr_FR = NULL;
UResourceBundle *subResource = NULL;
const UChar *junk; /* ignored */
int32_t resultLen;
@ -426,13 +427,13 @@ static void TestFallback()
status = U_ZERO_ERROR;
/* OK first one. This should be a Default value. */
junk = ures_getStringByKey(fr_FR, "%%PREEURO", &resultLen, &status);
subResource = ures_getByKey(fr_FR, "LocaleScript", NULL, &status);
if(status != U_USING_DEFAULT_WARNING)
{
log_data_err("Expected U_USING_DEFAULT_ERROR when trying to get %%PREEURO from fr_FR, got %s\n",
log_data_err("Expected U_USING_DEFAULT_ERROR when trying to get LocaleScript from fr_FR, got %s\n",
u_errorName(status));
}
ures_close(subResource);
status = U_ZERO_ERROR;
/* and this is a Fallback, to fr */

View file

@ -1817,6 +1817,7 @@ static void TestFallback()
{
UErrorCode status = U_ZERO_ERROR;
UResourceBundle *fr_FR = NULL;
UResourceBundle *subResource = NULL;
const UChar *junk; /* ignored */
int32_t resultLen;
@ -1840,14 +1841,15 @@ static void TestFallback()
status = U_ZERO_ERROR;
/* OK first one. This should be a Default value. */
junk = ures_getStringByKey(fr_FR, "%%PREEURO", &resultLen, &status);
subResource = ures_getByKey(fr_FR, "LocaleScript", NULL, &status);
if(status != U_USING_DEFAULT_WARNING)
{
log_data_err("Expected U_USING_DEFAULT_ERROR when trying to get %%PREEURO from fr_FR, got %s\n",
log_data_err("Expected U_USING_DEFAULT_ERROR when trying to get LocaleScript from fr_FR, got %s\n",
u_errorName(status));
}
status = U_ZERO_ERROR;
ures_close(subResource);
/* and this is a Fallback, to fr */
junk = ures_getStringByKey(fr_FR, "DayNames", &resultLen, &status);

View file

@ -81,13 +81,13 @@ const char* rawData[27][7] = {
""
},
// display variant (Greek)
{ "", "", "", "", "", "", "" },
{ "", "", "", "", "NY" }, /* TODO: currently there is no translation for NY in Greek fix this test when we have it */
// display name (Greek)[actual values listed below]
{ "\\u0391\\u03b3\\u03b3\\u03bb\\u03b9\\u03ba\\u03ac (\\u0397\\u03BD\\u03C9\\u03BC\\u03AD\\u03BD\\u03B5\\u03C2 \\u03A0\\u03BF\\u03BB\\u03B9\\u03C4\\u03B5\\u03AF\\u03B5\\u03C2)",
"\\u0393\\u03b1\\u03bb\\u03bb\\u03b9\\u03ba\\u03ac (\\u0393\\u03b1\\u03bb\\u03bb\\u03af\\u03b1)",
"\\u039a\\u03b1\\u03c4\\u03b1\\u03bb\\u03b1\\u03bd\\u03b9\\u03ba\\u03ac (\\u0399\\u03c3\\u03c0\\u03b1\\u03bd\\u03af\\u03b1)",
"\\u0395\\u03bb\\u03bb\\u03b7\\u03bd\\u03b9\\u03ba\\u03ac (\\u0395\\u03bb\\u03bb\\u03ac\\u03b4\\u03b1)",
"\\u039d\\u03bf\\u03c1\\u03b2\\u03b7\\u03b3\\u03b9\\u03ba\\u03ac (\\u039d\\u03bf\\u03c1\\u03b2\\u03b7\\u03b3\\u03af\\u03b1, Nynorsk)",
"\\u039d\\u03bf\\u03c1\\u03b2\\u03b7\\u03b3\\u03b9\\u03ba\\u03ac (\\u039d\\u03bf\\u03c1\\u03b2\\u03b7\\u03b3\\u03af\\u03b1, NY)",
"",
""
},
@ -977,17 +977,18 @@ LocaleTest::TestAtypicalLocales()
"Suecia",
CharsToUnicodeString("Rep\\u00FAblica Dominicana"),
CharsToUnicodeString("B\\u00E9lgica") };
UnicodeString arabicDisplayNames [] = { "German (Canada)",
"Japanese (South Africa)",
"Russian (Mexico)",
"English (France)",
"Spanish (Germany)",
"Croatia",
"Sweden",
"Dominican Republic",
"Belgium" };
// De-Anglicizing root required the change from
// English display names to ISO Codes - ram 2003/09/26
UnicodeString arabicDisplayNames [] = { "de (CA)",
"ja (ZA)",
"ru (MX)",
"en (FR)",
"es (DE)",
"HR",
"SE",
"DO",
"BE" };
int32_t i;
UErrorCode status = U_ZERO_ERROR;
Locale::setDefault(Locale::getUS(), status);