Skip to content

feat(domain): localization foundation with typed t() helper - #20

Merged
moiz-za merged 1 commit into
mainfrom
feat/localization-foundation
Oct 2, 2026
Merged

moiz-za merged 1 commit into
mainfrom
feat/localization-foundation

Conversation

@moiz-za

@moiz-za moiz-za commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a minimal, typed localization foundation as a pure domain unit (closes #2).

  • src/domain/locale/en-US.json — flat dictionary of the app's currently hardcoded UI strings (tray menu labels, window titles, dialog copy)
  • src/domain/locale/index.ts — typed t(key, variables?) with fallback to en-US, {placeholder} interpolation, and registerLocale/setLocale/availableLocales for adding languages
  • tests/locale.test.ts — 7 tests covering known keys, fallback-to-English, interpolation, unknown placeholders, and unknown-locale fallback
  • tsconfig.json — enables resolveJsonModule so the JSON dictionary is typed and emitted to dist/

Data-only and dependency-free; not wired into the UI yet (as specified in the issue).

Verification

npm run typecheck && npm run lint && npm run check:arch && npm run build && npm test — all pass (166 tests).

@moiz-za
moiz-za force-pushed the feat/localization-foundation branch from 0fca93a to 75dda34 Compare October 2, 2026 07:54
@moiz-za
moiz-za merged commit b66c562 into main Oct 2, 2026
5 checks passed
@moiz-za
moiz-za deleted the feat/localization-foundation branch October 2, 2026 08:13
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.

Localization foundation: en-US locale + typed t() helper

1 participant