Skip to content

Commit

Permalink
CLDR-17035 fil use gabi for eve/night (with ng for format), add stand…
Browse files Browse the repository at this point in the history
…alone wide (#3301)
  • Loading branch information
pedberg-icu authored Oct 3, 2023
1 parent 07ea202 commit 3aa228b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
14 changes: 7 additions & 7 deletions common/main/fil.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2328,7 +2328,7 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/
<dayPeriod type="morning2">madaling-araw</dayPeriod>
<dayPeriod type="afternoon1">tanghali</dayPeriod>
<dayPeriod type="evening1">ng gabi</dayPeriod>
<dayPeriod type="night1">gabi</dayPeriod>
<dayPeriod type="night1">ng gabi</dayPeriod>
</dayPeriodWidth>
<dayPeriodWidth type="narrow">
<dayPeriod type="midnight">↑↑↑</dayPeriod>
Expand All @@ -2350,7 +2350,7 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/
<dayPeriod type="morning2">↑↑↑</dayPeriod>
<dayPeriod type="afternoon1">↑↑↑</dayPeriod>
<dayPeriod type="evening1">↑↑↑</dayPeriod>
<dayPeriod type="night1">ng gabi</dayPeriod>
<dayPeriod type="night1">↑↑↑</dayPeriod>
</dayPeriodWidth>
</dayPeriodContext>
<dayPeriodContext type="stand-alone">
Expand All @@ -2363,7 +2363,7 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/
<dayPeriod type="morning2">↑↑↑</dayPeriod>
<dayPeriod type="afternoon1">hapon</dayPeriod>
<dayPeriod type="evening1">gabi</dayPeriod>
<dayPeriod type="night1">↑↑↑</dayPeriod>
<dayPeriod type="night1">gabi</dayPeriod>
</dayPeriodWidth>
<dayPeriodWidth type="narrow">
<dayPeriod type="midnight">↑↑↑</dayPeriod>
Expand All @@ -2381,11 +2381,11 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/
<dayPeriod type="am">↑↑↑</dayPeriod>
<dayPeriod type="noon">↑↑↑</dayPeriod>
<dayPeriod type="pm">↑↑↑</dayPeriod>
<dayPeriod type="morning1">↑↑↑</dayPeriod>
<dayPeriod type="morning1">umaga</dayPeriod>
<dayPeriod type="morning2">↑↑↑</dayPeriod>
<dayPeriod type="afternoon1">↑↑↑</dayPeriod>
<dayPeriod type="evening1">↑↑↑</dayPeriod>
<dayPeriod type="night1">↑↑↑</dayPeriod>
<dayPeriod type="afternoon1">hapon</dayPeriod>
<dayPeriod type="evening1">gabi</dayPeriod>
<dayPeriod type="night1">gabi</dayPeriod>
</dayPeriodWidth>
</dayPeriodContext>
</dayPeriods>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ public boolean collisionIsError(
}

// Hack for French night1, CLDR-17132 for better fix
// Let night1 have the same name as morning1/am if night1 starts at 00:00
if ((dayPeriod1 == DayPeriod.night1
&& (dayPeriod2 == DayPeriod.morning1 || dayPeriod2 == DayPeriod.am))
|| (dayPeriod2 == DayPeriod.night1
Expand All @@ -445,6 +446,19 @@ public boolean collisionIsError(
}
}

// Hack for fil evening1/night1, CLDR-17139 for better fix
// Let night1 have the same name as evening1 if night1 ends at 24:00
if ((dayPeriod1 == DayPeriod.night1 && dayPeriod2 == DayPeriod.evening1)
|| (dayPeriod2 == DayPeriod.night1 && dayPeriod1 == DayPeriod.evening1)) {
if (dayPeriodsToSpans.get(DayPeriod.night1).size() == 1) {
for (Span s : dayPeriodsToSpans.get(DayPeriod.night1)) {
if (s.end == DAY_LIMIT) {
return false;
}
}
}
}

// we use the more lenient if they are mixed types
if (type2 == Type.format) {
type1 = Type.format;
Expand Down

0 comments on commit 3aa228b

Please sign in to comment.