Skip to content

fix(frontend): localize dashboard - #227

Merged
stefan-ernst merged 3 commits into
Windshiftapp:mainfrom
Optic00:fix/dashboard-i18n
Aug 28, 2026
Merged

fix(frontend): localize dashboard#227
stefan-ernst merged 3 commits into
Windshiftapp:mainfrom
Optic00:fix/dashboard-i18n

Conversation

@Optic00

@Optic00 Optic00 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Localize dashboard headings, widgets, customization controls, and state messages across every supported locale.
  • Format relative timestamps with the active application locale.
  • Keep user-customized section text unchanged while translating untouched built-in sections.
  • Preserve canonical defaults when translated section text is opened and saved without edits.
  • Validate metadata-driven translation keys in the i18n checker.

Verification

  • npm run check
  • npm run typecheck - 0 errors and 0 warnings
  • npm run test:run - 7 tests passed
  • npm run build
  • Browser E2E against a Docker deployment: save an unchanged German default section, switch German to English and back, and verify the heading follows the active locale.

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@Optic00

Optic00 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Aug 28, 2026
@stefan-ernst

stefan-ernst commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

@Optic00 - thanks a lot for the PR. One observation:

const metadataMatches = content.matchAll(
      /\b(?:name|description|title|subtitle)Key:\s*['"]([a-zA-Z][a-zA-Z0-9_.]+)['"]/g
    );

does not match the labelKey introduced later in the PR, is this intentional?

@Optic00

Optic00 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Good catch, this wasn't intentional. check-i18n.js only scanned for nameKey/descriptionKey/titleKey/subtitleKey, so labelKey references were silently skipped. I added labelKey to the scanner and pushed the fix in 3ed62c88.

While addressing that, I also fixed the relative-time wording (numeric: 'always' so "1 week ago" no longer becomes "last week") and replaced the userFallback string with per-locale salutation templates. Frontend checks, the Vitest suite, and check-i18n all pass locally.

@stefan-ernst

Copy link
Copy Markdown
Contributor

all good!

@stefan-ernst
stefan-ernst merged commit f72a107 into Windshiftapp:main Aug 28, 2026
2 checks passed
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