summaryrefslogtreecommitdiffstats
path: root/icu4c
diff options
context:
space:
mode:
authorFredrik Roubert <roubert@google.com>2015-03-03 18:14:45 +0100
committerFredrik Roubert <roubert@google.com>2015-03-20 15:18:53 +0100
commit1c16f7233e0ce0965f835ec0c509d30699d7161a (patch)
tree501930d158a268a46175bc422837addb121a4953 /icu4c
parentaa5133a3e7ad3a74c457bbdc2b74cf343ba3f959 (diff)
downloadandroid_external_icu-1c16f7233e0ce0965f835ec0c509d30699d7161a.tar.gz
android_external_icu-1c16f7233e0ce0965f835ec0c509d30699d7161a.tar.bz2
android_external_icu-1c16f7233e0ce0965f835ec0c509d30699d7161a.zip
Android patch: CLDR data: Force default Gregorian calendar.
This change was introduced in Android by this patch: https://android.googlesource.com/platform/external/icu/+/b844b3e And then amended by the ICU52 upgrade: https://android.googlesource.com/platform/external/icu/+/59d709d Change-Id: I93f7850b1a3ab17d53e97a4b3152e878e2985d20
Diffstat (limited to 'icu4c')
-rw-r--r--icu4c/source/data/locales/fa.txt2
-rw-r--r--icu4c/source/data/locales/ps.txt2
-rw-r--r--icu4c/source/data/locales/th.txt2
-rw-r--r--icu4c/source/data/misc/supplementalData.txt12
-rw-r--r--icu4c/source/test/cintltst/ccaltst.c16
-rw-r--r--icu4c/source/test/intltest/dtfmttst.cpp4
-rw-r--r--icu4c/source/test/intltest/dtifmtts.cpp28
-rw-r--r--icu4c/source/test/intltest/incaltst.cpp6
8 files changed, 42 insertions, 30 deletions
diff --git a/icu4c/source/data/locales/fa.txt b/icu4c/source/data/locales/fa.txt
index 9d2f454c2..b09bcd05c 100644
--- a/icu4c/source/data/locales/fa.txt
+++ b/icu4c/source/data/locales/fa.txt
@@ -204,7 +204,7 @@ fa{
}
}
}
- default{"persian"}
+ default{"gregorian"} // android-changed
generic{
DateTimePatterns{
"H:mm:ss (zzzz)",
diff --git a/icu4c/source/data/locales/ps.txt b/icu4c/source/data/locales/ps.txt
index 73b805bc3..17e8777f9 100644
--- a/icu4c/source/data/locales/ps.txt
+++ b/icu4c/source/data/locales/ps.txt
@@ -40,7 +40,7 @@ ps{
}
Version{"2.1.6.69"}
calendar{
- default{"persian"}
+ default{"gregorian"} // android-changed
generic{
DateTimePatterns{
"H:mm:ss (zzzz)",
diff --git a/icu4c/source/data/locales/th.txt b/icu4c/source/data/locales/th.txt
index 4d9341d58..62f9cdd12 100644
--- a/icu4c/source/data/locales/th.txt
+++ b/icu4c/source/data/locales/th.txt
@@ -858,7 +858,7 @@ th{
}
}
}
- default{"buddhist"}
+ default{"gregorian"} // android-changed
ethiopic{
monthNames{
format{
diff --git a/icu4c/source/data/misc/supplementalData.txt b/icu4c/source/data/misc/supplementalData.txt
index d8b4ef1ef..7a6315024 100644
--- a/icu4c/source/data/misc/supplementalData.txt
+++ b/icu4c/source/data/misc/supplementalData.txt
@@ -5549,8 +5549,10 @@ supplementalData:table(nofallback){
"islamic-tbla",
}
AF{
- "persian",
+// BEGIN android-changed
"gregorian",
+ "persian",
+// END android-changed
"islamic",
"islamic-civil",
"islamic-tbla",
@@ -5627,8 +5629,10 @@ supplementalData:table(nofallback){
"islamic-tbla",
}
IR{
- "persian",
+// BEGIN android-changed
"gregorian",
+ "persian",
+// END android-changed
"islamic",
"islamic-civil",
"islamic-tbla",
@@ -5736,8 +5740,10 @@ supplementalData:table(nofallback){
"islamic-tbla",
}
TH{
- "buddhist",
+// BEGIN android-changed
"gregorian",
+ "buddhist",
+// END android-changed
}
TN{
"gregorian",
diff --git a/icu4c/source/test/cintltst/ccaltst.c b/icu4c/source/test/cintltst/ccaltst.c
index 4571cda1b..b717dfbdf 100644
--- a/icu4c/source/test/cintltst/ccaltst.c
+++ b/icu4c/source/test/cintltst/ccaltst.c
@@ -82,7 +82,8 @@ static const UCalGetTypeTest ucalGetTypeTests[] = {
{ "en_US", UCAL_GREGORIAN, "gregorian" },
{ "ja_JP@calendar=japanese", UCAL_DEFAULT, "japanese" },
{ "th_TH", UCAL_GREGORIAN, "gregorian" },
- { "th_TH", UCAL_DEFAULT, "buddhist" },
+ { "th_TH", UCAL_DEFAULT, "gregorian" }, // android-changed
+ // { "th_TH", UCAL_DEFAULT, "buddhist" },
{ "th-TH-u-ca-gregory", UCAL_DEFAULT, "gregorian" },
{ "ja_JP@calendar=japanese", UCAL_GREGORIAN, "gregorian" },
{ "", UCAL_GREGORIAN, "gregorian" },
@@ -1553,17 +1554,20 @@ static void TestGetKeywordValuesForLocale() {
{ "und", "gregorian", NULL, NULL, NULL, NULL },
{ "en_US", "gregorian", NULL, NULL, NULL, NULL },
{ "en_029", "gregorian", NULL, NULL, NULL, NULL },
- { "th_TH", "buddhist", "gregorian", NULL, NULL, NULL },
- { "und_TH", "buddhist", "gregorian", NULL, NULL, NULL },
- { "en_TH", "buddhist", "gregorian", NULL, NULL, NULL },
+ { "th_TH", "gregorian", "buddhist", NULL, NULL, NULL }, // android-changed
+ { "und_TH", "gregorian", "buddhist", NULL, NULL, NULL }, // android-changed
+ { "en_TH", "gregorian", "buddhist", NULL, NULL, NULL }, // android-changed
+ // { "th_TH", "buddhist", "gregorian", NULL, NULL, NULL },
+ // { "und_TH", "buddhist", "gregorian", NULL, NULL, NULL },
+ // { "en_TH", "buddhist", "gregorian", NULL, NULL, NULL },
{ "he_IL", "gregorian", "hebrew", "islamic", "islamic-civil", "islamic-tbla" },
{ "ar_EG", "gregorian", "coptic", "islamic", "islamic-civil", "islamic-tbla" },
{ "ja", "gregorian", "japanese", NULL, NULL, NULL },
{ "ps_Guru_IN", "gregorian", "indian", NULL, NULL, NULL },
- { "th@calendar=gregorian", "buddhist", "gregorian", NULL, NULL, NULL },
+ { "th@calendar=gregorian", "gregorian", "buddhist", NULL, NULL, NULL },
{ "en@calendar=islamic", "gregorian", NULL, NULL, NULL, NULL },
{ "zh_TW", "gregorian", "roc", "chinese", NULL, NULL },
- { "ar_IR", "persian", "gregorian", "islamic", "islamic-civil", "islamic-tbla" },
+ { "ar_IR", "gregorian", "persian", "islamic", "islamic-civil", "islamic-tbla" }, // android-changed
};
const int32_t EXPECTED_SIZE[PREFERRED_SIZE] = { 1, 1, 1, 1, 2, 2, 2, 5, 5, 2, 2, 2, 1, 3, 5 };
UErrorCode status = U_ZERO_ERROR;
diff --git a/icu4c/source/test/intltest/dtfmttst.cpp b/icu4c/source/test/intltest/dtfmttst.cpp
index 58e82b158..ae1757cb2 100644
--- a/icu4c/source/test/intltest/dtfmttst.cpp
+++ b/icu4c/source/test/intltest/dtfmttst.cpp
@@ -4759,12 +4759,12 @@ void DateFormatTest::TestDFSCreateForLocaleNonGregorianLocale() {
return;
}
- // Farsi should default to the persian calendar, not gregorian
+ // Android: All locales default to Gregorian calendar:
int32_t count;
const UnicodeString *months = sym->getShortMonths(count);
// First persian month.
- UnicodeString expected("\\u0641\\u0631\\u0648\\u0631\\u062f\\u06cc\\u0646");
+ UnicodeString expected("\\u0698\\u0627\\u0646\\u0648\\u06CC\\u0647\\u0654");
assertEquals("", expected.unescape(), months[0]);
}
diff --git a/icu4c/source/test/intltest/dtifmtts.cpp b/icu4c/source/test/intltest/dtifmtts.cpp
index 0777fa78c..4143a47db 100644
--- a/icu4c/source/test/intltest/dtifmtts.cpp
+++ b/icu4c/source/test/intltest/dtifmtts.cpp
@@ -992,48 +992,50 @@ void DateIntervalFormatTest::testFormat() {
// Thai (default calendar buddhist)
- "th", "2550 10 10 10:10:10", "2551 10 10 10:10:10", "EEEEdMMMy", "\\u0E27\\u0E31\\u0E19\\u0E1E\\u0E38\\u0E18\\u0E17\\u0E35\\u0E48 10 \\u0E15.\\u0E04. 2550 \\u2013 \\u0E27\\u0E31\\u0E19\\u0E28\\u0E38\\u0E01\\u0E23\\u0E4C\\u0E17\\u0E35\\u0E48 10 \\u0E15.\\u0E04. 2551",
+ // BEGIN ANDROID-changed. Default calendar in Android is Gregorian for th locale.
+ // "th", "2550 10 10 10:10:10", "2551 10 10 10:10:10", "EEEEdMMMy", "\\u0E27\\u0E31\\u0E19\\u0E1E\\u0E38\\u0E18\\u0E17\\u0E35\\u0E48 10 \\u0E15.\\u0E04. 2550 \\u2013 \\u0E27\\u0E31\\u0E19\\u0E28\\u0E38\\u0E01\\u0E23\\u0E4C\\u0E17\\u0E35\\u0E48 10 \\u0E15.\\u0E04. 2551",
- "th", "2550 10 10 10:10:10", "2551 10 10 10:10:10", "dMMM", "10 \\u0E15.\\u0E04. 2550 \\u2013 10 \\u0E15.\\u0E04. 2551",
+ // "th", "2550 10 10 10:10:10", "2551 10 10 10:10:10", "dMMM", "10 \\u0E15.\\u0E04. 2550 \\u2013 10 \\u0E15.\\u0E04. 2551",
- "th", "2550 10 10 10:10:10", "2551 10 10 10:10:10", "MMMy", "\\u0E15.\\u0E04. 2550 \\u2013 \\u0E15.\\u0E04. 2551",
+ // "th", "2550 10 10 10:10:10", "2551 10 10 10:10:10", "MMMy", "\\u0E15.\\u0E04. 2550 \\u2013 \\u0E15.\\u0E04. 2551",
- "th", "2550 10 10 10:10:10", "2551 10 10 10:10:10", "EdMy", "\\u0E1E. 10/10/2550 \\u2013 \\u0E28. 10/10/2551",
+ // "th", "2550 10 10 10:10:10", "2551 10 10 10:10:10", "EdMy", "\\u0E1E. 10/10/2550 \\u2013 \\u0E28. 10/10/2551",
- "th", "2550 10 10 10:10:10", "2551 10 10 10:10:10", "dMy", "10/10/2550 \\u2013 10/10/2551",
+ // "th", "2550 10 10 10:10:10", "2551 10 10 10:10:10", "dMy", "10/10/2550 \\u2013 10/10/2551",
- "th", "2550 10 10 10:10:10", "2551 10 10 10:10:10", "My", "10/2550 \\u2013 10/2551",
+ // "th", "2550 10 10 10:10:10", "2551 10 10 10:10:10", "My", "10/2550 \\u2013 10/2551",
- "th", "2550 10 10 10:10:10", "2551 10 10 10:10:10", "EdM", "\\u0E1E. 10/10/2550 \\u2013 \\u0E28. 10/10/2551",
+ // "th", "2550 10 10 10:10:10", "2551 10 10 10:10:10", "EdM", "\\u0E1E. 10/10/2550 \\u2013 \\u0E28. 10/10/2551",
- "th", "2550 10 10 10:10:10", "2551 10 10 10:10:10", "y", "2550\\u20132551",
+ // "th", "2550 10 10 10:10:10", "2551 10 10 10:10:10", "y", "2550\\u20132551",
- "th", "2550 10 10 10:10:10", "2551 10 10 10:10:10", "M", "10/2550 \\u2013 10/2551",
+ // "th", "2550 10 10 10:10:10", "2551 10 10 10:10:10", "M", "10/2550 \\u2013 10/2551",
- "th", "2550 10 10 10:10:10", "2550 11 10 10:10:10", "EEEEdMMMy", "\\u0E27\\u0E31\\u0E19\\u0E1E\\u0E38\\u0E18\\u0E17\\u0E35\\u0E48 10 \\u0E15.\\u0E04. \\u2013 \\u0E27\\u0E31\\u0E19\\u0E40\\u0E2A\\u0E32\\u0E23\\u0E4C\\u0E17\\u0E35\\u0E48 10 \\u0E1E.\\u0E22. 2550",
+ // "th", "2550 10 10 10:10:10", "2550 11 10 10:10:10", "EEEEdMMMy", "\\u0E27\\u0E31\\u0E19\\u0E1E\\u0E38\\u0E18\\u0E17\\u0E35\\u0E48 10 \\u0E15.\\u0E04. \\u2013 \\u0E27\\u0E31\\u0E19\\u0E40\\u0E2A\\u0E32\\u0E23\\u0E4C\\u0E17\\u0E35\\u0E48 10 \\u0E1E.\\u0E22. 2550",
"th", "2550 10 10 10:10:10", "2550 11 10 10:10:10", "dMMM", "10 \\u0E15.\\u0E04. \\u2013 10 \\u0E1E.\\u0E22.",
- "th", "2550 10 10 10:10:10", "2550 11 10 10:10:10", "MMMy", "\\u0E15.\\u0E04.\\u2013\\u0E1E.\\u0E22. 2550",
+ // "th", "2550 10 10 10:10:10", "2550 11 10 10:10:10", "MMMy", "\\u0E15.\\u0E04.\\u2013\\u0E1E.\\u0E22. 2550",
"th", "2550 10 10 10:10:10", "2550 11 10 10:10:10", "dM", "10/10 \\u2013 10/11",
- "th", "2550 10 10 10:10:10", "2550 11 10 10:10:10", "My", "10/2550 \\u2013 11/2550",
+ // "th", "2550 10 10 10:10:10", "2550 11 10 10:10:10", "My", "10/2550 \\u2013 11/2550",
"th", "2550 10 10 10:10:10", "2550 11 10 10:10:10", "d", "10/10 \\u2013 10/11",
- "th", "2550 10 10 10:10:10", "2550 11 10 10:10:10", "y", "\\u0E1E.\\u0E28. 2550",
+ // "th", "2550 10 10 10:10:10", "2550 11 10 10:10:10", "y", "\\u0E1E.\\u0E28. 2550",
"th", "2550 10 10 10:10:10", "2550 11 10 10:10:10", "MMM", "\\u0E15.\\u0E04.\\u2013\\u0E1E.\\u0E22.",
+ // END ANDROID-changed
};
expect(DATA, ARRAY_SIZE(DATA));
}
diff --git a/icu4c/source/test/intltest/incaltst.cpp b/icu4c/source/test/intltest/incaltst.cpp
index 7627696e7..81fc44745 100644
--- a/icu4c/source/test/intltest/incaltst.cpp
+++ b/icu4c/source/test/intltest/incaltst.cpp
@@ -116,9 +116,9 @@ IntlCalendarTest::TestTypes()
"buddhist",
"gregorian",
"gregorian",
- "buddhist",
- "buddhist",
- "buddhist",
+ "gregorian", // android-changed. "buddhist",
+ "gregorian", // android-changed. "buddhist",
+ "gregorian", // android-changed. "buddhist",
"gregorian",
NULL };