i18n(fitness): migrate inline ternaries across pages and components

Replace lang === 'en' string ternaries on the check-in, stats, workout,
exercises, history, and stats history detail pages, plus TemplateCard,
with t.<key> lookups against the fitness dictionary. Added new keys for
toast messages, body-part counts, body-fat label, clear/measure short
labels, "edit all fields", BF chart delta prefix, calorie balance and
adherence tooltips, actual/target legend labels, daily expenditure
prefix, height/birth/weight setup hint, exercise/workout/recent labels,
"starts with", and a {n}-template "X days ago" string.

URL slug ternaries (e.g. 'check-in' / 'erfassung') remain inline since
they encode route data, not UI text.

Bump site version to 1.56.2.
This commit is contained in:
2026-05-01 14:01:06 +02:00
parent bd9e9b397f
commit 71f7322624
14 changed files with 88 additions and 46 deletions
+26
View File
@@ -363,4 +363,30 @@ export const en = {
sugars: "Sugars",
source_db: "Source",
initializing_gps: "Initializing GPS…",
// Check-in page
failed_to_load_more: "Failed to load more",
body_part_count_one: "1 body part",
body_parts_count_other: "body parts",
updated_toast: "Updated",
body_fat_label: "Body Fat",
clear_action: "Clear",
measure_short: "Measure",
edit_all_fields: "Edit all fields",
measurement_saved: "Measurement saved",
// Stats page
bf_delta_from_prefix: "Δ from",
set_height_birthyear_weight: "Set height, birth year & weight",
actual_label: "Actual",
target_label: "Target",
calorie_balance_tooltip: "Average daily calories eaten minus estimated expenditure (TDEE + tracked workout calories) over the last 7 days. Negative = deficit, positive = surplus.",
daily_expenditure_estimate_prefix: "Est. daily expenditure:",
diet_adherence_tooltip: "Percentage of days where calories eaten were within ±10% of your goal (adjusted for exercise calories burned). Days without tracking count as misses.",
// Misc page titles / labels
exercise_title: "Exercise",
recent_label: "Recent",
starts_with: "starts with",
days_ago_template: "{n} days ago"
} as const satisfies Record<keyof typeof de, string>;