From bb7352990e01fe6e484fe98a3edd1bdd3f3499b4 Mon Sep 17 00:00:00 2001 From: DraganBesevic Date: Tue, 12 Sep 2023 14:31:17 -0700 Subject: [PATCH] ICU-22325 CLDR 44 alpha2 integration to ICU part three, source files changes --- icu4c/source/i18n/measunit.cpp | 6 +- icu4c/source/i18n/unicode/measunit.h | 12 +- icu4c/source/test/cintltst/cdattst.c | 16 +-- icu4c/source/test/intltest/dtfmttst.cpp | 18 +-- icu4c/source/test/intltest/dtptngts.cpp | 2 +- icu4c/source/test/intltest/measfmttest.cpp | 4 +- icu4c/source/test/intltest/numfmtst.cpp | 4 +- icu4c/source/test/intltest/units_test.cpp | 4 +- icu4c/source/test/testdata/structLocale.txt | 122 +++++++++++++++--- .../format/GlobalizationPreferencesTest.java | 4 +- .../icu/dev/test/format/DateFormatTest.java | 16 +-- .../icu/dev/test/format/MeasureUnitTest.java | 4 +- .../icu/dev/test/format/NumberFormatTest.java | 12 +- .../java/com/ibm/icu/util/MeasureUnit.java | 4 +- .../test/format/DateTimeGeneratorTest.java | 2 +- .../format/PersonNameConsistencyTest.java | 2 +- tools/cldr/cldr-to-icu/pom.xml | 2 +- .../localedistance/LocaleDistanceMapper.java | 2 +- 18 files changed, 160 insertions(+), 76 deletions(-) diff --git a/icu4c/source/i18n/measunit.cpp b/icu4c/source/i18n/measunit.cpp index c572eabd952..abb21997705 100644 --- a/icu4c/source/i18n/measunit.cpp +++ b/icu4c/source/i18n/measunit.cpp @@ -532,7 +532,7 @@ static const char * const gSubTypes[] = { "watt", "atmosphere", "bar", - "gasoline-equivalent", + "gasoline-energy-density", "hectopascal", "inch-ofhg", "kilopascal", @@ -1688,11 +1688,11 @@ MeasureUnit MeasureUnit::getBar() { return MeasureUnit(18, 1); } -MeasureUnit *MeasureUnit::createGasolineEquivalent(UErrorCode &status) { +MeasureUnit *MeasureUnit::createGasolineEnergyDensity(UErrorCode &status) { return MeasureUnit::create(18, 2, status); } -MeasureUnit MeasureUnit::getGasolineEquivalent() { +MeasureUnit MeasureUnit::getGasolineEnergyDensity() { return MeasureUnit(18, 2); } diff --git a/icu4c/source/i18n/unicode/measunit.h b/icu4c/source/i18n/unicode/measunit.h index df197192952..8f358357826 100644 --- a/icu4c/source/i18n/unicode/measunit.h +++ b/icu4c/source/i18n/unicode/measunit.h @@ -2882,20 +2882,20 @@ class U_I18N_API MeasureUnit: public UObject { #ifndef U_HIDE_DRAFT_API /** - * Returns by pointer, unit of pressure: gasoline-equivalent. + * Returns by pointer, unit of pressure: gasoline-energy-density. * Caller owns returned value and must free it. - * Also see {@link #getGasolineEquivalent()}. + * Also see {@link #getGasolineEnergyDensity()}. * @param status ICU error code. * @draft ICU 74 */ - static MeasureUnit *createGasolineEquivalent(UErrorCode &status); + static MeasureUnit *createGasolineEnergyDensity(UErrorCode &status); /** - * Returns by value, unit of pressure: gasoline-equivalent. - * Also see {@link #createGasolineEquivalent()}. + * Returns by value, unit of pressure: gasoline-energy-density. + * Also see {@link #createGasolineEnergyDensity()}. * @draft ICU 74 */ - static MeasureUnit getGasolineEquivalent(); + static MeasureUnit getGasolineEnergyDensity(); #endif /* U_HIDE_DRAFT_API */ /** diff --git a/icu4c/source/test/cintltst/cdattst.c b/icu4c/source/test/cintltst/cdattst.c index 8c1f1f03838..c390f1e4ad6 100644 --- a/icu4c/source/test/cintltst/cdattst.c +++ b/icu4c/source/test/cintltst/cdattst.c @@ -2087,24 +2087,24 @@ static void TestHourCycle(void) { // test some locales for which we have data u"en_US", u"Tuesday, March 16, 1943 at 3:45:32 PM", u"en_CA", u"Tuesday, March 16, 1943 at 3:45:32 p.m.", - u"en_GB", u"Tuesday, 16 March 1943 at 15:45:32", - u"en_AU", u"Tuesday, 16 March 1943 at 3:45:32 pm", + u"en_GB", u"Tuesday 16 March 1943 at 15:45:32", + u"en_AU", u"Tuesday 16 March 1943 at 3:45:32 pm", // test a couple locales for which we don't have specific locale files (we should still get the correct hour cycle) u"en_CO", u"Tuesday, March 16, 1943 at 3:45:32 PM", - u"en_MX", u"Tuesday, March 16, 1943 at 15:45:32", + u"en_MX", u"Tuesday, March 16, 1943 at 3:45:32 PM", // test that the rg subtag does the right thing u"en_US@rg=GBzzzz", u"Tuesday, March 16, 1943 at 15:45:32", u"en_US@rg=CAzzzz", u"Tuesday, March 16, 1943 at 3:45:32 PM", u"en_CA@rg=USzzzz", u"Tuesday, March 16, 1943 at 3:45:32 p.m.", - u"en_GB@rg=USzzzz", u"Tuesday, 16 March 1943 at 3:45:32 pm", - u"en_GB@rg=CAzzzz", u"Tuesday, 16 March 1943 at 3:45:32 pm", - u"en_GB@rg=AUzzzz", u"Tuesday, 16 March 1943 at 3:45:32 pm", + u"en_GB@rg=USzzzz", u"Tuesday 16 March 1943 at 3:45:32 pm", + u"en_GB@rg=CAzzzz", u"Tuesday 16 March 1943 at 3:45:32 pm", + u"en_GB@rg=AUzzzz", u"Tuesday 16 March 1943 at 3:45:32 pm", // test that the hc ("hours") subtag does the right thing u"en_US@hours=h23", u"Tuesday, March 16, 1943 at 15:45:32", - u"en_GB@hours=h12", u"Tuesday, 16 March 1943 at 3:45:32 pm", + u"en_GB@hours=h12", u"Tuesday 16 March 1943 at 3:45:32 pm", // test that the rg and hc subtags do the right thing when used together u"en_US@rg=GBzzzz;hours=h12", u"Tuesday, March 16, 1943 at 3:45:32 PM", - u"en_GB@rg=USzzzz;hours=h23", u"Tuesday, 16 March 1943 at 15:45:32", + u"en_GB@rg=USzzzz;hours=h23", u"Tuesday 16 March 1943 at 15:45:32", }; for (int32_t i = 0; i < UPRV_LENGTHOF(testCases); i += 2) { diff --git a/icu4c/source/test/intltest/dtfmttst.cpp b/icu4c/source/test/intltest/dtfmttst.cpp index 56fcc8adb4d..1e03ffb9ed6 100644 --- a/icu4c/source/test/intltest/dtfmttst.cpp +++ b/icu4c/source/test/intltest/dtfmttst.cpp @@ -4458,7 +4458,7 @@ void DateFormatTest::TestFormatsWithNumberSystems() const UDate date = 1451556000000.0; // for UTC: grego 31-Dec-2015 10 AM, hebrew 19 tevet 5776, chinese yi-wei 11mo 21day const TestFmtWithNumSysItem items[] = { { "haw@calendar=gregorian", DateFormat::kShort, UnicodeString("d/M/yy"), UnicodeString("31/xii/15") }, - { "he@calendar=hebrew", DateFormat::kLong, CharsToUnicodeString("d \\u05D1MMMM y"), CharsToUnicodeString("\\u05D9\\u05F4\\u05D8 \\u05D1\\u05D8\\u05D1\\u05EA \\u05EA\\u05E9\\u05E2\\u05F4\\u05D5") }, + { "he@calendar=hebrew", DateFormat::kLong, CharsToUnicodeString("d \\u05D1MMMM y"), CharsToUnicodeString("\\u05D9\\u05F4\\u05D8 \\u05D1\\u05D8\\u05D1\\u05EA \\u05EA\\u05E9\\u05E2\\u05F4\\u05D5") }, { "zh@calendar=chinese", DateFormat::kLong, CharsToUnicodeString("rU\\u5E74MMMd"), CharsToUnicodeString("2015\\u4E59\\u672A\\u5E74\\u5341\\u4E00\\u6708\\u5EFF\\u4E00") }, { "zh_Hant@calendar=chinese", DateFormat::kLong, CharsToUnicodeString("rU\\u5E74MMMd"), CharsToUnicodeString("2015\\u4E59\\u672A\\u5E74\\u51AC\\u6708\\u5EFF\\u4E00") }, { "ja@calendar=chinese", DateFormat::kLong, CharsToUnicodeString("U\\u5E74MMMd\\u65E5"), CharsToUnicodeString("\\u4E59\\u672A\\u5E74\\u5341\\u4E00\\u6708\\u4E8C\\u4E00\\u65E5") }, @@ -5838,24 +5838,24 @@ void DateFormatTest::TestHourCycle() { // test some locales for which we have data { "en-us", u"Tuesday, March 16, 1943 at 3:45:32 PM" }, { "en-ca", u"Tuesday, March 16, 1943 at 3:45:32 p.m." }, - { "en-gb", u"Tuesday, 16 March 1943 at 15:45:32" }, - { "en-au", u"Tuesday, 16 March 1943 at 3:45:32 pm" }, + { "en-gb", u"Tuesday 16 March 1943 at 15:45:32" }, + { "en-au", u"Tuesday 16 March 1943 at 3:45:32 pm" }, // test a couple locales for which we don't have specific locale files (we should still get the correct hour cycle) { "en-co", u"Tuesday, March 16, 1943 at 3:45:32 PM" }, - { "en-mx", u"Tuesday, March 16, 1943 at 15:45:32" }, + { "en-mx", u"Tuesday, March 16, 1943 at 3:45:32 PM" }, // test that the rg subtag does the right thing { "en-us-u-rg-gbzzzz", u"Tuesday, March 16, 1943 at 15:45:32" }, { "en-us-u-rg-cazzzz", u"Tuesday, March 16, 1943 at 3:45:32 PM" }, { "en-ca-u-rg-uszzzz", u"Tuesday, March 16, 1943 at 3:45:32 p.m." }, - { "en-gb-u-rg-uszzzz", u"Tuesday, 16 March 1943 at 3:45:32 pm" }, - { "en-gb-u-rg-cazzzz", u"Tuesday, 16 March 1943 at 3:45:32 pm" }, - { "en-gb-u-rg-auzzzz", u"Tuesday, 16 March 1943 at 3:45:32 pm" }, + { "en-gb-u-rg-uszzzz", u"Tuesday 16 March 1943 at 3:45:32 pm" }, + { "en-gb-u-rg-cazzzz", u"Tuesday 16 March 1943 at 3:45:32 pm" }, + { "en-gb-u-rg-auzzzz", u"Tuesday 16 March 1943 at 3:45:32 pm" }, // test that the hc ("hours") subtag does the right thing { "en-us-u-hc-h23", u"Tuesday, March 16, 1943 at 15:45:32" }, - { "en-gb-u-hc-h12", u"Tuesday, 16 March 1943 at 3:45:32 pm" }, + { "en-gb-u-hc-h12", u"Tuesday 16 March 1943 at 3:45:32 pm" }, // test that the rg and hc subtags do the right thing when used together { "en-us-u-rg-gbzzzz-hc-h12", u"Tuesday, March 16, 1943 at 3:45:32 PM" }, - { "en-gb-u-rg-uszzzz-hc-h23", u"Tuesday, 16 March 1943 at 15:45:32" }, + { "en-gb-u-rg-uszzzz-hc-h23", u"Tuesday 16 March 1943 at 15:45:32" }, }; for (int32_t i = 0; i < UPRV_LENGTHOF(TEST_CASES); i++) { diff --git a/icu4c/source/test/intltest/dtptngts.cpp b/icu4c/source/test/intltest/dtptngts.cpp index 99af37de6c6..b78de13449a 100644 --- a/icu4c/source/test/intltest/dtptngts.cpp +++ b/icu4c/source/test/intltest/dtptngts.cpp @@ -140,7 +140,7 @@ void IntlTestDateTimePatternGeneratorAPI::testAPI(/*char *par*/) UnicodeString patternResults_de_DE[] = { // de_DE // 2 de_DE - UnicodeString("01/1999"), // 00: yM + UnicodeString("1/1999"), // 00: yM UnicodeString("Jan. 1999"), // 01: yMMM UnicodeString("13.1.1999"), // 02: yMd UnicodeString("13. Jan. 1999"), // 03: yMMMd diff --git a/icu4c/source/test/intltest/measfmttest.cpp b/icu4c/source/test/intltest/measfmttest.cpp index a8bb9978677..3034fe9f44c 100644 --- a/icu4c/source/test/intltest/measfmttest.cpp +++ b/icu4c/source/test/intltest/measfmttest.cpp @@ -4117,8 +4117,8 @@ void MeasureFormatTest::TestCompatible74() { measureUnitValue = MeasureUnit::getAtmosphere(); measureUnit.adoptInstead(MeasureUnit::createBar(status)); measureUnitValue = MeasureUnit::getBar(); - measureUnit.adoptInstead(MeasureUnit::createGasolineEquivalent(status)); - measureUnitValue = MeasureUnit::getGasolineEquivalent(); + measureUnit.adoptInstead(MeasureUnit::createGasolineEnergyDensity(status)); + measureUnitValue = MeasureUnit::getGasolineEnergyDensity(); measureUnit.adoptInstead(MeasureUnit::createHectopascal(status)); measureUnitValue = MeasureUnit::getHectopascal(); measureUnit.adoptInstead(MeasureUnit::createInchHg(status)); diff --git a/icu4c/source/test/intltest/numfmtst.cpp b/icu4c/source/test/intltest/numfmtst.cpp index 8ee28b0786a..4686b1a876b 100644 --- a/icu4c/source/test/intltest/numfmtst.cpp +++ b/icu4c/source/test/intltest/numfmtst.cpp @@ -8099,9 +8099,9 @@ void NumberFormatTest::TestAccountingCurrency() { expect(NumberFormat::createInstance("de_DE", style, status), (Formattable)(double)-23456.7, UnicodeString("-23.456,70\\u00A0\\u20AC").unescape(), true, status); expect(NumberFormat::createInstance("en_ID", style, status), - (Formattable)(double)0, UnicodeString("IDR\\u00A00.00").unescape(), true, status); + (Formattable)(double)0, UnicodeString("Rp\\u00A00,00").unescape(), true, status); expect(NumberFormat::createInstance("en_ID", style, status), - (Formattable)(double)-0.2, UnicodeString("(IDR\\u00A00.20)").unescape(), true, status); + (Formattable)(double)-0.2, UnicodeString("(Rp\\u00A00,20)").unescape(), true, status); expect(NumberFormat::createInstance("sh_ME", style, status), (Formattable)(double)0, UnicodeString("0,00\\u00A0\\u20AC").unescape(), true, status); expect(NumberFormat::createInstance("sh_ME", style, status), diff --git a/icu4c/source/test/intltest/units_test.cpp b/icu4c/source/test/intltest/units_test.cpp index 4aac2ead283..9714dbc89ef 100644 --- a/icu4c/source/test/intltest/units_test.cpp +++ b/icu4c/source/test/intltest/units_test.cpp @@ -449,9 +449,9 @@ void unitsTestDataLineFn(void *context, char *fields[][2], int32_t fieldCount, U StringPiece y = trimField(fields[2]); StringPiece commentConversionFormula = trimField(fields[3]); StringPiece utf8Expected = trimField(fields[4]); - StringPiece gasolineEquivalent("gasoline-equivalent"); + StringPiece gasolineEnergyDensity("gasoline-energy-density"); - if ( x.compare(gasolineEquivalent) == 0 && unitsTest->logKnownIssue("CLDR-17015", "Problem with gasoline-equivalent unit calculation")) { + if ( x.compare(gasolineEnergyDensity) == 0 && unitsTest->logKnownIssue("CLDR-17015", "Problem with gasoline-energy-density unit calculation")) { return; } diff --git a/icu4c/source/test/testdata/structLocale.txt b/icu4c/source/test/testdata/structLocale.txt index 68c2adb73e1..e6d10d013a4 100644 --- a/icu4c/source/test/testdata/structLocale.txt +++ b/icu4c/source/test/testdata/structLocale.txt @@ -99,7 +99,7 @@ structLocale:table(nofallback){ CN{""} CO{""} CQ{""} - CR{""} + CR{""} CS{""} CU{""} CV{""} @@ -4148,51 +4148,51 @@ structLocale:table(nofallback){ 2, 2, } - currencyName:intvector{ + currencyName:intvector{ 2, 2, } - day-format-except-narrow:intvector{ + day-format-except-narrow:intvector{ 2, 2, } - day-standalone-except-narrow:intvector{ + day-standalone-except-narrow:intvector{ 2, 2, } - era-abbr:intvector{ + era-abbr:intvector{ 2, 2, } - era-name:intvector{ + era-name:intvector{ 2, 2, } - keyValue:intvector{ + keyValue:intvector{ 2, 2, } - languages:intvector{ + languages:intvector{ 2, 2, } - month-format-except-narrow:intvector{ + month-format-except-narrow:intvector{ 2, 2, } - month-standalone-except-narrow:intvector{ + month-standalone-except-narrow:intvector{ 2, 2, } - number-spellout:intvector{ + number-spellout:intvector{ 2, 2, } - relative:intvector{ + relative:intvector{ 2, 2, } - script:intvector{ + script:intvector{ 2, 2, } @@ -5272,7 +5272,7 @@ structLocale:table(nofallback){ } } week{ - dn{""} + dn{""} relative{ "-1"{""} "0"{""} @@ -5299,7 +5299,7 @@ structLocale:table(nofallback){ } } week-narrow{ - dn{""} + dn{""} relative{ "-1"{""} "0"{""} @@ -5326,7 +5326,7 @@ structLocale:table(nofallback){ } } week-short{ - dn{""} + dn{""} relative{ "-1"{""} "0"{""} @@ -5385,7 +5385,7 @@ structLocale:table(nofallback){ dn{""} } year{ - dn{""} + dn{""} relative{ "-1"{""} "-2"{""} @@ -5412,7 +5412,7 @@ structLocale:table(nofallback){ } } year-narrow{ - dn{""} + dn{""} relative{ "-1"{""} "-2"{""} @@ -5439,7 +5439,7 @@ structLocale:table(nofallback){ } } year-short{ - dn{""} + dn{""} relative{ "-1"{""} "-2"{""} @@ -34531,6 +34531,12 @@ structLocale:table(nofallback){ d{""} y{""} } + GyMMMEEEEd{ + G{""} + M{""} + d{""} + y{""} + } GyMMMd{ G{""} M{""} @@ -35532,6 +35538,12 @@ structLocale:table(nofallback){ d{""} y{""} } + GyMMMEEEEd{ + G{""} + M{""} + d{""} + y{""} + } GyMMMd{ G{""} M{""} @@ -35923,6 +35935,12 @@ structLocale:table(nofallback){ d{""} y{""} } + GyMMMEEEEd{ + G{""} + M{""} + d{""} + y{""} + } GyMMMd{ G{""} M{""} @@ -37022,6 +37040,12 @@ structLocale:table(nofallback){ d{""} y{""} } + GyMMMEEEEd{ + G{""} + M{""} + d{""} + y{""} + } GyMMMd{ G{""} M{""} @@ -37418,6 +37442,12 @@ structLocale:table(nofallback){ d{""} y{""} } + GyMMMEEEEd{ + G{""} + M{""} + d{""} + y{""} + } GyMMMd{ G{""} M{""} @@ -37755,6 +37785,12 @@ structLocale:table(nofallback){ d{""} y{""} } + GyMMMEEEEd{ + G{""} + M{""} + d{""} + y{""} + } GyMMMd{ G{""} M{""} @@ -38142,6 +38178,12 @@ structLocale:table(nofallback){ d{""} y{""} } + GyMMMEEEEd{ + G{""} + M{""} + d{""} + y{""} + } GyMMMM{ G{""} M{""} @@ -38646,6 +38688,12 @@ structLocale:table(nofallback){ d{""} y{""} } + GyMMMEEEEd{ + G{""} + M{""} + d{""} + y{""} + } GyMMMM{ G{""} M{""} @@ -39070,6 +39118,12 @@ structLocale:table(nofallback){ d{""} y{""} } + GyMMMEEEEd{ + G{""} + M{""} + d{""} + y{""} + } GyMMMd{ G{""} M{""} @@ -39441,6 +39495,12 @@ structLocale:table(nofallback){ d{""} y{""} } + GyMMMEEEEd{ + G{""} + M{""} + d{""} + y{""} + } GyMMMd{ G{""} M{""} @@ -39855,6 +39915,12 @@ structLocale:table(nofallback){ d{""} y{""} } + GyMMMEEEEd{ + G{""} + M{""} + d{""} + y{""} + } GyMMMd{ G{""} M{""} @@ -40218,6 +40284,12 @@ structLocale:table(nofallback){ d{""} y{""} } + GyMMMEEEEd{ + G{""} + M{""} + d{""} + y{""} + } GyMMMd{ G{""} M{""} @@ -41289,6 +41361,12 @@ structLocale:table(nofallback){ d{""} y{""} } + GyMMMEEEEd{ + G{""} + M{""} + d{""} + y{""} + } GyMMMd{ G{""} M{""} @@ -41562,6 +41640,12 @@ structLocale:table(nofallback){ d{""} y{""} } + GyMMMEEEEd{ + G{""} + M{""} + d{""} + y{""} + } GyMMMd{ G{""} M{""} diff --git a/icu4j/main/collate/src/test/java/com/ibm/icu/dev/test/format/GlobalizationPreferencesTest.java b/icu4j/main/collate/src/test/java/com/ibm/icu/dev/test/format/GlobalizationPreferencesTest.java index 503b9c18eac..7831ea9582e 100644 --- a/icu4j/main/collate/src/test/java/com/ibm/icu/dev/test/format/GlobalizationPreferencesTest.java +++ b/icu4j/main/collate/src/test/java/com/ibm/icu/dev/test/format/GlobalizationPreferencesTest.java @@ -1222,7 +1222,7 @@ public class GlobalizationPreferencesTest extends TestFmwk { // Date - full df = gp.getDateFormat(GlobalizationPreferences.DF_FULL, GlobalizationPreferences.DF_NONE); pattern = ((SimpleDateFormat)df).toPattern(); - if (!pattern.equals("EEEE, d MMMM y")) { + if (!pattern.equals("EEEE d MMMM y")) { errln("FAIL: FULL date pattern is " + pattern + " Expected: EEEE, d MMMM y"); } @@ -1278,7 +1278,7 @@ public class GlobalizationPreferencesTest extends TestFmwk { // Date/Time - full df = gp.getDateFormat(GlobalizationPreferences.DF_FULL, GlobalizationPreferences.DF_FULL); pattern = ((SimpleDateFormat)df).toPattern(); - if (!pattern.equals("EEEE, d MMMM y 'at' HH:mm:ss zzzz")) { + if (!pattern.equals("EEEE d MMMM y 'at' HH:mm:ss zzzz")) { errln("FAIL: FULL date/time pattern is " + pattern + " Expected: EEEE, d MMMM y 'at' HH:mm:ss zzzz"); } diff --git a/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/DateFormatTest.java b/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/DateFormatTest.java index 82d028c1bd8..8028ad77506 100644 --- a/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/DateFormatTest.java +++ b/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/DateFormatTest.java @@ -5703,24 +5703,24 @@ public class DateFormatTest extends TestFmwk { // test some locales for which we have data { "en-us", "Tuesday, March 16, 1943 at 3:45:32\u202fPM" }, { "en-ca", "Tuesday, March 16, 1943 at 3:45:32\u202fp.m." }, - { "en-gb", "Tuesday, 16 March 1943 at 15:45:32" }, - { "en-au", "Tuesday, 16 March 1943 at 3:45:32\u202fpm" }, + { "en-gb", "Tuesday 16 March 1943 at 15:45:32" }, + { "en-au", "Tuesday 16 March 1943 at 3:45:32\u202fpm" }, // test a couple locales for which we don't have specific locale files (we should still get the correct hour cycle) { "en-co", "Tuesday, March 16, 1943 at 3:45:32\u202fPM" }, - { "en-mx", "Tuesday, March 16, 1943 at 15:45:32" }, + { "en-mx", "Tuesday, March 16, 1943 at 3:45:32 PM" }, // test that the rg subtag does the right thing { "en-us-u-rg-gbzzzz", "Tuesday, March 16, 1943 at 15:45:32" }, { "en-us-u-rg-cazzzz", "Tuesday, March 16, 1943 at 3:45:32\u202fPM" }, { "en-ca-u-rg-uszzzz", "Tuesday, March 16, 1943 at 3:45:32\u202fp.m." }, - { "en-gb-u-rg-uszzzz", "Tuesday, 16 March 1943 at 3:45:32\u202fpm" }, - { "en-gb-u-rg-cazzzz", "Tuesday, 16 March 1943 at 3:45:32\u202fpm" }, - { "en-gb-u-rg-auzzzz", "Tuesday, 16 March 1943 at 3:45:32\u202fpm" }, + { "en-gb-u-rg-uszzzz", "Tuesday 16 March 1943 at 3:45:32\u202fpm" }, + { "en-gb-u-rg-cazzzz", "Tuesday 16 March 1943 at 3:45:32\u202fpm" }, + { "en-gb-u-rg-auzzzz", "Tuesday 16 March 1943 at 3:45:32\u202fpm" }, // test that the hc ("hours") subtag does the right thing { "en-us-u-hc-h23", "Tuesday, March 16, 1943 at 15:45:32" }, - { "en-gb-u-hc-h12", "Tuesday, 16 March 1943 at 3:45:32\u202fpm" }, + { "en-gb-u-hc-h12", "Tuesday 16 March 1943 at 3:45:32\u202fpm" }, // test that the rg and hc subtags do the right thing when used together { "en-us-u-rg-gbzzzz-hc-h12", "Tuesday, March 16, 1943 at 3:45:32\u202fPM" }, - { "en-gb-u-rg-uszzzz-hc-h23", "Tuesday, 16 March 1943 at 15:45:32" }, + { "en-gb-u-rg-uszzzz-hc-h23", "Tuesday 16 March 1943 at 15:45:32" }, }; for (String[] testCase : TEST_CASES) { diff --git a/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/MeasureUnitTest.java b/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/MeasureUnitTest.java index d660ad82d6d..dc995d50ffe 100644 --- a/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/MeasureUnitTest.java +++ b/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/MeasureUnitTest.java @@ -282,7 +282,7 @@ public class MeasureUnitTest extends TestFmwk { {"QUARTER", "72"}, {"TONNE", "72"}, {"BEAUFORT", "73"}, - {"GASOLINE_EQUIVALENT", "74"}, + {"GASOLINE_ENERGY_DENSITY", "74"}, }; private static final HashMap JAVA_VERSION_MAP = new HashMap<>(); @@ -2814,7 +2814,7 @@ public class MeasureUnitTest extends TestFmwk { MeasureUnit.WATT, MeasureUnit.ATMOSPHERE, MeasureUnit.BAR, - MeasureUnit.GASOLINE_EQUIVALENT, + MeasureUnit.GASOLINE_ENERGY_DENSITY, MeasureUnit.HECTOPASCAL, MeasureUnit.INCH_HG, MeasureUnit.KILOPASCAL, diff --git a/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/NumberFormatTest.java b/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/NumberFormatTest.java index f15baaa482d..7a8da28899f 100644 --- a/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/NumberFormatTest.java +++ b/icu4j/main/common_tests/src/test/java/com/ibm/icu/dev/test/format/NumberFormatTest.java @@ -4455,12 +4455,12 @@ public class NumberFormatTest extends TestFmwk { {"ja_JP", "-1000.5", "-¥1,000", "-¥1,000", "(¥1,000)", "false"}, {"ja_JP@cf=account", "-1000.5", "(¥1,000)", "-¥1,000", "(¥1,000)", "false"}, {"de_DE", "-23456.7", "-23.456,70\u00A0€", "-23.456,70\u00A0€", "-23.456,70\u00A0€", "true" }, - {"en_ID", "1234.5", "IDR 1,234.50", "IDR 1,234.50", "IDR 1,234.50", "true"}, - {"en_ID@cf=account", "1234.5", "IDR 1,234.50", "IDR 1,234.50", "IDR 1,234.50", "true"}, - {"en_ID@cf=standard", "1234.5", "IDR 1,234.50", "IDR 1,234.50", "IDR 1,234.50", "true"}, - {"en_ID", "-1234.5", "-IDR 1,234.50", "-IDR 1,234.50", "(IDR 1,234.50)", "true"}, - {"en_ID@cf=account", "-1234.5", "(IDR 1,234.50)", "-IDR 1,234.50", "(IDR 1,234.50)", "true"}, - {"en_ID@cf=standard", "-1234.5", "-IDR 1,234.50", "-IDR 1,234.50", "(IDR 1,234.50)", "true"}, + {"en_ID", "1234.5", "Rp 1.234,50", "Rp 1.234,50", "Rp 1.234,50", "true"}, + {"en_ID@cf=account", "1234.5", "Rp 1.234,50", "Rp 1.234,50", "Rp 1.234,50", "true"}, + {"en_ID@cf=standard", "1234.5", "Rp 1.234,50", "Rp 1.234,50", "Rp 1.234,50", "true"}, + {"en_ID", "-1234.5", "-Rp 1.234,50", "-Rp 1.234,50", "(Rp 1.234,50)", "true"}, + {"en_ID@cf=account", "-1234.5", "(Rp 1.234,50)", "-Rp 1.234,50", "(Rp 1.234,50)", "true"}, + {"en_ID@cf=standard", "-1234.5", "-Rp 1.234,50", "-Rp 1.234,50", "(Rp 1.234,50)", "true"}, {"sh_ME", "1234.5", "1.234,50 €", "1.234,50 €", "1.234,50 €", "true"}, {"sh_ME@cf=account", "1234.5", "1.234,50 €", "1.234,50 €", "1.234,50 €", "true"}, {"sh_ME@cf=standard", "1234.5", "1.234,50 €", "1.234,50 €", "1.234,50 €", "true"}, diff --git a/icu4j/main/core/src/main/java/com/ibm/icu/util/MeasureUnit.java b/icu4j/main/core/src/main/java/com/ibm/icu/util/MeasureUnit.java index e6294ccdfdc..83868f6e6cb 100644 --- a/icu4j/main/core/src/main/java/com/ibm/icu/util/MeasureUnit.java +++ b/icu4j/main/core/src/main/java/com/ibm/icu/util/MeasureUnit.java @@ -1716,10 +1716,10 @@ public class MeasureUnit implements Serializable { public static final MeasureUnit BAR = MeasureUnit.internalGetInstance("pressure", "bar"); /** - * Constant for unit of pressure: gasoline-equivalent + * Constant for unit of pressure: gasoline-energy-density * @draft ICU 74 */ - public static final MeasureUnit GASOLINE_EQUIVALENT = MeasureUnit.internalGetInstance("pressure", "gasoline-equivalent"); + public static final MeasureUnit GASOLINE_ENERGY_DENSITY = MeasureUnit.internalGetInstance("pressure", "gasoline-energy-density"); /** * Constant for unit of pressure: hectopascal diff --git a/icu4j/main/core/src/test/java/com/ibm/icu/dev/test/format/DateTimeGeneratorTest.java b/icu4j/main/core/src/test/java/com/ibm/icu/dev/test/format/DateTimeGeneratorTest.java index c7a0d5ad9e9..78b89b0dfa6 100644 --- a/icu4j/main/core/src/test/java/com/ibm/icu/dev/test/format/DateTimeGeneratorTest.java +++ b/icu4j/main/core/src/test/java/com/ibm/icu/dev/test/format/DateTimeGeneratorTest.java @@ -407,7 +407,7 @@ public class DateTimeGeneratorTest extends TestFmwk { new String[] {"JJmm", "11:58"}, new ULocale("de_DE"), - new String[] {"yM", "01/1999"}, + new String[] {"yM", "1/1999"}, new String[] {"yMMM", "Jan. 1999"}, new String[] {"yMd", "13.1.1999"}, new String[] {"yMMMd", "13. Jan. 1999"}, diff --git a/icu4j/main/core/src/test/java/com/ibm/icu/dev/test/format/PersonNameConsistencyTest.java b/icu4j/main/core/src/test/java/com/ibm/icu/dev/test/format/PersonNameConsistencyTest.java index 53e8fa90ae1..a9da36e612b 100644 --- a/icu4j/main/core/src/test/java/com/ibm/icu/dev/test/format/PersonNameConsistencyTest.java +++ b/icu4j/main/core/src/test/java/com/ibm/icu/dev/test/format/PersonNameConsistencyTest.java @@ -40,7 +40,7 @@ public class PersonNameConsistencyTest extends TestFmwk { Arrays.asList("gaa.txt", "gd.txt", "lv.txt", "syr.txt", "lij.txt"); static private Collection FILENAMES_TO_SKIP_FOR_17028 = - Arrays.asList("yue_Hans.txt", "to.txt", "gl.txt", "ie.txt" ); + Arrays.asList("yue_Hans.txt", "to.txt", "gl.txt", "ie.txt", "fr.txt", "fr_CA.txt" ); static List readTestCases() throws Exception { List tests = new ArrayList<>(); diff --git a/tools/cldr/cldr-to-icu/pom.xml b/tools/cldr/cldr-to-icu/pom.xml index 61b7b83efce..983e29e29f9 100644 --- a/tools/cldr/cldr-to-icu/pom.xml +++ b/tools/cldr/cldr-to-icu/pom.xml @@ -83,7 +83,7 @@ com.ibm.icu icu4j-for-cldr - 74.0.1-SNAPSHOT-cldr-2023-08-08 + 74.0.1-SNAPSHOT-cldr-2023-08-22 diff --git a/tools/cldr/cldr-to-icu/src/main/java/org/unicode/icu/tool/cldrtoicu/localedistance/LocaleDistanceMapper.java b/tools/cldr/cldr-to-icu/src/main/java/org/unicode/icu/tool/cldrtoicu/localedistance/LocaleDistanceMapper.java index c4a1a3eb44b..150a9db2868 100644 --- a/tools/cldr/cldr-to-icu/src/main/java/org/unicode/icu/tool/cldrtoicu/localedistance/LocaleDistanceMapper.java +++ b/tools/cldr/cldr-to-icu/src/main/java/org/unicode/icu/tool/cldrtoicu/localedistance/LocaleDistanceMapper.java @@ -422,7 +422,7 @@ public final class LocaleDistanceMapper { Set paradigmLSRs = new LinkedHashSet<>(); for (String paradigm : LIST_SPLITTER.split(localesList)) { - LSR max = XLikelySubtags.INSTANCE.makeMaximizedLsrFrom(new ULocale(paradigm)); + LSR max = XLikelySubtags.INSTANCE.makeMaximizedLsrFrom(new ULocale(paradigm), false); // Clear the LSR flags to make the data equality test in LocaleDistanceTest happy. paradigmLSRs.add(new LSR(max.language, max.script, max.region, LSR.DONT_CARE_FLAGS)); }