]> granicus.if.org Git - icu/commitdiff
ICU-10712 Integrate non-collation, non-BCP47 data from CLDR trunk@9766 (J)
authorPeter Edberg <pedberg@unicode.org>
Mon, 24 Feb 2014 07:18:49 +0000 (07:18 +0000)
committerPeter Edberg <pedberg@unicode.org>
Mon, 24 Feb 2014 07:18:49 +0000 (07:18 +0000)
X-SVN-Rev: 35209

icu4j/main/classes/core/src/com/ibm/icu/impl/LocaleDisplayNamesImpl.java
icu4j/main/classes/core/src/com/ibm/icu/impl/RelativeDateFormat.java
icu4j/main/shared/data/icudata.jar
icu4j/main/shared/data/icutzdata.jar
icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/DateFormatTest.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/DateTimeGeneratorTest.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/MeasureUnitTest.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/NumberFormatTest.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/PluralRulesTest.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/LocaleMatcherTest.java

index 546a38f2bceef8be49b5e3630a61639c43976393..652752cf04994007258a247f16e893945156a726 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *******************************************************************************
- * Copyright (C) 2009-2013, International Business Machines Corporation and    *
+ * Copyright (C) 2009-2014, International Business Machines Corporation and    *
  * others. All Rights Reserved.                                                *
  *******************************************************************************
  */
@@ -46,7 +46,7 @@ public class LocaleDisplayNamesImpl extends LocaleDisplayNames {
         TERRITORY,
         VARIANT, 
         KEY, 
-        TYP
+        KEYVALU
     }
     /**
      * Capitalization transforms. For each usage type, the first array element indicates
@@ -65,7 +65,7 @@ public class LocaleDisplayNamesImpl extends LocaleDisplayNames {
         contextUsageTypeMap.put("territory", CapitalizationContextUsage.TERRITORY);
         contextUsageTypeMap.put("variant",   CapitalizationContextUsage.VARIANT);
         contextUsageTypeMap.put("key",       CapitalizationContextUsage.KEY);
-        contextUsageTypeMap.put("type",      CapitalizationContextUsage.TYPE);
+        contextUsageTypeMap.put("keyValue",  CapitalizationContextUsage.KEYVALUE);
     }
 
     public static LocaleDisplayNames getInstance(ULocale locale, DialectHandling dialectHandling) {
@@ -446,7 +446,7 @@ public class LocaleDisplayNamesImpl extends LocaleDisplayNames {
 
     @Override
     public String keyValueDisplayName(String key, String value) {
-        return adjustForUsageAndContext(CapitalizationContextUsage.TYPE, langData.get("Types", key, value));
+        return adjustForUsageAndContext(CapitalizationContextUsage.KEYVALUE, langData.get("Types", key, value));
     }
 
     public static class DataTable {
index d633754d16cae2c07bf9082a6583c445d64154b8..049d4073a85bbeb6bc2cb709fb10cc15b5789e83 100644 (file)
@@ -271,7 +271,7 @@ public class RelativeDateFormat extends DateFormat {
         fDates = datesSet.toArray(new URelativeString[0]);
 
         try {
-            rdb = rb.getWithFallback("contextTransforms/tense");
+            rdb = rb.getWithFallback("contextTransforms/relative");
             int[] intVector = rdb.getIntVector();
             if (intVector.length >= 2) {
                 capitalizationForRelativeUnitsListOrMenu = (intVector[0] != 0);
index 336472b9d0580188dae0afc02bc5a86e6415a90c..814b513dbf57f567ddad20e63bb61b677c3f30ee 100755 (executable)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:4566f55be0287d4faede2d23c522274b5b998ef05bdcb5b9d42b23d8c33c287e
-size 10999399
+oid sha256:f0939f8f9aa1c4a711c6d39529344d4ff718c29f2882b1bc9c952e104fc2fd95
+size 11002330
index c9c40775ce2cc3d55b6be4a981316812092e2b7e..e7678a7f62046cccdcb6d6ea417d9716471a3bd4 100755 (executable)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:ff5604b4423856615a1849d495a4c6ea3c459ef3c7fba5271169d4800e09bf1f
-size 90860
+oid sha256:932cd0453dd2a4f425092298bddd8739c9c9e757f15b1eb150339df8191b039b
+size 90839
index 8489d95386aee80e718cedf73c93dbf1031d4c2a..00d664b4e898706127e250598891877519dccd91 100644 (file)
@@ -4007,9 +4007,9 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
             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" ),
-            new MonthPatternItem( "zh@calendar=chinese",      DateFormat.LONG,  "\u58EC\u8FB0\u5E74\u56DB\u6708\u4E8C\u65E5",
-                                                                                "\u58EC\u8FB0\u5E74\u95F0\u56DB\u6708\u4E8C\u65E5",
-                                                                                "\u58EC\u8FB0\u5E74\u4E94\u6708\u4E8C\u65E5" ),
+            new MonthPatternItem( "zh@calendar=chinese",      DateFormat.LONG,  "\u58EC\u8FB0\u5E74\u56DB\u6708\u521D\u4E8C",
+                                                                                "\u58EC\u8FB0\u5E74\u95F0\u56DB\u6708\u521D\u4E8C",
+                                                                                "\u58EC\u8FB0\u5E74\u4E94\u6708\u521D\u4E8C" ),
             new MonthPatternItem( "zh@calendar=chinese",      DateFormat.SHORT, "\u58EC\u8FB0-4-2",      "\u58EC\u8FB0-\u95F04-2",   "\u58EC\u8FB0-5-2" ),
             new MonthPatternItem( "zh@calendar=chinese",      -3,               "\u58EC\u8FB0-4-2",
                                                                                 "\u58EC\u8FB0-\u95F04-2",
@@ -4017,9 +4017,9 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
             new MonthPatternItem( "zh@calendar=chinese",      -4,               "\u58EC\u8FB0 \u56DB\u6708 2",
                                                                                 "\u58EC\u8FB0 \u95F0\u56DB\u6708 2",
                                                                                 "\u58EC\u8FB0 \u4E94\u6708 2" ),
-            new MonthPatternItem( "zh_Hant@calendar=chinese", DateFormat.LONG,  "\u58EC\u8FB0\u5E74\u56DB\u6708\u4E8C\u65E5",
-                                                                                "\u58EC\u8FB0\u5E74\u958F\u56DB\u6708\u4E8C\u65E5",
-                                                                                "\u58EC\u8FB0\u5E74\u4E94\u6708\u4E8C\u65E5" ),
+            new MonthPatternItem( "zh_Hant@calendar=chinese", DateFormat.LONG,  "\u58EC\u8FB0\u5E74\u56DB\u6708\u521D\u4E8C",
+                                                                                "\u58EC\u8FB0\u5E74\u958F\u56DB\u6708\u521D\u4E8C",
+                                                                                "\u58EC\u8FB0\u5E74\u4E94\u6708\u521D\u4E8C" ),
             new MonthPatternItem( "zh_Hant@calendar=chinese", DateFormat.SHORT, "\u58EC\u8FB0/4/2",            "\u58EC\u8FB0/\u958F4/2",         "\u58EC\u8FB0/5/2" ),
             new MonthPatternItem( "fr@calendar=chinese",      DateFormat.LONG,  "2 s\u00ECyu\u00E8 ren-chen",  "2 s\u00ECyu\u00E8bis ren-chen",  "2 w\u01D4yu\u00E8 ren-chen" ),
             new MonthPatternItem( "fr@calendar=chinese",      DateFormat.SHORT, "2/4/29",                      "2/4bis/29",                      "2/5/29" ),
index 608702bc6bcc41e3155ccc4ff9ef873903f0010a..4d510ce940934586a431acc4e0c962474393cbb4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *******************************************************************************
- * Copyright (C) 2006-2013, Google, International Business Machines Corporation *
+ * Copyright (C) 2006-2014, Google, International Business Machines Corporation *
  * and others. All Rights Reserved.                                            *
  *******************************************************************************
  */
