trails/apps/journal/app
Ullrich Schäfer 79f000fcc5
Upgrade i18next v26 + react-i18next v17 with SSR-safe init
Split initI18n() into separate server/client initialization paths
inspired by remix-i18next's architecture:

- initI18nServer(lng): no LanguageDetector, per-request language from
  Accept-Language header
- initI18nClient(): LanguageDetector reads <html lang> first to match
  server, then localStorage and navigator
- detectLanguage(request): parses Accept-Language for best match

Fixes rehydration errors caused by v26 removing initImmediate option
(replaced with initAsync) and LanguageDetector running on the server
where browser APIs don't exist.

Also makes <html lang> dynamic instead of hardcoded "en".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:38:36 +02:00
..
components Fix SSR hydration mismatch for dates 2026-03-24 20:22:58 +00:00
lib Add purpose column to magic_tokens, fix email change race condition 2026-03-29 10:28:53 +02:00
routes Only show add-passkey prompt when user has no passkeys 2026-03-29 10:50:30 +02:00
entry.client.tsx Upgrade i18next v26 + react-i18next v17 with SSR-safe init 2026-03-29 11:38:36 +02:00
entry.server.tsx Upgrade i18next v26 + react-i18next v17 with SSR-safe init 2026-03-29 11:38:36 +02:00
root.tsx Upgrade i18next v26 + react-i18next v17 with SSR-safe init 2026-03-29 11:38:36 +02:00
routes.ts Add account settings page with passkey management 2026-03-29 10:09:06 +02:00