ICU-10222 (J) Integrate CLDR data snapshot for ICU 52.0.1; add calendar types

X-SVN-Rev: 33888
This commit is contained in:
Peter Edberg 2013-07-08 06:31:43 +00:00
parent 1358964c56
commit 8d826958fd
11 changed files with 50 additions and 40 deletions

View File

@ -1737,6 +1737,9 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
"ethiopic-amete-alem",
"iso8601",
"dangi",
"islamic-umalqura",
"islamic-tbla",
"islamic-rgsa",
};
// must be in the order of calTypes above
@ -1755,6 +1758,9 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
private static final int CALTYPE_ETHIOPIC_AMETE_ALEM = 12;
private static final int CALTYPE_ISO8601 = 13;
private static final int CALTYPE_DANGI = 14;
private static final int CALTYPE_ISLAMIC_UMALQURA = 15;
private static final int CALTYPE_ISLAMIC_TBLA = 16;
private static final int CALTYPE_ISLAMIC_RGSA = 17;
private static final int CALTYPE_UNKNOWN = -1;
private static int getCalendarTypeForLocale(ULocale l) {
@ -1908,6 +1914,10 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
cal.setFirstDayOfWeek(MONDAY);
cal.setMinimalDaysInFirstWeek(4);
break;
case CALTYPE_ISLAMIC_UMALQURA:
case CALTYPE_ISLAMIC_TBLA:
case CALTYPE_ISLAMIC_RGSA:
// Need to add handling for these, meanwhile fall through to default
default:
// we must not get here, because unknown type is mapped to
// Gregorian at the beginning of this method.

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0352a7cd40c8dcc7fa514d0ae5ae7eb1dccd4c0b1705cc7812c0789056aee4c0
size 10578542
oid sha256:048f0d3eaa196b1afbdb399a149ed96144b681d2884ed820569f71eac5298f2e
size 10961591

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ee9e2b3884dcfd3d4905d0005280aa429b8b1846667f9abb475157cd6fc3f3d0
size 98429
oid sha256:0192d7e53c53db98068f2ccf0130011177aabe8a98eba6541642aa181d136b12
size 98415

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:afe332a33bed44b1fe7ae0665c82cbd68f6fac9d83dedf1d03a84780f021c56a
size 724582
oid sha256:d08aec73aa20b1669db6e144039aae4bd6357e39e8445986c02be057c169e7f1
size 725607

View File

@ -444,22 +444,22 @@ public class CollationServiceTest extends TestFmwk {
public void TestGetKeywordValues(){
final String[][] PREFERRED = {
{"und", "standard", "search"},
{"en_US", "standard", "search"},
{"en_029", "standard", "search"},
{"de_DE", "standard", "phonebook", "search"},
{"de_Latn_DE", "standard", "phonebook", "search"},
{"zh", "pinyin", "big5han", "gb2312han", "stroke", "zhuyin", "search", "standard"},
{"zh_Hans", "pinyin", "big5han", "gb2312han", "stroke", "zhuyin", "search", "standard"},
{"zh_CN", "pinyin", "big5han", "gb2312han", "stroke", "zhuyin", "search", "standard"},
{"zh_Hant", "stroke", "big5han", "gb2312han", "pinyin", "zhuyin", "search", "standard"},
{"zh_TW", "stroke", "big5han", "gb2312han", "pinyin", "zhuyin", "search", "standard"},
{"zh__PINYIN", "pinyin", "big5han", "gb2312han", "stroke", "zhuyin", "search", "standard"},
{"es_ES", "standard", "search", "traditional"},
{"es__TRADITIONAL", "traditional", "search", "standard"},
{"und@collation=phonebook", "standard", "search"},
{"de_DE@collation=big5han", "standard", "phonebook", "search"},
{"zzz@collation=xxx", "standard", "search"},
{"und", "standard", "eor", "search"},
{"en_US", "standard", "eor", "search"},
{"en_029", "standard", "eor", "search"},
{"de_DE", "standard", "phonebook", "search", "eor"},
{"de_Latn_DE", "standard", "phonebook", "search", "eor"},
{"zh", "pinyin", "big5han", "gb2312han", "stroke", "zhuyin", "eor", "search", "standard"},
{"zh_Hans", "pinyin", "big5han", "gb2312han", "stroke", "zhuyin", "eor", "search", "standard"},
{"zh_CN", "pinyin", "big5han", "gb2312han", "stroke", "zhuyin", "eor", "search", "standard"},
{"zh_Hant", "stroke", "big5han", "gb2312han", "pinyin", "zhuyin", "eor", "search", "standard"},
{"zh_TW", "stroke", "big5han", "gb2312han", "pinyin", "zhuyin", "eor", "search", "standard"},
{"zh__PINYIN", "pinyin", "big5han", "gb2312han", "stroke", "zhuyin", "eor", "search", "standard"},
{"es_ES", "standard", "search", "traditional", "eor"},
{"es__TRADITIONAL", "traditional", "search", "standard", "eor"},
{"und@collation=phonebook", "standard", "eor", "search"},
{"de_DE@collation=big5han", "standard", "phonebook", "search", "eor"},
{"zzz@collation=xxx", "standard", "eor", "search"},
};
for (int i = 0; i < PREFERRED.length; i++) {

View File

@ -2109,14 +2109,14 @@ public class CalendarRegression extends com.ibm.icu.dev.test.TestFmwk {
{"th_TH", "buddhist", "gregorian"},
{"und_TH", "buddhist", "gregorian"},
{"en_TH", "buddhist", "gregorian"},
{"he_IL", "gregorian", "hebrew", "islamic", "islamic-civil"},
{"ar_EG", "gregorian", "coptic", "islamic", "islamic-civil"},
{"he_IL", "gregorian", "hebrew", "islamic", "islamic-civil", "islamic-tbla"},
{"ar_EG", "gregorian", "coptic", "islamic", "islamic-civil", "islamic-tbla"},
{"ja", "gregorian", "japanese"},
{"ps_Guru_IN", "gregorian", "indian"},
{"th@calendar=gregorian", "buddhist", "gregorian"},
{"en@calendar=islamic", "gregorian"},
{"zh_TW", "gregorian", "roc", "chinese"},
{"ar_IR", "persian", "gregorian", "islamic", "islamic-civil"},
{"ar_IR", "persian", "gregorian", "islamic", "islamic-civil", "islamic-tbla"},
};
String[] ALL = Calendar.getKeywordValuesForLocale("calendar", ULocale.getDefault(), false);

View File

@ -3998,12 +3998,12 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
}
};
final MonthPatternItem[] items = {
new MonthPatternItem( "root@calendar=chinese", DateFormat.LONG, "ren-chen Month4 2", "ren-chen Month4bis 2", "ren-chen Month5 2" ),
new MonthPatternItem( "root@calendar=chinese", DateFormat.LONG, "ren-chen M04 2", "ren-chen M04bis 2", "ren-chen M05 2" ),
new MonthPatternItem( "root@calendar=chinese", DateFormat.SHORT, "29-04-02", "29-04bis-02", "29-05-02" ),
new MonthPatternItem( "root@calendar=chinese", -1, "29-4-2", "29-4bis-2", "29-5-2" ),
new MonthPatternItem( "root@calendar=chinese", -2, "78x29-4-2", "78x29-4bis-2", "78x29-5-2" ),
new MonthPatternItem( "root@calendar=chinese", -3, "ren-chen-4-2", "ren-chen-4bis-2", "ren-chen-5-2" ),
new MonthPatternItem( "root@calendar=chinese", -4, "ren-chen Month4 2", "ren-chen Month4bis 2", "ren-chen Month5 2" ),
new MonthPatternItem( "root@calendar=chinese", -4, "ren-chen M04 2", "ren-chen M04bis 2", "ren-chen M05 2" ),
new MonthPatternItem( "en@calendar=gregorian", -3, "2012-4-22", "2012-5-22", "2012-6-20" ),
new MonthPatternItem( "en@calendar=chinese", DateFormat.LONG, "Month4 2, ren-chen", "Month4bis 2, ren-chen", "Month5 2, ren-chen" ),
new MonthPatternItem( "en@calendar=chinese", DateFormat.SHORT, "4/2/29", "4bis/2/29", "5/2/29" ),

View File

@ -130,7 +130,7 @@ public class DateIntervalFormatTest extends com.ibm.icu.dev.test.TestFmwk {
"en", "2007 10 10 10:10:10", "2007 11 10 10:10:10", "dMMMM", "October 10 \\u2013 November 10",
"en", "2007 10 10 10:10:10", "2007 11 10 10:10:10", "MMMMy", "October\\u2013November 2007",
"en", "2007 10 10 10:10:10", "2007 11 10 10:10:10", "MMMMy", "October \\u2013 November 2007",
"en", "2007 10 10 10:10:10", "2007 11 10 10:10:10", "EEEEdMMMM", "Wednesday, October 10 \\u2013 Saturday, November 10",
@ -416,7 +416,7 @@ public class DateIntervalFormatTest extends com.ibm.icu.dev.test.TestFmwk {
"zh", "2007 10 10 10:10:10", "2007 11 10 10:10:10", "EEEEdMMMM", "10\\u670810\\u65e5\\u661f\\u671f\\u4e09\\u81f311\\u670810\\u65e5\\u661f\\u671f\\u516d",
"zh", "2007 10 10 10:10:10", "2007 11 10 10:10:10", "hmv", "2007/10/10 \\u4E0A\\u534810:10 \\u6D1B\\u6749\\u77F6\\u65F6\\u95F4 \\u2013 2007/11/10 \\u4E0A\\u534810:10 \\u6D1B\\u6749\\u77F6\\u65F6\\u95F4",
"zh", "2007 10 10 10:10:10", "2007 11 10 10:10:10", "hmv", "2007/10/10 \\u6D1B\\u6749\\u77F6\\u65F6\\u95F4\\u4E0A\\u534810:10 \\u2013 2007/11/10 \\u6D1B\\u6749\\u77F6\\u65F6\\u95F4\\u4E0A\\u534810:10",
"zh", "2007 11 10 10:10:10", "2007 11 20 10:10:10", "EEEEdMMMMy", "2007\\u5e7411\\u670810\\u65e5\\u661f\\u671f\\u516d\\u81f320\\u65e5\\u661f\\u671f\\u4e8c",
@ -449,7 +449,7 @@ public class DateIntervalFormatTest extends com.ibm.icu.dev.test.TestFmwk {
"zh", "2007 11 10 10:10:10", "2007 11 20 10:10:10", "MMMM", "\\u5341\\u4E00\\u6708", // (fixed expected result per ticket 6872<-6626 and others)
"zh", "2007 11 10 10:10:10", "2007 11 20 10:10:10", "hmz", "2007/11/10 \\u4e0a\\u534810:10 GMT-8 \\u2013 2007/11/20 \\u4e0a\\u534810:10 GMT-8",
"zh", "2007 11 10 10:10:10", "2007 11 20 10:10:10", "hmz", "2007/11/10 GMT-8\\u4e0a\\u534810:10 \\u2013 2007/11/20 GMT-8\\u4e0a\\u534810:10",
"zh", "2007 11 10 10:10:10", "2007 11 20 10:10:10", "h", "2007/11/10 \\u4e0a\\u534810\\u65f6 \\u2013 2007/11/20 \\u4e0a\\u534810\\u65f6",
@ -475,7 +475,7 @@ public class DateIntervalFormatTest extends com.ibm.icu.dev.test.TestFmwk {
"zh", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "h", "\\u4e0a\\u534810\\u65f6",
"zh", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "hz", "\\u4e0a\\u534810\\u65f6 GMT-8",
"zh", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "hz", "GMT-8\\u4e0a\\u534810\\u65f6",
"zh", "2007 01 10 10:10:10", "2007 01 10 10:10:20", "EEEEdMMMMy", "2007\\u5e741\\u670810\\u65e5\\u661f\\u671f\\u4e09", // (fixed expected result per ticket 6872<-6626)

View File

@ -361,7 +361,7 @@ public class DateTimeGeneratorTest extends TestFmwk {
new String[] {"Md", "1/13"},
new String[] {"MMMd", "1\u670813\u65E5"},
new String[] {"MMMMd", "1\u670813\u65E5"},
new String[] {"yQQQ", "1999/1Q"}, // now current data produces y/QQQ => 1999/1Q
new String[] {"yQQQ", "1999\u5E741Q"},
new String[] {"hhmm", "\u5348\u5F8C11:58"},
new String[] {"HHmm", "23:58"},
new String[] {"jjmm", "23:58"},
@ -378,7 +378,7 @@ public class DateTimeGeneratorTest extends TestFmwk {
new String[] {"Md", "1/13"},
new String[] {"MMMd", "1\u670813\u65E5"},
new String[] {"MMMMd", "1\u670813\u65E5"},
new String[] {"yQQQ", "\u5E73\u621011/1Q"},
new String[] {"yQQQ", "\u5E73\u6210 11 1Q"}, // (probably a CLDR error)
new String[] {"hhmm", "\u5348\u5F8C11:58"},
new String[] {"HHmm", "23:58"},
new String[] {"jjmm", "23:58"},

View File

@ -500,7 +500,7 @@ public class NumberFormatTest extends com.ibm.icu.dev.test.TestFmwk {
// format result using PLURALCURRENCYSTYLE,
{"en_US", "1", "USD", "$1.00", "USD1.00", "1.00 US dollar"},
{"en_US", "1234.56", "USD", "$1,234.56", "USD1,234.56", "1,234.56 US dollars"},
{"en_US", "-1234.56", "USD", "($1,234.56)", "(USD1,234.56)", "-1,234.56 US dollars"},
{"en_US", "-1234.56", "USD", "-$1,234.56", "-USD1,234.56", "-1,234.56 US dollars"},
{"zh_CN", "1", "USD", "US$1.00", "USD1.00", "1.00\u7F8E\u5143"},
{"zh_CN", "1234.56", "USD", "US$1,234.56", "USD1,234.56", "1,234.56\u7F8E\u5143"},
{"zh_CN", "1", "CNY", "\uFFE51.00", "CNY1.00", "1.00\u4EBA\u6C11\u5E01"},

View File

@ -1045,13 +1045,13 @@ public class ULocaleTest extends TestFmwk {
final TestContextItem[] items = {
new TestContextItem( "da", DisplayContext.STANDARD_NAMES, DisplayContext.CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE, "en", "engelsk" ),
new TestContextItem( "da", DisplayContext.STANDARD_NAMES, DisplayContext.CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, "en", "Engelsk" ),
new TestContextItem( "da", DisplayContext.STANDARD_NAMES, DisplayContext.CAPITALIZATION_FOR_UI_LIST_OR_MENU, "en", "engelsk" ),
new TestContextItem( "da", DisplayContext.STANDARD_NAMES, DisplayContext.CAPITALIZATION_FOR_UI_LIST_OR_MENU, "en", "Engelsk" ),
new TestContextItem( "da", DisplayContext.STANDARD_NAMES, DisplayContext.CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE, "en_US", "engelsk (USA)" ),
new TestContextItem( "da", DisplayContext.STANDARD_NAMES, DisplayContext.CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, "en_US", "Engelsk (USA)" ),
new TestContextItem( "da", DisplayContext.STANDARD_NAMES, DisplayContext.CAPITALIZATION_FOR_UI_LIST_OR_MENU, "en_US", "engelsk (USA)" ),
new TestContextItem( "da", DisplayContext.STANDARD_NAMES, DisplayContext.CAPITALIZATION_FOR_UI_LIST_OR_MENU, "en_US", "Engelsk (USA)" ),
new TestContextItem( "da", DisplayContext.DIALECT_NAMES, DisplayContext.CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE, "en_US", "amerikansk engelsk" ),
new TestContextItem( "da", DisplayContext.DIALECT_NAMES, DisplayContext.CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, "en_US", "Amerikansk engelsk" ),
new TestContextItem( "da", DisplayContext.DIALECT_NAMES, DisplayContext.CAPITALIZATION_FOR_UI_LIST_OR_MENU, "en_US", "amerikansk engelsk" ),
new TestContextItem( "da", DisplayContext.DIALECT_NAMES, DisplayContext.CAPITALIZATION_FOR_UI_LIST_OR_MENU, "en_US", "Amerikansk engelsk" ),
new TestContextItem( "es", DisplayContext.STANDARD_NAMES, DisplayContext.CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE, "en", "ingl\u00E9s" ),
new TestContextItem( "es", DisplayContext.STANDARD_NAMES, DisplayContext.CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, "en", "Ingl\u00E9s" ),
new TestContextItem( "es", DisplayContext.STANDARD_NAMES, DisplayContext.CAPITALIZATION_FOR_UI_LIST_OR_MENU, "en", "Ingl\u00E9s" ),
@ -1324,7 +1324,7 @@ public class ULocaleTest extends TestFmwk {
h[0].put("japanese", "Japanese Calendar");
h[0].put("buddhist", "Buddhist Calendar");
h[0].put("islamic", "Islamic Calendar");
h[0].put("islamic-civil", "Islamic-Civil Calendar" );
h[0].put("islamic-civil", "Islamic Calendar [tabular, civil epoch]" );
h[0].put("hebrew", "Hebrew Calendar");
h[0].put("chinese", "Chinese Calendar");
h[0].put("gregorian", "Gregorian Calendar" );
@ -3166,8 +3166,8 @@ public class ULocaleTest extends TestFmwk {
"zh_HK"
}, {
"zh_Hani",
"zh_Hans_CN",
"zh"
"zh_Hani_CN",
"zh_Hani"
}, {
"zh_Hant",
"zh_Hant_TW",