Source code

Revision control

Copy as Markdown

Other Tools

# Add <appendItem> entries for "DayPeriod" and "FractionalSeconds" to avoid the
# "├ ┤" parentheses from ICU and instead use the normal "( )" parentheses.
#
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