From 3aa228ba3b05197f45b1c4c552cdc137509cb437 Mon Sep 17 00:00:00 2001 From: Peter Edberg <42151464+pedberg-icu@users.noreply.github.com> Date: Tue, 3 Oct 2023 10:27:59 -0700 Subject: [PATCH] CLDR-17035 fil use gabi for eve/night (with ng for format), add standalone wide (#3301) --- common/main/fil.xml | 14 +++++++------- .../java/org/unicode/cldr/util/DayPeriodInfo.java | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/common/main/fil.xml b/common/main/fil.xml index efd650b4074..8adab4a0754 100644 --- a/common/main/fil.xml +++ b/common/main/fil.xml @@ -2328,7 +2328,7 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/ madaling-araw tanghali ng gabi - gabi + ng gabi ↑↑↑ @@ -2350,7 +2350,7 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/ ↑↑↑ ↑↑↑ ↑↑↑ - ng gabi + ↑↑↑ @@ -2363,7 +2363,7 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/ ↑↑↑ hapon gabi - ↑↑↑ + gabi ↑↑↑ @@ -2381,11 +2381,11 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/ ↑↑↑ ↑↑↑ ↑↑↑ - ↑↑↑ + umaga ↑↑↑ - ↑↑↑ - ↑↑↑ - ↑↑↑ + hapon + gabi + gabi diff --git a/tools/cldr-code/src/main/java/org/unicode/cldr/util/DayPeriodInfo.java b/tools/cldr-code/src/main/java/org/unicode/cldr/util/DayPeriodInfo.java index e7344fb9611..7e532e79af7 100644 --- a/tools/cldr-code/src/main/java/org/unicode/cldr/util/DayPeriodInfo.java +++ b/tools/cldr-code/src/main/java/org/unicode/cldr/util/DayPeriodInfo.java @@ -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 @@ -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;