Skip to content

feat(i18n): add German, Dutch, Norwegian, Spanish, Italian, Swedish and Danish locales - #171

Open
JordiMa wants to merge 1 commit into
abarghoud:testingfrom
JordiMa:feat/i18n-add-7-locales
Open

feat(i18n): add German, Dutch, Norwegian, Spanish, Italian, Swedish and Danish locales#171
JordiMa wants to merge 1 commit into
abarghoud:testingfrom
JordiMa:feat/i18n-add-7-locales

Conversation

@JordiMa

@JordiMa JordiMa commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds 7 new UI locales — German (de), Dutch (nl), Norwegian (no), Spanish (es), Italian (it), Swedish (sv) and Danish (da) — across the API, web app and mobile app, on top of the existing English and French. SentryGuard now ships in 9 languages.

What's included

API

  • Translated common.json for each new locale
  • Shared SupportedLanguage type replacing the hard-coded 'en' | 'fr' unions
  • Generalized Accept-Language detection and extended Tesla locale mapping (de-DE, nl-NL, nb-NO, es-ES, it-IT, sv-SE, da-DK)

Web app

  • Translated common.json for each new locale
  • SUPPORTED_LOCALES widened — drives [locale] routing, generateStaticParams, the sitemap and hreflang alternates
  • Language switcher gains flags + entries for the 7 locales
  • Generalized locale detection (server + proxy); proxy matcher updated for the new paths

Mobile

  • Translated locale files; UserLanguage enum and i18n resources extended
  • Settings language selector reworked: the 2-option toggle becomes a modal picker listing all 9 languages with a checkmark on the active one

Scope decisions

  • Legal/consent text is intentionally not translated. Privacy, Terms and the GDPR consent block fall back to English to avoid the legal risk of machine-translated legal documents (LegalLocale stays 'en' | 'fr'). Localized marketing screenshots and the OG image likewise fall back to English.

Verification

  • Key parity: every locale file carries the exact key set of its English source (API 77, web 446, mobile 242) — 0 missing/extra.
  • Integrity: all {{…}} placeholders and <0>…</0> rich-text tags preserved per key.
  • No leftover English in any translated value (consistent with the existing fr locale).
  • Native-language review pass over all 7 languages (grammar, terminology, register).
  • Build/types: new locales typecheck clean; mobile test suite green; web app production build succeeds with every [locale] route generated.

Notes

  • user.preferred_language is varchar(2) with no DB constraint, so no migration is required.

…nd Danish locales

Adds full localization for de, nl, no, es, it, sv and da across the API, web
app and mobile app, on top of the existing English and French.

- API: translated common.json per locale; add a shared SupportedLanguage type,
  generalize Accept-Language detection and extend the Tesla locale mapping.
- Web app: translated common.json per locale; widen SUPPORTED_LOCALES (drives
  [locale] routing, sitemap and hreflang), add flags to the language switcher,
  generalize locale detection and the proxy matcher.
- Mobile: translated locale files; extend the UserLanguage enum and i18n
  resources; replace the two-option language toggle with a modal picker listing
  all nine languages.

Legal and consent text (privacy, terms, GDPR consent block) intentionally falls
back to English and is not machine-translated.

All translations were reviewed for key parity, placeholder/tag integrity and
native-language quality.
@JordiMa
JordiMa requested a review from abarghoud as a code owner June 24, 2026 19:40
@abarghoud
abarghoud deleted the branch abarghoud:testing July 2, 2026 10:31
@abarghoud abarghoud closed this Jul 2, 2026
@JordiMa JordiMa reopened this Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants