From 1a147d096ae81f4c8262f7bfc56bd19fc2dee932 Mon Sep 17 00:00:00 2001 From: Apple Date: Thu, 2 Apr 2020 17:18:03 +0000 Subject: [PATCH] ICU-64252.0.1.tar.gz --- icuSources/data/lang/ar.txt | 4 +- icuSources/data/lang/ca.txt | 2 +- icuSources/data/lang/da.txt | 4 +- icuSources/data/lang/de.txt | 2 +- icuSources/data/lang/en.txt | 4 +- icuSources/data/lang/en_AU.txt | 2 + icuSources/data/lang/es_419.txt | 1 - icuSources/data/lang/fi.txt | 2 +- icuSources/data/lang/fr.txt | 2 +- icuSources/data/lang/fr_CA.txt | 1 - icuSources/data/lang/he.txt | 4 +- icuSources/data/lang/hi.txt | 4 +- icuSources/data/lang/hr.txt | 4 +- icuSources/data/lang/hu.txt | 4 +- icuSources/data/lang/ja.txt | 8 +- icuSources/data/lang/ko.txt | 4 +- icuSources/data/lang/nb.txt | 2 +- icuSources/data/lang/nl.txt | 4 +- icuSources/data/lang/pl.txt | 2 +- icuSources/data/lang/pt.txt | 2 +- icuSources/data/lang/pt_PT.txt | 3 +- icuSources/data/lang/ro.txt | 2 +- icuSources/data/lang/ru.txt | 4 +- icuSources/data/lang/sv.txt | 4 +- icuSources/data/lang/th.txt | 2 +- icuSources/data/lang/tr.txt | 4 +- icuSources/data/lang/uk.txt | 4 +- icuSources/data/lang/vi.txt | 2 +- icuSources/data/lang/zh.txt | 4 +- icuSources/data/lang/zh_Hant.txt | 4 +- icuSources/data/locales/en_001.txt | 17 ++ icuSources/data/locales/en_BE.txt | 18 +- icuSources/data/locales/es_MX.txt | 9 +- icuSources/data/locales/hu.txt | 2 +- icuSources/data/unit/it.txt | 20 +- icuSources/data/unit/nb.txt | 28 +- icuSources/data/unit/nl.txt | 14 + icuSources/data/unit/yue.txt | 12 +- icuSources/data/unit/yue_Hans.txt | 12 +- icuSources/i18n/csrsbcs.cpp | 4 + icuSources/i18n/decimfmt.cpp | 3 +- icuSources/i18n/inputext.cpp | 15 +- icuSources/i18n/inputext.h | 1 + icuSources/i18n/number_mapper.cpp | 3 +- icuSources/test/cintltst/cdattst.c | 270 +++++++++++++++++- icuSources/test/cintltst/cloctst.c | 14 + icuSources/test/cintltst/cmeasureformattest.c | 27 +- icuSources/test/cintltst/cnumtst.c | 56 ++++ icuSources/test/cintltst/ucsdetst.c | 7 +- icuSources/test/intltest/measfmttest.cpp | 2 +- icuSources/test/intltest/numbertest_api.cpp | 16 +- icuSources/test/intltest/numfmtst.cpp | 2 +- 52 files changed, 528 insertions(+), 119 deletions(-) diff --git a/icuSources/data/lang/ar.txt b/icuSources/data/lang/ar.txt index 1694a938..ce9cce06 100644 --- a/icuSources/data/lang/ar.txt +++ b/icuSources/data/lang/ar.txt @@ -46,7 +46,7 @@ ar{ arc{"الآرامية"} arn{"المابودونغونية"} arp{"الأراباهو"} - ars{"اللهجة النجدية"} + ars{"العربية، النجدية"} arw{"الأراواكية"} as{"الأسامية"} asa{"الآسو"} @@ -105,7 +105,7 @@ ar{ chp{"الشيباوايان"} chr{"الشيروكي"} chy{"الشايان"} - ckb{"السورانية الكردية"} + ckb{"الكردية، السورانية"} co{"الكورسيكية"} cop{"القبطية"} cr{"الكرى"} diff --git a/icuSources/data/lang/ca.txt b/icuSources/data/lang/ca.txt index 1964301a..104eeb9f 100644 --- a/icuSources/data/lang/ca.txt +++ b/icuSources/data/lang/ca.txt @@ -114,7 +114,7 @@ ca{ chp{"chipewyan"} chr{"cherokee"} chy{"xeiene"} - ckb{"kurd central"} + ckb{"kurd sorani"} co{"cors"} cop{"copte"} cr{"cree"} diff --git a/icuSources/data/lang/da.txt b/icuSources/data/lang/da.txt index 7fccea9f..9a8b8856 100644 --- a/icuSources/data/lang/da.txt +++ b/icuSources/data/lang/da.txt @@ -46,7 +46,7 @@ da{ arc{"aramæisk"} arn{"mapudungun"} arp{"arapaho"} - ars{"Najd-arabisk"} + ars{"arabisk, najdi"} arw{"arawak"} as{"assamesisk"} asa{"asu"} @@ -105,7 +105,7 @@ da{ chp{"chipewyan"} chr{"cherokee"} chy{"cheyenne"} - ckb{"sorani"} + ckb{"kurdisk, sorani"} co{"korsikansk"} cop{"koptisk"} cr{"cree"} diff --git a/icuSources/data/lang/de.txt b/icuSources/data/lang/de.txt index 45c8754a..e8707b99 100644 --- a/icuSources/data/lang/de.txt +++ b/icuSources/data/lang/de.txt @@ -122,7 +122,7 @@ de{ chp{"Chipewyan"} chr{"Cherokee"} chy{"Cheyenne"} - ckb{"Zentralkurdisch"} + ckb{"Kurdisch (Sorani)"} co{"Korsisch"} cop{"Koptisch"} cps{"Capiznon"} diff --git a/icuSources/data/lang/en.txt b/icuSources/data/lang/en.txt index 038caf08..2d2089d4 100644 --- a/icuSources/data/lang/en.txt +++ b/icuSources/data/lang/en.txt @@ -68,7 +68,7 @@ en{ aro{"Araona"} arp{"Arapaho"} arq{"Algerian Arabic"} - ars{"Najdi Arabic"} + ars{"Arabic, Najdi"} arw{"Arawak"} ary{"Moroccan Arabic"} arz{"Egyptian Arabic"} @@ -140,7 +140,7 @@ en{ chp{"Chipewyan"} chr{"Cherokee"} chy{"Cheyenne"} - ckb{"Central Kurdish"} + ckb{"Kurdish, Sorani"} co{"Corsican"} cop{"Coptic"} cps{"Capiznon"} diff --git a/icuSources/data/lang/en_AU.txt b/icuSources/data/lang/en_AU.txt index 6cd710e2..7b78cec9 100644 --- a/icuSources/data/lang/en_AU.txt +++ b/icuSources/data/lang/en_AU.txt @@ -3,7 +3,9 @@ en_AU{ %%Parent{"en_001"} Languages{ + ars{"Arabic (Najdi)"} bn{"Bengali"} + ckb{"Kurdish (Sorani)"} en_US{"United States English"} frc{"frc"} lou{"lou"} diff --git a/icuSources/data/lang/es_419.txt b/icuSources/data/lang/es_419.txt index 5fd3fa85..fbf80072 100644 --- a/icuSources/data/lang/es_419.txt +++ b/icuSources/data/lang/es_419.txt @@ -14,7 +14,6 @@ es_419{ ady{"adigeo"} alt{"altái del sur"} arp{"arapajó"} - ars{"árabe de Néyed"} bla{"siksiká"} ccp{"chakma"} eu{"vasco"} diff --git a/icuSources/data/lang/fi.txt b/icuSources/data/lang/fi.txt index 0dfbc2db..a5f63a6a 100644 --- a/icuSources/data/lang/fi.txt +++ b/icuSources/data/lang/fi.txt @@ -123,7 +123,7 @@ fi{ chp{"chipewyan"} chr{"cherokee"} chy{"cheyenne"} - ckb{"sorani"} + ckb{"kurdi – soranî"} co{"korsika"} cop{"kopti"} cps{"capiznon"} diff --git a/icuSources/data/lang/fr.txt b/icuSources/data/lang/fr.txt index 249d3556..75a5fc3b 100644 --- a/icuSources/data/lang/fr.txt +++ b/icuSources/data/lang/fr.txt @@ -123,7 +123,7 @@ fr{ chp{"chipewyan"} chr{"cherokee"} chy{"cheyenne"} - ckb{"sorani"} + ckb{"kurde sorani"} co{"corse"} cop{"copte"} cps{"capiznon"} diff --git a/icuSources/data/lang/fr_CA.txt b/icuSources/data/lang/fr_CA.txt index 6a6d2829..2f7043b8 100644 --- a/icuSources/data/lang/fr_CA.txt +++ b/icuSources/data/lang/fr_CA.txt @@ -13,7 +13,6 @@ fr_CA{ byv{"medumba"} chg{"tchagatay"} chn{"chinook"} - ckb{"kurde central"} cr{"cri"} den{"slave"} dgr{"tlicho"} diff --git a/icuSources/data/lang/he.txt b/icuSources/data/lang/he.txt index 10677e98..be1de0c2 100644 --- a/icuSources/data/lang/he.txt +++ b/icuSources/data/lang/he.txt @@ -46,7 +46,7 @@ he{ arc{"ארמית"} arn{"אראוקנית"} arp{"אראפהו"} - ars{"ערבית - נג׳ד"} + ars{"ערבית - נ׳גד"} arw{"ארוואק"} as{"אסאמית"} asa{"אסו"} @@ -107,7 +107,7 @@ he{ chp{"צ׳יפוויאן"} chr{"צ׳רוקי"} chy{"שאיין"} - ckb{"כורדית סוראנית"} + ckb{"כורדית - סוראני"} co{"קורסיקנית"} cop{"קופטית"} cr{"קרי"} diff --git a/icuSources/data/lang/hi.txt b/icuSources/data/lang/hi.txt index 872c4914..96caf0e9 100644 --- a/icuSources/data/lang/hi.txt +++ b/icuSources/data/lang/hi.txt @@ -46,7 +46,7 @@ hi{ arc{"ऐरेमेक"} arn{"मापूचे"} arp{"अरापाहो"} - ars{"नज्दी अरबी"} + ars{"अरबी, नज्दी"} arw{"अरावक"} as{"असमिया"} asa{"असु"} @@ -97,7 +97,7 @@ hi{ chp{"शिपेव्यान"} chr{"चेरोकी"} chy{"शेयेन्न"} - ckb{"सोरानी कुर्दिश"} + ckb{"कुर्दी, सोरानी"} co{"कोर्सीकन"} cop{"कॉप्टिक"} cr{"क्री"} diff --git a/icuSources/data/lang/hr.txt b/icuSources/data/lang/hr.txt index a321e217..bb6a9650 100644 --- a/icuSources/data/lang/hr.txt +++ b/icuSources/data/lang/hr.txt @@ -46,7 +46,7 @@ hr{ arc{"aramejski"} arn{"mapuche"} arp{"arapaho"} - ars{"najdi arapski"} + ars{"arapski, najdi"} arw{"aravački"} as{"asamski"} asa{"asu"} @@ -107,7 +107,7 @@ hr{ chp{"chipewyan"} chr{"čerokijski"} chy{"čejenski"} - ckb{"soranski kurdski"} + ckb{"kurdski, sorani"} co{"korzički"} cop{"koptski"} cr{"cree"} diff --git a/icuSources/data/lang/hu.txt b/icuSources/data/lang/hu.txt index 4faf2169..5bdc9920 100644 --- a/icuSources/data/lang/hu.txt +++ b/icuSources/data/lang/hu.txt @@ -46,7 +46,7 @@ hu{ arc{"arámi"} arn{"mapucse"} arp{"arapaho"} - ars{"nedzsdi arab"} + ars{"arab, nedzsdi"} arw{"aravak"} as{"asszámi"} asa{"asu"} @@ -106,7 +106,7 @@ hu{ chp{"csipevé"} chr{"cseroki"} chy{"csejen"} - ckb{"közép-ázsiai kurd"} + ckb{"kurd, szoráni"} co{"korzikai"} cop{"kopt"} cr{"krí"} diff --git a/icuSources/data/lang/ja.txt b/icuSources/data/lang/ja.txt index ca6ad95b..e4b5b5ab 100644 --- a/icuSources/data/lang/ja.txt +++ b/icuSources/data/lang/ja.txt @@ -50,8 +50,8 @@ ja{ arn{"マプチェ語"} aro{"アラオナ語"} arp{"アラパホー語"} - arq{"アルジェリア・アラビア語"} - ars{"ナジュド地方・アラビア語"} + arq{"アラビア語(アルジェリア)"} + ars{"アラビア語(ナジュド地方)"} arw{"アラワク語"} ary{"モロッコ・アラビア語"} arz{"エジプト・アラビア語"} @@ -750,7 +750,7 @@ ja{ Nkoo{"ンコ文字"} Nshu{"女書"} Ogam{"オガム文字"} - Olck{"オルチキ文字"} + Olck{"オル・チキ文字"} Orkh{"オルホン文字"} Orya{"オリヤー文字"} Osma{"オスマニア文字"} @@ -968,7 +968,7 @@ ja{ mymrshan{"ミャンマー・シャン数字"} native{"独自の記数法"} nkoo{"ンコ数字"} - olck{"オルチキ数字"} + olck{"オル・チキ数字"} orya{"オリヤー数字"} osma{"オスマニア数字"} roman{"ローマ数字"} diff --git a/icuSources/data/lang/ko.txt b/icuSources/data/lang/ko.txt index 38e406f5..4aae078b 100644 --- a/icuSources/data/lang/ko.txt +++ b/icuSources/data/lang/ko.txt @@ -47,7 +47,7 @@ ko{ arc{"아람어"} arn{"마푸둥군어"} arp{"아라파호어"} - arq{"알제리 아랍어"} + arq{"아랍어(알제리)"} ars{"아랍어(나즈디)"} arw{"아라와크어"} ary{"모로코 아랍어"} @@ -111,7 +111,7 @@ ko{ chp{"치페우얀"} chr{"체로키어"} chy{"샤이엔어"} - ckb{"소라니 쿠르드어"} + ckb{"쿠르드어(소라니)"} co{"코르시카어"} cop{"콥트어"} cr{"크리어"} diff --git a/icuSources/data/lang/nb.txt b/icuSources/data/lang/nb.txt index 44fab8c9..17eb367c 100644 --- a/icuSources/data/lang/nb.txt +++ b/icuSources/data/lang/nb.txt @@ -51,7 +51,7 @@ nb{ aro{"araona"} arp{"arapaho"} arq{"algerisk arabisk"} - ars{"najdi-arabisk"} + ars{"arabisk (najd)"} arw{"arawak"} ary{"marokkansk-arabisk"} arz{"egyptisk arabisk"} diff --git a/icuSources/data/lang/nl.txt b/icuSources/data/lang/nl.txt index 7f923e3c..31d5e5d5 100644 --- a/icuSources/data/lang/nl.txt +++ b/icuSources/data/lang/nl.txt @@ -50,7 +50,7 @@ nl{ aro{"Araona"} arp{"Arapaho"} arq{"Algerijns Arabisch"} - ars{"Nadjdi-Arabisch"} + ars{"Arabisch, Nadjdi"} arw{"Arawak"} ary{"Marokkaans Arabisch"} arz{"Egyptisch Arabisch"} @@ -122,7 +122,7 @@ nl{ chp{"Chipewyan"} chr{"Cherokee"} chy{"Cheyenne"} - ckb{"Soranî"} + ckb{"Koerdisch, Soranî"} co{"Corsicaans"} cop{"Koptisch"} cps{"Capiznon"} diff --git a/icuSources/data/lang/pl.txt b/icuSources/data/lang/pl.txt index 29343d38..dc28ea25 100644 --- a/icuSources/data/lang/pl.txt +++ b/icuSources/data/lang/pl.txt @@ -123,7 +123,7 @@ pl{ chp{"czipewiański"} chr{"czirokeski"} chy{"czejeński"} - ckb{"sorani"} + ckb{"kurdyjski sorani"} co{"korsykański"} cop{"koptyjski"} cps{"capiznon"} diff --git a/icuSources/data/lang/pt.txt b/icuSources/data/lang/pt.txt index 0c0efd5c..64019361 100644 --- a/icuSources/data/lang/pt.txt +++ b/icuSources/data/lang/pt.txt @@ -107,7 +107,7 @@ pt{ chp{"chipewyan"} chr{"cheroqui"} chy{"cheiene"} - ckb{"curdo central"} + ckb{"curdo sorâni"} co{"corso"} cop{"copta"} cr{"cree"} diff --git a/icuSources/data/lang/pt_PT.txt b/icuSources/data/lang/pt_PT.txt index 93ea6dc5..1897fa28 100644 --- a/icuSources/data/lang/pt_PT.txt +++ b/icuSources/data/lang/pt_PT.txt @@ -18,7 +18,6 @@ pt_PT{ ang{"inglês antigo"} ar_001{"árabe moderno padrão"} arn{"mapuche"} - ars{"árabe do Négede"} av{"avaric"} bax{"bamun"} bbj{"ghomala"} @@ -28,7 +27,7 @@ pt_PT{ chn{"jargão chinook"} chr{"cherokee"} chy{"cheyenne"} - ckb{"sorani curdo"} + ckb{"curdo sorani"} co{"córsico"} crs{"francês crioulo seselwa"} cs{"checo"} diff --git a/icuSources/data/lang/ro.txt b/icuSources/data/lang/ro.txt index 526b322c..e240e9ee 100644 --- a/icuSources/data/lang/ro.txt +++ b/icuSources/data/lang/ro.txt @@ -105,7 +105,7 @@ ro{ chp{"chipewyan"} chr{"cherokee"} chy{"cheyenne"} - ckb{"kurdă centrală"} + ckb{"kurdă sorani"} co{"corsicană"} cop{"coptă"} cr{"cree"} diff --git a/icuSources/data/lang/ru.txt b/icuSources/data/lang/ru.txt index d332bdab..3db1a91a 100644 --- a/icuSources/data/lang/ru.txt +++ b/icuSources/data/lang/ru.txt @@ -46,7 +46,7 @@ ru{ arc{"арамейский"} arn{"мапуче"} arp{"арапахо"} - ars{"недждийский арабский"} + ars{"арабская (недждийский)"} arw{"аравакский"} as{"ассамский"} asa{"асу"} @@ -106,7 +106,7 @@ ru{ chp{"чипевьян"} chr{"чероки"} chy{"шайенский"} - ckb{"сорани"} + ckb{"курдская (сорани)"} co{"корсиканский"} cop{"коптский"} cr{"кри"} diff --git a/icuSources/data/lang/sv.txt b/icuSources/data/lang/sv.txt index a4996dd2..95e2f8b4 100644 --- a/icuSources/data/lang/sv.txt +++ b/icuSources/data/lang/sv.txt @@ -51,7 +51,7 @@ sv{ aro{"araoniska"} arp{"arapaho"} arq{"algerisk arabiska"} - ars{"najdiarabiska"} + ars{"arabiska (najd)"} arw{"arawakiska"} ary{"marockansk arabiska"} arz{"egyptisk arabiska"} @@ -123,7 +123,7 @@ sv{ chp{"chipewyan"} chr{"cherokesiska"} chy{"cheyenne"} - ckb{"soranisk kurdiska"} + ckb{"kurdiska (sorani)"} co{"korsikanska"} cop{"koptiska"} cps{"kapisnon"} diff --git a/icuSources/data/lang/th.txt b/icuSources/data/lang/th.txt index a30760af..d660a8a6 100644 --- a/icuSources/data/lang/th.txt +++ b/icuSources/data/lang/th.txt @@ -122,7 +122,7 @@ th{ chp{"ชิพิวยัน"} chr{"เชอโรกี"} chy{"เชเยนเน"} - ckb{"เคิร์ดตอนกลาง"} + ckb{"เคิร์ดโซรานี"} co{"คอร์ซิกา"} cop{"คอปติก"} cps{"กาปิซนอน"} diff --git a/icuSources/data/lang/tr.txt b/icuSources/data/lang/tr.txt index f28debee..10cc5634 100644 --- a/icuSources/data/lang/tr.txt +++ b/icuSources/data/lang/tr.txt @@ -51,7 +51,7 @@ tr{ aro{"Araona"} arp{"Arapaho Dili"} arq{"Cezayir Arapçası"} - ars{"Necd Arapçası"} + ars{"Arapça, Necd"} arw{"Arawak Dili"} ary{"Fas Arapçası"} arz{"Mısır Arapçası"} @@ -124,7 +124,7 @@ tr{ chp{"Çipevya dili"} chr{"Çerokice"} chy{"Şayence"} - ckb{"Orta Kürtçe"} + ckb{"Kürtçe, Sorani"} co{"Korsikaca"} cop{"Kıptice"} cps{"Capiznon"} diff --git a/icuSources/data/lang/uk.txt b/icuSources/data/lang/uk.txt index 08f5363b..10f84805 100644 --- a/icuSources/data/lang/uk.txt +++ b/icuSources/data/lang/uk.txt @@ -49,7 +49,7 @@ uk{ aro{"араона"} arp{"арапахо"} arq{"алжирська арабська"} - ars{"надждійська арабська"} + ars{"арабська, надждійська"} arw{"аравакська"} as{"асамська"} asa{"асу"} @@ -117,7 +117,7 @@ uk{ chp{"чіпевʼян"} chr{"черокі"} chy{"чейєнн"} - ckb{"центральнокурдська"} + ckb{"курдська, сорані"} co{"корсиканська"} cop{"коптська"} cr{"крі"} diff --git a/icuSources/data/lang/vi.txt b/icuSources/data/lang/vi.txt index 4e8a5e6b..00879b1c 100644 --- a/icuSources/data/lang/vi.txt +++ b/icuSources/data/lang/vi.txt @@ -120,7 +120,7 @@ vi{ chp{"Tiếng Chipewyan"} chr{"Tiếng Cherokee"} chy{"Tiếng Cheyenne"} - ckb{"Tiếng Kurd Miền Trung"} + ckb{"Tiếng Kurd Sorani"} co{"Tiếng Corsica"} cop{"Tiếng Coptic"} cps{"Tiếng Capiznon"} diff --git a/icuSources/data/lang/zh.txt b/icuSources/data/lang/zh.txt index ddd4868e..062c191f 100644 --- a/icuSources/data/lang/zh.txt +++ b/icuSources/data/lang/zh.txt @@ -46,7 +46,7 @@ zh{ arc{"阿拉米语"} arn{"马普切语"} arp{"阿拉帕霍语"} - ars{"纳吉迪阿拉伯语"} + ars{"阿拉伯语(纳吉迪)"} arw{"阿拉瓦克语"} as{"阿萨姆语"} asa{"阿苏语"} @@ -107,7 +107,7 @@ zh{ chp{"奇佩维安语"} chr{"切罗基语"} chy{"夏延语"} - ckb{"中库尔德语"} + ckb{"库尔德语(索拉尼)"} co{"科西嘉语"} cop{"科普特语"} cr{"克里族语"} diff --git a/icuSources/data/lang/zh_Hant.txt b/icuSources/data/lang/zh_Hant.txt index 2f3a7f07..c9d1ce66 100644 --- a/icuSources/data/lang/zh_Hant.txt +++ b/icuSources/data/lang/zh_Hant.txt @@ -52,7 +52,7 @@ zh_Hant{ aro{"阿拉奧納文"} arp{"阿拉帕霍文"} arq{"阿爾及利亞阿拉伯文"} - ars{"納吉迪阿拉伯文"} + ars{"阿拉伯文(納吉迪)"} arw{"阿拉瓦克文"} ary{"摩洛哥阿拉伯文"} arz{"埃及阿拉伯文"} @@ -124,7 +124,7 @@ zh_Hant{ chp{"奇佩瓦揚文"} chr{"柴羅基文"} chy{"沙伊安文"} - ckb{"中庫德文"} + ckb{"庫德文(索拉尼)"} co{"科西嘉文"} cop{"科普特文"} cps{"卡皮茲文"} diff --git a/icuSources/data/locales/en_001.txt b/icuSources/data/locales/en_001.txt index a36117da..162be6e7 100644 --- a/icuSources/data/locales/en_001.txt +++ b/icuSources/data/locales/en_001.txt @@ -279,6 +279,23 @@ en_001{ } } } + japanese{ + DateTimePatterns{ + "h:mm:ss a zzzz", + "h:mm:ss a z", + "h:mm:ss a", + "h:mm a", + "EEEE, d MMMM y G", + "d MMMM y G", + "d MMM y G", + "dd/MM/y GGGGG", + "{1}, {0}", + "{1} 'at' {0}", + "{1} 'at' {0}", + "{1} 'at' {0}", + "{1}, {0}", + } + } } fields{ dayOfYear-narrow{ diff --git a/icuSources/data/locales/en_BE.txt b/icuSources/data/locales/en_BE.txt index 421de337..2bfffb20 100644 --- a/icuSources/data/locales/en_BE.txt +++ b/icuSources/data/locales/en_BE.txt @@ -29,14 +29,26 @@ en_BE{ "{1}, {0}", } availableFormats{ + H{"HH"} + Hm{"HH:mm"} + Hms{"HH:mm:ss"} + Hmsv{"HH:mm:ss v"} + Hmv{"HH:mm v"} MEd{"E d/M"} + MMMEd{"E, d MMM"} + MMMMd{"d MMMM"} + MMMd{"d MMM"} Md{"d/M"} h{"h a"} hm{"h:mm a"} hms{"h:mm:ss a"} hmsv{"h:mm:ss a v"} hmv{"h:mm a v"} + ms{"mm:ss"} + yyyyM{"MM/y GGGGG"} yyyyMEd{"E d/M/y G"} + yyyyMMMEd{"E, d MMM y G"} + yyyyMMMd{"d MMM y G"} yyyyMd{"d/M/y G"} } } @@ -56,12 +68,6 @@ en_BE{ "{1} 'at' {0}", "{1}, {0}", } - availableFormats{ - MEd{"E d/M"} - Md{"d/M"} - yMEd{"E d/M/y"} - yMd{"d/M/y"} - } } } } diff --git a/icuSources/data/locales/es_MX.txt b/icuSources/data/locales/es_MX.txt index a2ccc3b9..9c25b161 100644 --- a/icuSources/data/locales/es_MX.txt +++ b/icuSources/data/locales/es_MX.txt @@ -94,6 +94,7 @@ es_MX{ } } } + minimumGroupingDigits{"1"} } Version{"2.1.47.96"} calendar{ @@ -156,14 +157,6 @@ es_MX{ } } gregorian{ - AmPmMarkers{ - "a. m.", - "p. m.", - } - AmPmMarkersAbbr{ - "a. m.", - "p. m.", - } DateTimePatterns{ "H:mm:ss zzzz", "H:mm:ss z", diff --git a/icuSources/data/locales/hu.txt b/icuSources/data/locales/hu.txt index c49d285b..44a36acb 100644 --- a/icuSources/data/locales/hu.txt +++ b/icuSources/data/locales/hu.txt @@ -216,7 +216,7 @@ hu{ other{"A kosár tartalma: {0} X. Megveszi őket?"} } } - minimumGroupingDigits{"4"} + minimumGroupingDigits{"1"} native{"latn"} } Version{"2.1.48.42"} diff --git a/icuSources/data/unit/it.txt b/icuSources/data/unit/it.txt index 545b501b..cdc6a56c 100644 --- a/icuSources/data/unit/it.txt +++ b/icuSources/data/unit/it.txt @@ -925,23 +925,23 @@ it{ duration{ day{ dnam{"giorno"} - one{"{0}g"} - other{"{0}g"} + one{"{0} g"} + other{"{0} g"} } hour{ dnam{"ora"} - one{"{0}h"} - other{"{0}h"} + one{"{0} h"} + other{"{0} h"} } millisecond{ dnam{"ms"} - one{"{0}ms"} - other{"{0}ms"} + one{"{0} ms"} + other{"{0} ms"} } minute{ dnam{"min"} - one{"{0}min"} - other{"{0}min"} + one{"{0} min"} + other{"{0} min"} } month{ dnam{"mese"} @@ -950,8 +950,8 @@ it{ } second{ dnam{"s"} - one{"{0}s"} - other{"{0}s"} + one{"{0} s"} + other{"{0} s"} } week{ dnam{"sett."} diff --git a/icuSources/data/unit/nb.txt b/icuSources/data/unit/nb.txt index 592331fd..b0a9e8fd 100644 --- a/icuSources/data/unit/nb.txt +++ b/icuSources/data/unit/nb.txt @@ -934,30 +934,30 @@ nb{ } day{ dnam{"døgn"} - one{"{0}d"} - other{"{0}d"} + one{"{0} d"} + other{"{0} d"} per{"{0}/d"} } hour{ dnam{"time"} - one{"{0}t"} - other{"{0}t"} + one{"{0} t"} + other{"{0} t"} per{"{0}/t"} } microsecond{ dnam{"μs"} - one{"{0}μs"} - other{"{0}μs"} + one{"{0} μs"} + other{"{0} μs"} } millisecond{ dnam{"ms"} - one{"{0}ms"} - other{"{0}ms"} + one{"{0} ms"} + other{"{0} ms"} } minute{ dnam{"min"} - one{"{0}m"} - other{"{0}m"} + one{"{0} m"} + other{"{0} m"} per{"{0}/m"} } month{ @@ -968,13 +968,13 @@ nb{ } nanosecond{ dnam{"ns"} - one{"{0}ns"} - other{"{0}ns"} + one{"{0} ns"} + other{"{0} ns"} } second{ dnam{"sek"} - one{"{0}s"} - other{"{0}s"} + one{"{0} s"} + other{"{0} s"} per{"{0}/s"} } week{ diff --git a/icuSources/data/unit/nl.txt b/icuSources/data/unit/nl.txt index 149f98e3..e3fe3aaa 100644 --- a/icuSources/data/unit/nl.txt +++ b/icuSources/data/unit/nl.txt @@ -1186,6 +1186,10 @@ nl{ one{"{0}°"} other{"{0}°"} } + fahrenheit{ + dnam{"°F"} + other{"{0}°F"} + } } torque{ newton-meter{ @@ -1660,6 +1664,16 @@ nl{ other{"{0} kt"} } } + temperature{ + celsius{ + dnam{"°C"} + other{"{0} °C"} + } + fahrenheit{ + dnam{"°F"} + other{"{0} °F"} + } + } torque{ newton-meter{ dnam{"N⋅m"} diff --git a/icuSources/data/unit/yue.txt b/icuSources/data/unit/yue.txt index fbe4196b..827a97af 100644 --- a/icuSources/data/unit/yue.txt +++ b/icuSources/data/unit/yue.txt @@ -554,7 +554,7 @@ yue{ speed{ kilometer-per-hour{ dnam{"公里/小時"} - other{"每小時 {0} 公里"} + other{"{0}公里/小時"} } knot{ dnam{"節"} @@ -562,7 +562,7 @@ yue{ } meter-per-second{ dnam{"米/秒"} - other{"每秒 {0} 米"} + other{"{0}米/秒"} } mile-per-hour{ dnam{"英里/小時"} @@ -1064,10 +1064,10 @@ yue{ speed{ kilometer-per-hour{ dnam{"公里/小時"} - other{"{0}公里/小時"} + other{"{0}公里/時"} } meter-per-second{ - other{"{0}m/s"} + other{"{0}米/秒"} } mile-per-hour{ other{"{0}英里/小時"} @@ -1704,7 +1704,7 @@ yue{ speed{ kilometer-per-hour{ dnam{"公里/小時"} - other{"每小時{0}公里"} + other{"{0}公里/時"} } knot{ dnam{"節"} @@ -1712,7 +1712,7 @@ yue{ } meter-per-second{ dnam{"米/秒"} - other{"每秒{0}米"} + other{"{0}米/秒"} } mile-per-hour{ dnam{"英里/小時"} diff --git a/icuSources/data/unit/yue_Hans.txt b/icuSources/data/unit/yue_Hans.txt index 25f8fa72..860935c4 100644 --- a/icuSources/data/unit/yue_Hans.txt +++ b/icuSources/data/unit/yue_Hans.txt @@ -555,7 +555,7 @@ yue_Hans{ speed{ kilometer-per-hour{ dnam{"每小时公里"} - other{"每小时 {0} 公里"} + other{"{0}公里/小时"} } knot{ dnam{"节"} @@ -563,7 +563,7 @@ yue_Hans{ } meter-per-second{ dnam{"每秒公尺"} - other{"每秒 {0} 米"} + other{"{0}米/秒"} } mile-per-hour{ dnam{"每小时英里"} @@ -1062,10 +1062,10 @@ yue_Hans{ speed{ kilometer-per-hour{ dnam{"公里/小时"} - other{"{0}公里/小时"} + other{"{0}公里/时"} } meter-per-second{ - other{"{0}m/s"} + other{"{0}米/秒"} } mile-per-hour{ other{"{0}英里/小时"} @@ -1702,7 +1702,7 @@ yue_Hans{ speed{ kilometer-per-hour{ dnam{"公里/小时"} - other{"每小时{0}公里"} + other{"{0}公里/时"} } knot{ dnam{"节"} @@ -1710,7 +1710,7 @@ yue_Hans{ } meter-per-second{ dnam{"公尺/秒"} - other{"每秒{0}米"} + other{"{0}米/秒"} } mile-per-hour{ dnam{"英里/小时"} diff --git a/icuSources/i18n/csrsbcs.cpp b/icuSources/i18n/csrsbcs.cpp index 0b0d8967..c3819585 100644 --- a/icuSources/i18n/csrsbcs.cpp +++ b/icuSources/i18n/csrsbcs.cpp @@ -902,6 +902,10 @@ UBool CharsetRecog_8859_1::match(InputText *textIn, CharsetMatch *results) const bestConfidenceSoFar = confidence; } } + if (bestConfidenceSoFar < 10 && textIn->fOnlyTypicalASCII) { // rdar://56373519 + bestConfidenceSoFar = 15; + results->set(textIn, this, bestConfidenceSoFar, name); + } return (bestConfidenceSoFar > 0); } diff --git a/icuSources/i18n/decimfmt.cpp b/icuSources/i18n/decimfmt.cpp index bb3e0bb6..d428cddc 100644 --- a/icuSources/i18n/decimfmt.cpp +++ b/icuSources/i18n/decimfmt.cpp @@ -1934,7 +1934,8 @@ void DecimalFormat::doFastFormatInt32(int32_t input, bool isNegative, UnicodeStr char16_t localBuffer[localCapacity]; char16_t* ptr = localBuffer + localCapacity; int8_t group = 0; - for (int8_t i = 0; i < fields->fastData.maxInt && (input != 0 || i < fields->fastData.minInt); i++) { + int8_t minInt = (fields->fastData.minInt < 1)? 1: fields->fastData.minInt; // rdar://54569257 + for (int8_t i = 0; i < fields->fastData.maxInt && (input != 0 || i < minInt); i++) { if (group++ == 3 && fields->fastData.cpGroupingSeparator != 0) { *(--ptr) = fields->fastData.cpGroupingSeparator; group = 1; diff --git a/icuSources/i18n/inputext.cpp b/icuSources/i18n/inputext.cpp index e74d636c..ab0b697e 100644 --- a/icuSources/i18n/inputext.cpp +++ b/icuSources/i18n/inputext.cpp @@ -50,6 +50,7 @@ void InputText::setText(const char *in, int32_t len) { fInputLen = 0; fC1Bytes = FALSE; + fOnlyTypicalASCII = FALSE; // rdar://56373519 fRawInput = (const uint8_t *) in; fRawLength = len == -1? (int32_t)uprv_strlen(in) : len; } @@ -163,12 +164,20 @@ void InputText::MungeInput(UBool fStripTags) { fByteStats[fInputBytes[srci]] += 1; } - for (int32_t i = 0x80; i <= 0x9F; i += 1) { + fOnlyTypicalASCII = TRUE; // rdar://56373519 + for (int32_t i = 0x01; i <= 0xFF; i += 1) { if (fByteStats[i] != 0) { - fC1Bytes = TRUE; - break; + if ((i < 0x20 && i != 0x09 && i != 0x0A && i != 0x0D) || i > 0x7E) { + fOnlyTypicalASCII = FALSE; // rdar://56373519 + if (i >= 0x80 && i <= 0x9F) { + fC1Bytes = TRUE; + } + } } } + if (fByteStats[0] > 1) { + fOnlyTypicalASCII = FALSE; + } } U_NAMESPACE_END diff --git a/icuSources/i18n/inputext.h b/icuSources/i18n/inputext.h index 8edc561f..020bb4c6 100644 --- a/icuSources/i18n/inputext.h +++ b/icuSources/i18n/inputext.h @@ -47,6 +47,7 @@ public: // Value is rounded up, so zero really means zero occurences. int16_t *fByteStats; UBool fC1Bytes; // True if any bytes in the range 0x80 - 0x9F are in the input;false by default + UBool fOnlyTypicalASCII; // True if has only byte values that are typical for ASCII // rdar://56373519 char *fDeclaredEncoding; const uint8_t *fRawInput; // Original, untouched input bytes. diff --git a/icuSources/i18n/number_mapper.cpp b/icuSources/i18n/number_mapper.cpp index a13bcb00..47867490 100644 --- a/icuSources/i18n/number_mapper.cpp +++ b/icuSources/i18n/number_mapper.cpp @@ -127,9 +127,10 @@ MacroProps NumberPropertyMapper::oldToNew(const DecimalFormatProperties& propert // Validate min/max int/frac. // For backwards compatibility, minimum overrides maximum if the two conflict. // The following logic ensures that there is always a minimum of at least one digit. + // Except that we allow minInt=0, minFrac=0 if maxInt!=0 - rdar://54569257 if (minInt == 0 && maxFrac != 0) { // Force a digit after the decimal point. - minFrac = minFrac <= 0 ? 1 : minFrac; + minFrac = (minFrac < 0 || (minFrac==0 && maxInt==0)) ? 1 : minFrac; // rdar://54569257 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; minInt = 0; maxInt = maxInt < 0 ? -1 : maxInt > kMaxIntFracSig ? -1 : maxInt; diff --git a/icuSources/test/cintltst/cdattst.c b/icuSources/test/cintltst/cdattst.c index eaaf02e2..12df2965 100644 --- a/icuSources/test/cintltst/cdattst.c +++ b/icuSources/test/cintltst/cdattst.c @@ -606,7 +606,7 @@ static void TestRelativeDateFormat() /*Testing udat_getSymbols() and udat_setSymbols() and udat_countSymbols()*/ static void TestSymbols() { - UDateFormat *def, *fr, *zhChiCal; + UDateFormat *def, *fr, *zhChiCal, *esMX; UErrorCode status = U_ZERO_ERROR; UChar *value=NULL; UChar *result = NULL; @@ -645,6 +645,15 @@ static void TestSymbols() myErrorName(status) ); return; } + /*creating a dateformat with es_MX locale */ + log_verbose("\ncreating a date format with es_MX locale\n"); + esMX = udat_open(UDAT_SHORT, UDAT_NONE, "es_MX", NULL, 0, NULL, 0, &status); + if(U_FAILURE(status)) + { + log_data_err("error in creating the dateformat using no date, short time, locale es_MX -> %s (Are you missing data?)\n", + myErrorName(status) ); + return; + } /*Testing countSymbols, getSymbols and setSymbols*/ @@ -714,6 +723,8 @@ static void TestSymbols() VerifygetSymbols(zhChiCal, UDAT_CYCLIC_YEARS_NARROW, 59, "\\u7678\\u4EA5"); VerifygetSymbols(zhChiCal, UDAT_ZODIAC_NAMES_ABBREVIATED, 0, "\\u9F20"); VerifygetSymbols(zhChiCal, UDAT_ZODIAC_NAMES_WIDE, 11, "\\u732A"); + VerifygetSymbols(esMX, UDAT_AM_PMS, 0, "a.m."); // see + VerifygetSymbols(esMX, UDAT_AM_PMS, 1, "p.m."); // see #if UDAT_HAS_PATTERN_CHAR_FOR_TIME_SEPARATOR VerifygetSymbols(def,UDAT_LOCALIZED_CHARS, 0, "GyMdkHmsSEDFwWahKzYeugAZvcLQqVUOXxrbB:"); #else @@ -854,6 +865,7 @@ free(pattern); udat_close(fr); udat_close(def); udat_close(zhChiCal); + udat_close(esMX); if(result != NULL) { free(result); result = NULL; @@ -3029,6 +3041,258 @@ static const char * remapResults_es_PR_japanese[] = { // rdar://52461062 NULL }; +static const char * remapResults_en_IN[] = { // rdar://56309604 + "h:mm:ss a zzzz", // full + "HH:mm:ss zzzz", // force24 + "h:mm:ss a zzzz", // force12 + "h:mm:ss a z", // long + "HH:mm:ss z", // force24 + "h:mm:ss a z", // force12 + "h:mm:ss a", // medium + "HH:mm:ss", // force24 + "h:mm:ss a", // force12 + "h:mm a", // short + "HH:mm", // force24 + "h:mm a", // force12 + "EEEE, d MMMM y 'at' h:mm:ss a z", // long_df + "EEEE, d MMMM y 'at' HH:mm:ss z", // force24 + "EEEE, d MMMM y 'at' h:mm:ss a z", // force12 + "dd/MM/yy, h:mm a", // short_ds + "dd/MM/yy, HH:mm", // force24 + "dd/MM/yy, h:mm a", // force12 + + "h:mm:ss a", // jmmss + "HH:mm:ss", // force24 + "h:mm:ss a", // force12 + "h:mm:ss a", // jjmmss + "HH:mm:ss", // force24 + "HH:mm:ss", // force24 | match hour field length + "h:mm:ss a", // force12 + "hh:mm:ss a", // force12 | match hour field length + "hh:mm", // Jmm + "HH:mm", // force24 + "hh:mm", // force12 + "h:mm:ss a v", // jmsv + "HH:mm:ss v", // force24 + "h:mm:ss a v", // force12 + "h:mm:ss a z", // jmsz + "HH:mm:ss z", // force24 + "h:mm:ss a z", // force12 + + "h:mm:ss a", // "h:mm:ss" + "HH:mm:ss", // + "a'xx'h:mm:ss d MMM y", // "a'xx'h:mm:ss d MMM y" + "HH:mm:ss d MMM y", // + "EEE, d MMM y 'aha' h:mm:ss a 'hrs'", // "EEE, d MMM y 'aha' h:mm:ss a 'hrs'" + "EEE, d MMM y 'aha' HH:mm:ss 'hrs'", // + "EEE, d MMM y 'aha' a'xx'h:mm:ss", // "EEE, d MMM y 'aha' a'xx'h:mm:ss" + "EEE, d MMM y 'aha' HH:mm:ss", // + "yyMMddhhmmss", // "yyMMddhhmmss" + "yyMMddHHmmss", // + + "h:mm:ss a", // "H:mm:ss" + "H:mm:ss", // + "h:mm:ss a d MMM y", // "H:mm:ss d MMM y" + "H:mm:ss d MMM y", // + "EEE, d MMM y 'aha' h:mm:ss a 'hrs'", // "EEE, d MMM y 'aha' H:mm:ss 'hrs'" + "EEE, d MMM y 'aha' H:mm:ss 'hrs'", // + "EEE, d MMM y 'aha' h'h'mm'm'ss a", // "EEE, d MMM y 'aha' H'h'mm'm'ss" + "EEE, d MMM y 'aha' H'h'mm'm'ss", // + + "uuuu-MM-dd h:mm:ss a '+0000'", // + + NULL +}; + +static const char * remapResults_en_IN_japanese[] = { // rdar://56309604 + "h:mm:ss a zzzz", // full + "HH:mm:ss zzzz", // force24 + "h:mm:ss a zzzz", // force12 + "h:mm:ss a z", // long + "HH:mm:ss z", // force24 + "h:mm:ss a z", // force12 + "h:mm:ss a", // medium + "HH:mm:ss", // force24 + "h:mm:ss a", // force12 + "h:mm a", // short + "HH:mm", // force24 + "h:mm a", // force12 + "EEEE, d MMMM y G 'at' h:mm:ss a z", // long_df + "EEEE, d MMMM y G 'at' HH:mm:ss z", // force24 + "EEEE, d MMMM y G 'at' h:mm:ss a z", // force12 + "dd/MM/y GGGGG, h:mm a", // short_ds + "dd/MM/y GGGGG, HH:mm", // force24 + "dd/MM/y GGGGG, h:mm a", // force12 + + "h:mm:ss a", // jmmss + "HH:mm:ss", // force24 + "h:mm:ss a", // force12 + "h:mm:ss a", // jjmmss + "HH:mm:ss", // force24 + "HH:mm:ss", // force24 | match hour field length + "h:mm:ss a", // force12 + "hh:mm:ss a", // force12 | match hour field length + "hh:mm", // Jmm + "HH:mm", // force24 + "hh:mm", // force12 + "h:mm:ss a v", // jmsv + "HH:mm:ss v", // force24 + "h:mm:ss a v", // force12 + "h:mm:ss a z", // jmsz + "HH:mm:ss z", // force24 + "h:mm:ss a z", // force12 + + "h:mm:ss a", // "h:mm:ss" + "HH:mm:ss", // + "a'xx'h:mm:ss d MMM y", // "a'xx'h:mm:ss d MMM y" + "HH:mm:ss d MMM y", // + "EEE, d MMM y 'aha' h:mm:ss a 'hrs'", // "EEE, d MMM y 'aha' h:mm:ss a 'hrs'" + "EEE, d MMM y 'aha' HH:mm:ss 'hrs'", // + "EEE, d MMM y 'aha' a'xx'h:mm:ss", // "EEE, d MMM y 'aha' a'xx'h:mm:ss" + "EEE, d MMM y 'aha' HH:mm:ss", // + "yyMMddhhmmss", // "yyMMddhhmmss" + "yyMMddHHmmss", // + + "h:mm:ss a", // "H:mm:ss" + "H:mm:ss", // + "h:mm:ss a d MMM y", // "H:mm:ss d MMM y" + "H:mm:ss d MMM y", // + "EEE, d MMM y 'aha' h:mm:ss a 'hrs'", // "EEE, d MMM y 'aha' H:mm:ss 'hrs'" + "EEE, d MMM y 'aha' H:mm:ss 'hrs'", // + "EEE, d MMM y 'aha' h'h'mm'm'ss a", // "EEE, d MMM y 'aha' H'h'mm'm'ss" + "EEE, d MMM y 'aha' H'h'mm'm'ss", // + + "uuuu-MM-dd h:mm:ss a '+0000'", // + + NULL +}; + +static const char * remapResults_en_BE[] = { // rdar://56309604 + "HH:mm:ss zzzz", // full + "HH:mm:ss zzzz", // force24 + "h:mm:ss a zzzz", // force12 + "HH:mm:ss z", // long + "HH:mm:ss z", // force24 + "h:mm:ss a z", // force12 + "HH:mm:ss", // medium + "HH:mm:ss", // force24 + "h:mm:ss a", // force12 + "HH:mm", // short + "HH:mm", // force24 + "h:mm a", // force12 + "EEEE, d MMMM y 'at' HH:mm:ss z", // long_df + "EEEE, d MMMM y 'at' HH:mm:ss z", // force24 + "EEEE, d MMMM y 'at' h:mm:ss a z", // force12 + "dd/MM/y, HH:mm", // short_ds + "dd/MM/y, HH:mm", // force24 + "dd/MM/y, h:mm a", // force12 + + "HH:mm:ss", // jmmss + "HH:mm:ss", // force24 + "h:mm:ss a", // force12 + "HH:mm:ss", // jjmmss + "HH:mm:ss", // force24 + "HH:mm:ss", // force24 | match hour field length + "h:mm:ss a", // force12 + "hh:mm:ss a", // force12 | match hour field length + "HH:mm", // Jmm + "HH:mm", // force24 + "hh:mm", // force12 + "HH:mm:ss v", // jmsv + "HH:mm:ss v", // force24 + "h:mm:ss a v", // force12 + "HH:mm:ss z", // jmsz + "HH:mm:ss z", // force24 + "h:mm:ss a z", // force12 + + "h:mm:ss a", // "h:mm:ss" force12 + "HH:mm:ss", // force24 + "a'xx'h:mm:ss d MMM y", // "a'xx'h:mm:ss d MMM y" force12 + "HH:mm:ss d MMM y", // force24 + "EEE, d MMM y 'aha' h:mm:ss a 'hrs'", // "EEE, d MMM y 'aha' h:mm:ss a 'hrs'" force12 + "EEE, d MMM y 'aha' HH:mm:ss 'hrs'", // + "EEE, d MMM y 'aha' a'xx'h:mm:ss", // "EEE, d MMM y 'aha' a'xx'h:mm:ss" + "EEE, d MMM y 'aha' HH:mm:ss", // + "yyMMddhhmmss", // "yyMMddhhmmss" force12 + "yyMMddHHmmss", // + + "h:mm:ss a", // "H:mm:ss" + "H:mm:ss", // + "h:mm:ss a d MMM y", // "H:mm:ss d MMM y" + "H:mm:ss d MMM y", // + "EEE, d MMM y 'aha' h:mm:ss a 'hrs'", // "EEE, d MMM y 'aha' H:mm:ss 'hrs'" + "EEE, d MMM y 'aha' H:mm:ss 'hrs'", // + "EEE, d MMM y 'aha' h'h'mm'm'ss a", // "EEE, d MMM y 'aha' H'h'mm'm'ss" + "EEE, d MMM y 'aha' H'h'mm'm'ss", // + + "uuuu-MM-dd h:mm:ss a '+0000'", // + + NULL +}; + +static const char * remapResults_en_BE_japanese[] = { // rdar://56309604 + "HH:mm:ss zzzz", // full + "HH:mm:ss zzzz", // force24 + "h:mm:ss a zzzz", // force12 + "HH:mm:ss z", // long + "HH:mm:ss z", // force24 + "h:mm:ss a z", // force12 + "HH:mm:ss", // medium + "HH:mm:ss", // force24 + "h:mm:ss a", // force12 + "HH:mm", // short + "HH:mm", // force24 + "h:mm a", // force12 + "EEEE, d MMMM y G 'at' HH:mm:ss z", // long_df + "EEEE, d MMMM y G 'at' HH:mm:ss z", // force24 + "EEEE, d MMMM y G 'at' h:mm:ss a z", // force12 + "dd/MM/y GGGGG, HH:mm", // short_ds + "dd/MM/y GGGGG, HH:mm", // force24 + "dd/MM/y GGGGG, h:mm a", // force12 + + "HH:mm:ss", // jmmss + "HH:mm:ss", // force24 + "h:mm:ss a", // force12 + "HH:mm:ss", // jjmmss + "HH:mm:ss", // force24 + "HH:mm:ss", // force24 | match hour field length + "h:mm:ss a", // force12 + "hh:mm:ss a", // force12 | match hour field length + "HH:mm", // Jmm + "HH:mm", // force24 + "hh:mm", // force12 + "HH:mm:ss v", // jmsv + "HH:mm:ss v", // force24 + "h:mm:ss a v", // force12 + "HH:mm:ss z", // jmsz + "HH:mm:ss z", // force24 + "h:mm:ss a z", // force12 + + "h:mm:ss a", // "h:mm:ss" force12 + "HH:mm:ss", // force24 + "a'xx'h:mm:ss d MMM y", // "a'xx'h:mm:ss d MMM y" force12 + "HH:mm:ss d MMM y", // force24 + "EEE, d MMM y 'aha' h:mm:ss a 'hrs'", // "EEE, d MMM y 'aha' h:mm:ss a 'hrs'" force12 + "EEE, d MMM y 'aha' HH:mm:ss 'hrs'", // + "EEE, d MMM y 'aha' a'xx'h:mm:ss", // "EEE, d MMM y 'aha' a'xx'h:mm:ss" + "EEE, d MMM y 'aha' HH:mm:ss", // + "yyMMddhhmmss", // "yyMMddhhmmss" force12 + "yyMMddHHmmss", // + + "h:mm:ss a", // "H:mm:ss" + "H:mm:ss", // + "h:mm:ss a d MMM y", // "H:mm:ss d MMM y" + "H:mm:ss d MMM y", // + "EEE, d MMM y 'aha' h:mm:ss a 'hrs'", // "EEE, d MMM y 'aha' H:mm:ss 'hrs'" + "EEE, d MMM y 'aha' H:mm:ss 'hrs'", // + "EEE, d MMM y 'aha' h'h'mm'm'ss a", // "EEE, d MMM y 'aha' H'h'mm'm'ss" + "EEE, d MMM y 'aha' H'h'mm'm'ss", // + + "uuuu-MM-dd h:mm:ss a '+0000'", // + + NULL +}; + typedef struct { const char * locale; const char ** resultsPtr; @@ -3044,6 +3308,10 @@ static const RemapPatternLocaleResults remapLocResults[] = { { "ar", remapResults_ar }, { "en_IL", remapResults_en_IL }, { "es_PR@calendar=japanese", remapResults_es_PR_japanese }, + { "en_IN", remapResults_en_IN }, + { "en_IN@calendar=japanese", remapResults_en_IN_japanese }, + { "en_BE", remapResults_en_BE }, + { "en_BE@calendar=japanese", remapResults_en_BE_japanese }, { NULL, NULL } }; diff --git a/icuSources/test/cintltst/cloctst.c b/icuSources/test/cintltst/cloctst.c index d9d78b64..73b73d82 100644 --- a/icuSources/test/cintltst/cloctst.c +++ b/icuSources/test/cintltst/cloctst.c @@ -8144,6 +8144,18 @@ static const char * prefLangsMSx[] = { "en_NZ" }; static const char * prefLangsMSy[] = { "en_NZ", "en_AU" }; static const char * locsToUseMSa[] = { "en_GB", "en" }; static const char * locsToUseMSb[] = { "en_AU", "en_GB", "en" }; +// For +static const char * appleLocsMT[] = { "ca-ES", "fi", "nl", "en-US", "hu", "pt-BR", "pl-PL", "it", + "ru", "el", "el-GR", "ca", "de-DE", "sv-SE", "tr", "pl", + "sv", "tr-TR", "da", "en", "nb", "pt-PT", "nb-NO", + "es-ES@collation=traditional", "sl-SI", "cs", "hu-HU", + "cs-CZ", "sk", "sl", "de", "da-DK", "es-MX", "vi", "nl-NL", + "es", "fi-FI", "fr", "it-IT", "es-ES", "fr-CA", "vi-VN", + "pt", "sk-SK", "eu-ES", "ru-RU", "eu", "fr-FR", "unk" }; +static const char * prefLangsMTa[] = { "en" }; +static const char * prefLangsMTb[] = { "he" }; +static const char * locsToUseMTa[] = { "en" }; +static const char * locsToUseMTb[] = { }; typedef struct { const char * name; @@ -8233,6 +8245,8 @@ static const MultiPrefTest multiTestSets[] = { { "MSay", appleLocsMSa, UPRV_LENGTHOF(appleLocsMSa), prefLangsMSy, UPRV_LENGTHOF(prefLangsMSy), locsToUseMSa, UPRV_LENGTHOF(locsToUseMSa) }, { "MSbx", appleLocsMSb, UPRV_LENGTHOF(appleLocsMSb), prefLangsMSx, UPRV_LENGTHOF(prefLangsMSx), locsToUseMSb, UPRV_LENGTHOF(locsToUseMSb) }, { "MSby", appleLocsMSb, UPRV_LENGTHOF(appleLocsMSb), prefLangsMSy, UPRV_LENGTHOF(prefLangsMSy), locsToUseMSb, UPRV_LENGTHOF(locsToUseMSb) }, + { "MTa", appleLocsMT, UPRV_LENGTHOF(appleLocsMT), prefLangsMTa, UPRV_LENGTHOF(prefLangsMTa), locsToUseMTa, UPRV_LENGTHOF(locsToUseMTa) }, + { "MTb", appleLocsMT, UPRV_LENGTHOF(appleLocsMT), prefLangsMTb, UPRV_LENGTHOF(prefLangsMTb), locsToUseMTb, UPRV_LENGTHOF(locsToUseMTb) }, { NULL, NULL, 0, NULL, 0, NULL, 0 } }; diff --git a/icuSources/test/cintltst/cmeasureformattest.c b/icuSources/test/cintltst/cmeasureformattest.c index dabab038..dbf4123f 100644 --- a/icuSources/test/cintltst/cmeasureformattest.c +++ b/icuSources/test/cintltst/cmeasureformattest.c @@ -169,6 +169,27 @@ static const SingleUnitFormat cs_singFmt[] = { { (UAMeasureUnit)0, 0, NULL, NULL, NULL, NULL, NULL, NULL } }; +static const SingleUnitFormat nl_singFmt[] = { +// unit value wide_2 wide_0 shrt_X shrt_1 narr_0 numr_0 wide_0 narr_0 + { UAMEASUNIT_TEMPERATURE_CELSIUS, 37.203, "37,20 graden Celsius", "37 graden Celsius", "37,203\\u00A0\\u00B0C", "37,2\\u00A0\\u00B0C", "37\\u00B0", "37\\u00B0", 0,2, 0,2 }, + { UAMEASUNIT_TEMPERATURE_FAHRENHEIT, 37.203, "37,20 graden Fahrenheit", "37 graden Fahrenheit", "37,203\\u00A0\\u00B0F", "37,2\\u00A0\\u00B0F", "37\\u00B0F", "37\\u00B0", 0,2, 0,2 }, + { (UAMeasureUnit)0, 0, NULL, NULL, NULL, NULL, NULL, NULL } +}; + +static const SingleUnitFormat it_singFmt[] = { +// unit value wide_2 wide_0 shrt_X shrt_1 narr_0 numr_0 wide_0 narr_0 + { UAMEASUNIT_DURATION_HOUR, 37.203, "37,20 ore", "37 ore", "37,203 h", "37,2 h", "37 h", "37 h", 0,2, 0,2 }, + { UAMEASUNIT_DURATION_MINUTE, 37.203, "37,20 minuti", "37 minuti", "37,203 min", "37,2 min", "37 min", "37 min", 0,2, 0,2 }, + { (UAMeasureUnit)0, 0, NULL, NULL, NULL, NULL, NULL, NULL } +}; + +static const SingleUnitFormat nb_singFmt[] = { +// unit value wide_2 wide_0 shrt_X shrt_1 narr_0 numr_0 wide_0 narr_0 + { UAMEASUNIT_DURATION_HOUR, 37.203, "37,20 timer", "37 timer", "37,203 t", "37,2 t", "37 t", "37 t", 0,2, 0,2 }, + { UAMEASUNIT_DURATION_MINUTE, 37.203, "37,20 minutter", "37 minutter", "37,203 min", "37,2 min", "37 m", "37 m", 0,2, 0,2 }, + { (UAMeasureUnit)0, 0, NULL, NULL, NULL, NULL, NULL, NULL } +}; + static const SingleUnitName en_singNam[] = { // unit wide shrt narr { UAMEASUNIT_DURATION_MINUTE, "minutes", "min", "min" }, @@ -328,11 +349,11 @@ static const LocaleWidthNumFmtItem lwnItems[] = { { "hr", NULL, NULL, NULL, NULL }, // hr: try plural cases for 1, 2, 5 { "hu", NULL, NULL, NULL, NULL }, // hu: try plural cases for 1, other { "id", NULL, NULL, NULL, NULL }, // id: try plural cases for other only - { "it", NULL, NULL, NULL, NULL }, // it: try plural cases for 1, other + { "it", it_singFmt, NULL, NULL, NULL }, // it: try plural cases for 1, other { "ko", NULL, NULL, NULL, NULL }, // ko: try plural cases for other only { "ms", NULL, NULL, NULL, NULL }, // ms: try plural cases for other only - { "nb", NULL, NULL, NULL, NULL }, // nb: try plural cases for 1, other - { "nl", NULL, NULL, NULL, NULL }, // nl: try plural cases for 1, other + { "nb", nb_singFmt, NULL, NULL, NULL }, // nb: try plural cases for 1, other + { "nl", nl_singFmt, NULL, NULL, NULL }, // nl: try plural cases for 1, other { "pl", NULL, NULL, NULL, NULL }, // pl: try plural cases for 1, 2, 5, 8.5 { "pt", NULL, NULL, NULL, NULL }, // pt: try plural cases for 1, other { "pt_PT", NULL, NULL, NULL, NULL }, diff --git a/icuSources/test/cintltst/cnumtst.c b/icuSources/test/cintltst/cnumtst.c index e2979046..cbf090ed 100644 --- a/icuSources/test/cintltst/cnumtst.c +++ b/icuSources/test/cintltst/cnumtst.c @@ -88,6 +88,7 @@ static void TestMinimumGrouping(void); // Apple static void TestNumberSystemsMultiplier(void); // Apple static void TestParseScientific(void); // Apple static void TestCurrForUnkRegion(void); // Apple +static void TestMinIntMinFracZero(void); // Apple #if APPLE_ADDITIONS static void TestFormatDecPerf(void); // Apple #endif @@ -142,6 +143,7 @@ void addNumForTest(TestNode** root) TESTCASE(TestNumberSystemsMultiplier); // Apple TESTCASE(TestParseScientific); // Apple TESTCASE(TestCurrForUnkRegion); // Apple + TESTCASE(TestMinIntMinFracZero); // Apple #if APPLE_ADDITIONS TESTCASE(TestFormatDecPerf); // Apple #endif @@ -4251,6 +4253,60 @@ static void TestCurrForUnkRegion(void) { } } +static void TestMinIntMinFracZero(void) { + UErrorCode status = U_ZERO_ERROR; + UNumberFormat* unum = unum_open(UNUM_DECIMAL, NULL, 0, "en_US", NULL, &status); + if ( U_FAILURE(status) ) { + log_data_err("unum_open UNUM_DECIMAL for en_US fails with %s\n", u_errorName(status)); + } else { + UChar ubuf[kUBufMax]; + char bbuf[kBBufMax]; + int minInt, minFrac, ulen; + + unum_setAttribute(unum, UNUM_MIN_INTEGER_DIGITS, 0); + unum_setAttribute(unum, UNUM_MIN_FRACTION_DIGITS, 0); + minInt = unum_getAttribute(unum, UNUM_MIN_INTEGER_DIGITS); + minFrac = unum_getAttribute(unum, UNUM_MIN_FRACTION_DIGITS); + if (minInt != 0 || minFrac != 0) { + log_err("after setting minInt=minFrac=0, get minInt %d, minFrac %d\n", minInt, minFrac); + } + ulen = unum_toPattern(unum, FALSE, ubuf, kUBufMax, &status); + if ( U_SUCCESS(status) ) { + u_strToUTF8(bbuf, kBBufMax, NULL, ubuf, ulen, &status); + log_info("after setting minInt=minFrac=0, pattern (%d): %s\n", ulen, bbuf); + } + + status = U_ZERO_ERROR; + ulen = unum_formatDouble(unum, 10.0, ubuf, kUBufMax, NULL, &status); + if ( U_FAILURE(status) ) { + log_err("unum_formatDouble 10.0 ulen %d fails with %s\n", ulen, u_errorName(status)); + } else if (u_strcmp(ubuf, u"10") != 0) { + u_strToUTF8(bbuf, kBBufMax, NULL, ubuf, ulen, &status); + log_err("unum_formatDouble 10.0 expected \"10\", got \"%s\"\n", bbuf); + } + + status = U_ZERO_ERROR; + ulen = unum_formatDouble(unum, 0.9, ubuf, kUBufMax, NULL, &status); + if ( U_FAILURE(status) ) { + log_err("unum_formatDouble 0.9 ulen %d fails with %s\n", ulen, u_errorName(status)); + } else if (u_strcmp(ubuf, u".9") != 0) { + u_strToUTF8(bbuf, kBBufMax, NULL, ubuf, ulen, &status); + log_err("unum_formatDouble 0.9 expected \".9\", got \"%s\"\n", bbuf); + } + + status = U_ZERO_ERROR; + ulen = unum_formatDouble(unum, 0.0, ubuf, kUBufMax, NULL, &status); + if ( U_FAILURE(status) ) { + log_err("unum_formatDouble 0.0 ulen %d fails with %s\n", ulen, u_errorName(status)); + } else if (u_strcmp(ubuf, u"0") != 0) { + u_strToUTF8(bbuf, kBBufMax, NULL, ubuf, ulen, &status); + log_err("unum_formatDouble 0.0 expected \"0\", got \"%s\"\n", bbuf); + } + + unum_close(unum); + } +} + #if APPLE_ADDITIONS #include #if U_PLATFORM_IS_DARWIN_BASED diff --git a/icuSources/test/cintltst/ucsdetst.c b/icuSources/test/cintltst/ucsdetst.c index ac155ce5..24bde2d3 100644 --- a/icuSources/test/cintltst/ucsdetst.c +++ b/icuSources/test/cintltst/ucsdetst.c @@ -657,6 +657,8 @@ static const SampleTextAndEncoding mailSampleTests[] = { { "../testdata/encodingSamples/mailExample_Latin1Esc_7.txt", "iso-8859-1" }, { "../testdata/encodingSamples/mailExample_Latin1Esc_8.txt", "iso-8859-1" }, { "../testdata/encodingSamples/mailExample_Latin1Esc_9.txt", "iso-8859-1" }, + // additions for + { "../testdata/encodingSamples/mailExample_Latin1_11.txt", "iso-8859-1" }, { NULL, NULL } }; @@ -684,11 +686,12 @@ static void TestMailFilterCSS(void) { } else { const char *icuName = ucsdet_getName(highestMatch, &status); int32_t confidence = ucsdet_getConfidence(highestMatch, &status); + const char *langCode = ucsdet_getLanguage(highestMatch, &status); if (U_FAILURE(status) || icuName==NULL) { log_err("ucsdet_getName and/or ucsdet_getConfidence fails for text file %s: %s\n", testPtr->sampleTextPath, u_errorName(status)); } else { - log_info("For text file %s: expect %s; get %s with confidence %d, text length %ld\n", - testPtr->sampleTextPath, testPtr->encodingName, icuName, confidence, sampleTextLen); + log_info("For text file %s: expect %s; get %s with confidence %d, langCode %s; text length %ld\n", + testPtr->sampleTextPath, testPtr->encodingName, icuName, confidence, langCode, sampleTextLen); } } } diff --git a/icuSources/test/intltest/measfmttest.cpp b/icuSources/test/intltest/measfmttest.cpp index e8da7f2d..069e5500 100644 --- a/icuSources/test/intltest/measfmttest.cpp +++ b/icuSources/test/intltest/measfmttest.cpp @@ -2285,7 +2285,7 @@ void MeasureFormatTest::TestManyLocaleDurations() { helperTestManyLocaleDurations("is", UMEASFMT_WIDTH_NUMERIC, measures, UPRV_LENGTHOF(measures), "5:37"); helperTestManyLocaleDurations("ja", UMEASFMT_WIDTH_NARROW, measures, UPRV_LENGTHOF(measures), "5\\u6642\\u959337\\u5206"); helperTestManyLocaleDurations("ja", UMEASFMT_WIDTH_NUMERIC, measures, UPRV_LENGTHOF(measures), "5:37"); - helperTestManyLocaleDurations("nb", UMEASFMT_WIDTH_NARROW, measures, UPRV_LENGTHOF(measures), "5t, 37m"); + helperTestManyLocaleDurations("nb", UMEASFMT_WIDTH_NARROW, measures, UPRV_LENGTHOF(measures), "5 t, 37 m"); helperTestManyLocaleDurations("nb", UMEASFMT_WIDTH_NUMERIC, measures, UPRV_LENGTHOF(measures), "5:37"); helperTestManyLocaleDurations("nl", UMEASFMT_WIDTH_NARROW, measures, UPRV_LENGTHOF(measures), "5 u, 37 m"); helperTestManyLocaleDurations("nl", UMEASFMT_WIDTH_NUMERIC, measures, UPRV_LENGTHOF(measures), "5:37"); diff --git a/icuSources/test/intltest/numbertest_api.cpp b/icuSources/test/intltest/numbertest_api.cpp index 8d6fe87f..f0d941d3 100644 --- a/icuSources/test/intltest/numbertest_api.cpp +++ b/icuSources/test/intltest/numbertest_api.cpp @@ -1345,8 +1345,10 @@ void NumberFormatterApiTest::grouping() { u"8.765", u"0"); - // NOTE: Hungarian is interesting because it has minimumGroupingDigits=4 in locale data - // If this test breaks due to data changes, find another locale that has minimumGroupingDigits. + // NOTE: Hungarian was interesting because it had minimumGroupingDigits=4 in locale data. + // Open source has fixed Hungarian to have minimumGroupingDigits=1 and changed this test to + // use Polish with minimumGroupingDigits=2. However for now we keep the test using Hungarian + // to verify the change. assertFormatDescendingBig( u"Hungarian Grouping", u"group-auto", @@ -1354,9 +1356,9 @@ void NumberFormatterApiTest::grouping() { Locale("hu"), u"87 650 000", u"8 765 000", - u"876500", - u"87650", - u"8765", + u"876 500", + u"87 650", + u"8 765", u"876,5", u"87,65", u"8,765", @@ -1369,8 +1371,8 @@ void NumberFormatterApiTest::grouping() { Locale("hu"), u"87 650 000", u"8 765 000", - u"876500", - u"87650", + u"876 500", + u"87 650", u"8765", u"876,5", u"87,65", diff --git a/icuSources/test/intltest/numfmtst.cpp b/icuSources/test/intltest/numfmtst.cpp index 4ddcfd04..579d27bf 100644 --- a/icuSources/test/intltest/numfmtst.cpp +++ b/icuSources/test/intltest/numfmtst.cpp @@ -6968,7 +6968,7 @@ void NumberFormatTest::TestExplicitParents() { {"es_CO", "1250,75" }, {"es_ES", "1250,75" }, {"es_GQ", "1250,75" }, - {"es_MX", "1250.75" }, + {"es_MX", "1,250.75" }, {"es_US", "1250.75" }, {"es_VE", "1250,75" }, }; -- 2.45.2