summaryrefslogtreecommitdiffstats
path: root/intl/icu-patches/bug-1636984-append-item-dayperiod-fractional-seconds.diff
diff options
context:
space:
mode:
Diffstat (limited to 'intl/icu-patches/bug-1636984-append-item-dayperiod-fractional-seconds.diff')
-rw-r--r--intl/icu-patches/bug-1636984-append-item-dayperiod-fractional-seconds.diff86
1 files changed, 86 insertions, 0 deletions
diff --git a/intl/icu-patches/bug-1636984-append-item-dayperiod-fractional-seconds.diff b/intl/icu-patches/bug-1636984-append-item-dayperiod-fractional-seconds.diff
new file mode 100644
index 0000000000..32ba468950
--- /dev/null
+++ b/intl/icu-patches/bug-1636984-append-item-dayperiod-fractional-seconds.diff
@@ -0,0 +1,86 @@
+# Add <appendItem> entries for "DayPeriod" and "FractionalSeconds" to avoid the
+# "├ ┤" parentheses from ICU and instead use the normal "( )" parentheses.
+#
+# CLDR bug: https://unicode-org.atlassian.net/browse/CLDR-13184
+
+diff --git a/intl/icu/source/data/locales/root.txt b/intl/icu/source/data/locales/root.txt
+--- a/intl/icu/source/data/locales/root.txt
++++ b/intl/icu/source/data/locales/root.txt
+@@ -213,17 +213,19 @@ root{
+ }
+ NoonMarker:alias{"/LOCALE/calendar/gregorian/NoonMarker"}
+ NoonMarkerNarrow:alias{"/LOCALE/calendar/gregorian/NoonMarkerNarrow"}
+ appendItems{
+ Day{"{0} ({2}: {1})"}
++ DayPeriod{"{0} ({2}: {1})"}
+ Day-Of-Week{"{0} {1}"}
+ Era{"{1} {0}"}
+ Hour{"{0} ({2}: {1})"}
+ Minute{"{0} ({2}: {1})"}
+ Month{"{0} ({2}: {1})"}
+ Quarter{"{0} ({2}: {1})"}
+ Second{"{0} ({2}: {1})"}
++ FractionalSecond{"{0} ({2}: {1})"}
+ Timezone{"{0} {1}"}
+ Week{"{0} ({2}: {1})"}
+ Year{"{1} {0}"}
+ }
+ availableFormats{
+@@ -749,17 +751,19 @@ root{
+ }
+ NoonMarker:alias{"/LOCALE/calendar/gregorian/NoonMarker"}
+ NoonMarkerNarrow:alias{"/LOCALE/calendar/gregorian/NoonMarkerNarrow"}
+ appendItems{
+ Day{"{0} ({2}: {1})"}
++ DayPeriod{"{0} ({2}: {1})"}
+ Day-Of-Week{"{0} {1}"}
+ Era{"{1} {0}"}
+ Hour{"{0} ({2}: {1})"}
+ Minute{"{0} ({2}: {1})"}
+ Month{"{0} ({2}: {1})"}
+ Quarter{"{0} ({2}: {1})"}
+ Second{"{0} ({2}: {1})"}
++ FractionalSecond{"{0} ({2}: {1})"}
+ Timezone{"{0} {1}"}
+ Week{"{0} ({2}: {1})"}
+ Year{"{1} {0}"}
+ }
+ availableFormats{
+@@ -1018,17 +1022,19 @@ root{
+ "{1} {0}",
+ "{1} {0}",
+ }
+ appendItems{
+ Day{"{0} ({2}: {1})"}
++ DayPeriod{"{0} ({2}: {1})"}
+ Day-Of-Week{"{0} {1}"}
+ Era{"{1} {0}"}
+ Hour{"{0} ({2}: {1})"}
+ Minute{"{0} ({2}: {1})"}
+ Month{"{0} ({2}: {1})"}
+ Quarter{"{0} ({2}: {1})"}
+ Second{"{0} ({2}: {1})"}
++ FractionalSecond{"{0} ({2}: {1})"}
+ Timezone{"{0} {1}"}
+ Week{"{0} ({2}: {1})"}
+ Year{"{1} {0}"}
+ }
+ availableFormats{
+diff --git a/intl/icu/source/i18n/dtptngen.cpp b/intl/icu/source/i18n/dtptngen.cpp
+--- a/intl/icu/source/i18n/dtptngen.cpp
++++ b/intl/icu/source/i18n/dtptngen.cpp
+@@ -257,12 +257,12 @@ static const dtTypeElem dtTypes[] = {
+ {0, UDATPG_FIELD_COUNT, 0, 0, 0} , // last row of dtTypes[]
+ };
+
+ static const char* const CLDR_FIELD_APPEND[] = {
+ "Era", "Year", "Quarter", "Month", "Week", "*", "Day-Of-Week",
+- "*", "*", "Day", "*", // The UDATPG_x_FIELD constants and these fields have a different order than in ICU4J
+- "Hour", "Minute", "Second", "*", "Timezone"
++ "*", "*", "Day", "DayPeriod", // The UDATPG_x_FIELD constants and these fields have a different order than in ICU4J
++ "Hour", "Minute", "Second", "FractionalSecond", "Timezone"
+ };
+
+ static const char* const CLDR_FIELD_NAME[UDATPG_FIELD_COUNT] = {
+ "era", "year", "quarter", "month", "week", "weekOfMonth", "weekday",
+ "dayOfYear", "weekdayOfMonth", "day", "dayperiod", // The UDATPG_x_FIELD constants and these fields have a different order than in ICU4J