eae55ddc3aca27f2f5a1e48b4456d8c15813f074
Several pieces of the results page were rendered once via JS and never
walked by the [data-i18n] selector, so toggling EN ↔ DE only updated
static text and left the dynamic chunks in their original language until
the user reloaded.
- Hooked previously-untranslated UI through data-i18n / data-ph-*: hero
subtitle and CTA, country dropdown options (full DE list incl.
Österreich, Deutschland, Schweiz, Vereinigtes Königreich, …), form
input placeholders for first name, last name, email, city, phone, and
the protein detail textarea, plus the inline "Sending…" submit state.
- Extracted the risk banner render into renderRiskBanner() and added
rerenderResults() — called from setLang when body.results-active is
on. It re-renders the risk banner, scenario rec cards, budget meter,
timeline, and swaps the narrative to the new-language fallback so the
whole page reflects the active language without a reload.
- Trimmed the German hero_sub from a long quiz-explainer paragraph back
to the slogan ("Vorsorge, verfeinert.") to match the en hero_sub, and
aligned hero_cta with the visible "Begin" / "Beginnen" button text.
The AI narrative is intentionally not re-fetched on language switch —
the fallback swap keeps the toggle instant and the AI version regenerates
on retake.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Description
No description provided
Languages
HTML
40.4%
Vue
29%
CSS
17.3%
JavaScript
13.2%
Dockerfile
0.1%