From 31fbf98c4a82f290d707f1a3602ed5a6fb41efd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 10 May 2026 18:14:59 +0200 Subject: [PATCH] chore(i18n): drop duplicate heroGreetingNight key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both EN + DE have heroGreetingNight pointing to the same string as heroGreetingEvening (the night bucket maps to "Good evening" so 03:00 doesn't read as Morgen). Drop the duplicate key and fall through to heroGreetingEvening in the resolver — the resolver decided the collapse, the JSON catalog carried dead weight. Fixes Design-M2. Co-Authored-By: Claude Opus 4.7 (1M context) --- messages/de.json | 1 - messages/en.json | 1 - src/components/insights/hero-strip.tsx | 6 ++++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/messages/de.json b/messages/de.json index 90d77ccf2..d1e6637fa 100644 --- a/messages/de.json +++ b/messages/de.json @@ -755,7 +755,6 @@ "heroGreetingMorning": "Guten Morgen", "heroGreetingAfternoon": "Guten Tag", "heroGreetingEvening": "Guten Abend", - "heroGreetingNight": "Guten Abend", "heroComingSoonTooltip": "Kommt bald", "heroActionWeeklyReport": "Wochenbericht erstellen", "heroActionAskCoach": "Coach fragen", diff --git a/messages/en.json b/messages/en.json index 255c7a6cb..5b5ea3a6e 100644 --- a/messages/en.json +++ b/messages/en.json @@ -755,7 +755,6 @@ "heroGreetingMorning": "Good morning", "heroGreetingAfternoon": "Good afternoon", "heroGreetingEvening": "Good evening", - "heroGreetingNight": "Good evening", "heroComingSoonTooltip": "Coming soon", "heroActionWeeklyReport": "Generate weekly report", "heroActionAskCoach": "Ask the coach", diff --git a/src/components/insights/hero-strip.tsx b/src/components/insights/hero-strip.tsx index b5fccd6d8..072a13b5b 100644 --- a/src/components/insights/hero-strip.tsx +++ b/src/components/insights/hero-strip.tsx @@ -131,8 +131,10 @@ function resolveGreetingKey(now: Date): string { const hour = now.getHours(); if (hour >= 5 && hour < 12) return "insights.heroGreetingMorning"; if (hour >= 12 && hour < 18) return "insights.heroGreetingAfternoon"; - if (hour >= 18 && hour < 23) return "insights.heroGreetingEvening"; - return "insights.heroGreetingNight"; + // 18:00-22:59 maps to "Good evening"; 23:00-04:59 also maps to + // "Good evening" — reading "Good morning" pre-5am felt off, and + // German has the same fall-through. Drop the duplicate Night key. + return "insights.heroGreetingEvening"; } export function HeroStrip({