@@ -460,20 +460,20 @@ public class DateTimeGeneratorTest extends TestFmwk {
         new String[] {"JJmm", "23:58"},
 
         new ULocale("zh@calendar=chinese"),
-        new String[] {"yM", "\u620A\u5BC5\u5E7411\u6708"},
-        new String[] {"yMMM", "\u620A\u5BC5\u5E74\u5341\u4E00\u6708"},
-        new String[] {"yMd", "\u620A\u5BC5\u5E7411\u670826\u65E5"},
-        new String[] {"yMMMd", "\u620A\u5BC5\u5E74\u5341\u4E00\u670826\u65E5"},
+        new String[] {"yM", "\u620A\u5BC5\u5E74\u51AC\u6708"},
+        new String[] {"yMMM", "\u620A\u5BC5\u5E74\u51AC\u6708"},
+        new String[] {"yMd", "\u620A\u5BC5\u5E74\u51AC\u670826\u65E5"},
+        new String[] {"yMMMd", "\u620A\u5BC5\u5E74\u51AC\u670826\u65E5"},
         new String[] {"Md", "11-26"},
-        new String[] {"MMMd", "\u5341\u4E00\u670826\u65E5"},
-        new String[] {"MMMMd", "\u5341\u4E00\u670826\u65E5"},
+        new String[] {"MMMd", "\u51AC\u670826\u65E5"},
+        new String[] {"MMMMd", "\u51AC\u670826\u65E5"},
         new String[] {"yQQQ", "\u620A\u5BC5\u5E74\u7B2C\u56DB\u5B63\u5EA6"},
         new String[] {"hhmm", "\u4E0B\u534811:58"},
         new String[] {"HHmm", "23:58"},
         new String[] {"jjmm", "\u4E0B\u534811:58"},
         new String[] {"mmss", "58:59"},
-        new String[] {"yyyyMMMM", "\u620A\u5BC5\u5E74\u5341\u4E00\u6708"},
-        new String[] {"MMMEd", "\u5341\u4E00\u670826\u65E5\u5468\u4E09"},
+        new String[] {"yyyyMMMM", "\u620A\u5BC5\u5E74\u51AC\u6708"},
+        new String[] {"MMMEd", "\u51AC\u670826\u65E5\u5468\u4E09"},
         new String[] {"Ed", "26\u65E5\u5468\u4E09"},
         new String[] {"jmmssSSS", "\u4E0B\u534811:58:59.123"},
         new String[] {"JJmm", "11:58"},
index d7f9b21b237af8040d90ac1ce6518afe136f63d9..a764c6f2985c4195be909f6735b3a57c6b1b8fa5 100644 (file)
@@ -377,10 +377,10 @@ public class MeasureUnitTest extends TestFmwk {
         Object[][] data = new Object[][] {
                 {ULocale.ENGLISH, FormatWidth.WIDE, "2 miles, 1 foot, 2.3 inches"},
                 {ULocale.ENGLISH, FormatWidth.SHORT, "2 mi, 1 ft, 2.3 in"},
-                {ULocale.ENGLISH, FormatWidth.NARROW, "2mi 1′ 2.3″"},
-                {russia, FormatWidth.WIDE, "2 мили, 1 фут и 2,3 дюйма"},
-                {russia, FormatWidth.SHORT, "2 мили 1 фут 2,3 дюйма"},
-                {russia, FormatWidth.NARROW, "2 мили, 1 фут, 2,3 дюйма"},
+                {ULocale.ENGLISH, FormatWidth.NARROW, "2mi 1\u2032 2.3\u2033"},
+                {russia, FormatWidth.WIDE, "2 \u043C\u0438\u043B\u0438, 1 \u0444\u0443\u0442 \u0438 2,3 \u0434\u044E\u0439\u043C\u0430"},
+                {russia, FormatWidth.SHORT, "2 \u043C\u0438\u043B\u0438, 1 \u0444\u0443\u0442, 2,3 \u0434\u044E\u0439\u043C\u0430"},
+                {russia, FormatWidth.NARROW, "2 \u043C\u0438\u043B\u044C 1 \u0444\u0443\u0442 2,3 \u0434\u044E\u0439\u043C\u0430"},
         };
         for (Object[] row : data) {
             MeasureFormat mf = MeasureFormat.getInstance(
index ed7bee53026677656658da138cf80dbdf29b91d2..4ea0a3044e181486092aa6c50c87be06816fec57 100644 (file)
@@ -3416,13 +3416,13 @@ public class NumberFormatTest extends com.ibm.icu.dev.test.TestFmwk {
                 {"en", "USD", "1.00", "1.00 US dollars"},
                 {"en", "AUD", "1", "1 Australian dollar"},
                 {"en", "AUD", "1.00", "1.00 Australian dollars"},
-                {"sl", "USD", "1", "1 ameriški dolar"},
-                {"sl", "USD", "2", "2 ameriška dolarja"},
-                {"sl", "USD", "3", "3 ameriški dolarji"},
+                {"sl", "USD", "1", "1 ameri\u0161ki dolar"},
+                {"sl", "USD", "2", "2 ameri\u0161ka dolarja"},
+                {"sl", "USD", "3", "3 ameri\u0161ki dolarji"},
                 {"sl", "USD", "5", "5 ameriških dolarjev"},
-                {"ru", "RUB", "1", "1 российский рубль"},
-                {"ru", "RUB", "2", "2 российского рубля"},
-                {"ru", "RUB", "5", "5 российских рублей"},
+                {"ru", "RUB", "1", "1 \u0440\u043E\u0441\u0441\u0438\u0439\u0441\u043A\u0438\u0439 \u0440\u0443\u0431\u043B\u044C"},
+                {"ru", "RUB", "2", "2 \u0440\u043E\u0441\u0441\u0438\u0439\u0441\u043A\u0438\u0445 \u0440\u0443\u0431\u043B\u044F"},
+                {"ru", "RUB", "5", "5 \u0440\u043E\u0441\u0441\u0438\u0439\u0441\u043A\u0438\u0445 \u0440\u0443\u0431\u043B\u0435\u0439"},
         };
         for (String test[] : tests) {
             DecimalFormat numberFormat = (DecimalFormat) DecimalFormat.getInstance(new ULocale(test[0]), NumberFormat.PLURALCURRENCYSTYLE);
index 486755c916aace217b16fdac3ac007357bfe45a8..2f3a8f3969ab724a483ff7fbe86fb1e285ffdb14 100644 (file)
@@ -451,7 +451,7 @@ public class PluralRulesTest extends TestFmwk {
         rules = factory.forLocale(ULocale.createCanonical("ru"));
         assertEquals("ru 0", PluralRules.KEYWORD_MANY, rules.select(0));
         assertEquals("ru 1", PluralRules.KEYWORD_ONE, rules.select(1));
-        assertEquals("ru 2", PluralRules.KEYWORD_OTHER, rules.select(2));
+        assertEquals("ru 2", PluralRules.KEYWORD_FEW, rules.select(2));
     }
 
     public void testFunctionalEquivalent() {
@@ -928,7 +928,7 @@ public class PluralRulesTest extends TestFmwk {
 
         // [one, other]
         "fil,tl; one: 0, 1; other: 0.0, 0.00, 0.03, 0.1, 0.3, 0.30, 1.99, 2, 2.0, 2.00, 2.01, 2.1, 2.10, 3",
-        "ca,de,en,et,fi,gl,it,nl,sw,ur,yi; one: 1; other: 0, 0.0, 0.00, 0.01, 0.1, 0.10, 1.0, 1.00, 1.03, 1.3, 1.30, 1.99, 2, 3",
+        "ca,de,en,et,fi,fy,gl,it,nl,sw,ur,yi; one: 1; other: 0, 0.0, 0.00, 0.01, 0.1, 0.10, 1.0, 1.00, 1.03, 1.3, 1.30, 1.99, 2, 3",
         // danish is now: one: n is 1 or t is not 0 and i is 0,1 @integer 1 @decimal 0.1~0.8
         "da; one: 0.01, 0.1, 1, 0.10, 1.0, 1.00, 1.03, 1.3, 1.30, 1.99; other: 0, 0.0, 0.00, 2, 2.2, 2.9, 3",
         // swedish is now: one: i is 1 and v is 0 @integer 1
@@ -938,7 +938,7 @@ public class PluralRulesTest extends TestFmwk {
         "mk; one: 0.1, 0.31, 1, 11, 31; other: 0, 0.0, 0.00, 1.0, 1.00, 1.03, 1.3, 1.30, 1.99, 2, 3",
         "ak,bh,guw,ln,mg,nso,pa,ti,wa; one: 0, 0.0, 0.00, 1; other: 0.03, 0.1, 0.3, 0.30, 1.99, 2, 2.0, 2.00, 2.01, 2.1, 2.10, 3",
         "tzm; one: 0, 0.0, 0.00, 1, 11, 99; other: 0.03, 0.1, 0.3, 0.30, 1.99, 2, 2.0, 2.00, 2.11, 3",
-        "af,asa,ast,az,bem,bez,bg,brx,cgg,chr,ckb,dv,ee,el,eo,es,eu,fo,fur,fy,gsw,ha,haw,hu,jgo,jmc,ka,kaj,kcg,kk,kkj,kl,ks,ksb,ku,ky,lb,lg,mas,mgo,ml,mn,nah,nb,nd,ne,nn,nnh,no,nr,ny,nyn,om,or,os,pap,ps,rm,rof,rwk,saq,seh,sn,so,sq,ss,ssy,st,syr,ta,te,teo,tig,tk,tn,tr,ts,ve,vo,vun,wae,xh,xog; one: 1, 1.0, 1.00; other: 0, 0.0, 0.00, 0.01, 0.1, 0.10, 1.03, 1.3, 1.30, 1.99, 2, 3",
+        "af,asa,ast,az,bem,bez,bg,brx,cgg,chr,ckb,dv,ee,el,eo,es,eu,fo,fur,gsw,ha,haw,hu,jgo,jmc,ka,kaj,kcg,kk,kkj,kl,ks,ksb,ku,ky,lb,lg,mas,mgo,ml,mn,nah,nb,nd,ne,nn,nnh,no,nr,ny,nyn,om,or,os,pap,ps,rm,rof,rwk,saq,seh,sn,so,sq,ss,ssy,st,syr,ta,te,teo,tig,tk,tn,tr,ts,ve,vo,vun,wae,xh,xog; one: 1, 1.0, 1.00; other: 0, 0.0, 0.00, 0.01, 0.1, 0.10, 1.03, 1.3, 1.30, 1.99, 2, 3",
         // pt is now: i = 1 and v = 0 or i = 0 and t = 1
         "pt; one:  0.1, 0.01, 0.10, 0.001, 0.010, 0.100, 0.0001, 0.0010, 0.0100, 0.1000, 1; other: 0.0, 0.2, 0.3, 1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0",
         "am,bn,fa,gu,hi,kn,mr,zu; one: 0, 0.0, 0.00, 0.03, 0.1, 0.3, 0.30, 0.5, 1; other: 1.99, 2, 2.0, 2.00, 2.01, 2.1, 2.10, 3",
@@ -957,8 +957,8 @@ public class PluralRulesTest extends TestFmwk {
         "bs,hr,sh,sr; one: 0.1, 0.31, 1, 31, 34.31; few: 2, 32, 34; other: 0, 0.0, 0.00, 1.0, 1.00, 1.112, 1.99, 11, 12, 14, 34.0, 34.00, 111, 112, 114, 311, 312, 314",
         "shi; one: 0, 0.0, 0.00, 0.1, 0.12, 0.5, 1; few: 2, 2.0, 2.00, 10; other: 1.99, 2.12, 11, 11.0, 11.00, 11.10, 12",
 
-        // [one, many, other]
-        "ru; one: 1, 31; many: 0, 10, 11, 15, 19, 30, 35, 39, 111, 114, 311, 314; other: 0.0, 0.00, 0.1, 0.31, 1.0, 1.00, 1.30, 1.99, 2, 2.0, 2.00, 2.30, 3",
+        // [one, few, many, other]
+        "ru; one: 1, 31; few: 2, 3; many: 0, 10, 11, 15, 19, 30, 35, 39, 111, 114, 311, 314; other: 0.0, 0.00, 0.1, 0.31, 1.0, 1.00, 1.30, 1.99, 2.0, 2.00, 2.30",
 
         // [one, two, few, other]
         "sl; one: 1, 101, 301; two: 2, 102, 302; few: 0.0, 0.00, 0.1, 0.303, 1.0, 1.00, 1.303, 1.99, 102.0, 102.00, 102.303, 103, 104, 303, 304, 304.0, 304.00, 304.302; other: 0",
index 11d7d6eefe1d440a65d8512ef23d6c704f036c0e..ae4dc8fed9c0403e7fdde5bf577680a4e3de15be 100644 (file)
@@ -79,7 +79,8 @@ public class LocaleMatcherTest extends TestFmwk {
         assertEquals(new ULocale("zh_TW"), matcher.getBestMatch("zh_Hant"));
         assertEquals(new ULocale("zh_CN"), matcher.getBestMatch("zh"));
         assertEquals(new ULocale("zh_CN"), matcher.getBestMatch("zh_Hans_CN"));
-        assertEquals(new ULocale("zh_TW"), matcher.getBestMatch("zh_Hant_HK"));
+        // In CLDR25m1 the following went to zh_TW which was better; filed CLDR #7003
+        assertEquals(new ULocale("zh_CN"), matcher.getBestMatch("zh_Hant_HK"));
         assertEquals(new ULocale("he"), matcher.getBestMatch("iw_IT"));
     }