From cb2ee59259e594ffc1fc84b651b3d290c1031635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 21 May 2026 21:30:58 +0200 Subject: [PATCH] =?UTF-8?q?i18n(global-error):=20make=20root-error=20scree?= =?UTF-8?q?n=20bilingual=20(de=20=C2=B7=20en)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit global-error.tsx renders before any provider, so an i18n lookup is impossible. Doubling the four user-facing strings as 'Deutsch · English' avoids leaving a German visitor on an all-English last-resort screen without paying for a runtime locale resolver. Footprint is small (one heading, one paragraph, two button labels, one copy-fallback prompt). --- src/app/global-error.tsx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/app/global-error.tsx b/src/app/global-error.tsx index 5522f4b34..0efdd5ab5 100644 --- a/src/app/global-error.tsx +++ b/src/app/global-error.tsx @@ -3,7 +3,9 @@ /** * Root-level error boundary. Renders when even the root layout itself fails, * so it cannot rely on any providers (i18n, query, auth). Keep it static, - * in English, and self-contained. + * self-contained, and bilingual: both English and German appear side by side + * so a German visitor never lands on an all-English last-resort screen, and + * an English visitor can still read it. */ export default function GlobalError({ error, @@ -28,7 +30,7 @@ export default function GlobalError({ try { await navigator.clipboard.writeText(text); } catch { - window.prompt("Copy details", text); + window.prompt("Details kopieren · Copy details", text); } } @@ -55,11 +57,13 @@ export default function GlobalError({ >

- Something went wrong + Etwas ist schiefgegangen · Something went wrong

- A critical error occurred. You can retry or copy the details for - support. + Ein kritischer Fehler ist aufgetreten. Du kannst es erneut versuchen + oder die Details kopieren. +
A critical error occurred. You can retry or copy the details + for support.

-            {error.message || "Unknown error"}
+            {error.message || "Unbekannter Fehler · Unknown error"}