mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-07 12:22:03 +00:00
chore(i18n): drop duplicate heroGreetingNight key
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) <noreply@anthropic.com>
This commit is contained in:
1 parent
9f3baf940d
commit
31fbf98c4a
3 files changed
+4
-4
No files matched your search
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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({
|
||||
|
||||
Reference in new issue
Block a user