Skip to content

feat: add i18n support#232

Merged
pikann merged 2 commits into
masterfrom
feature/add-i18n-support
Jun 30, 2026
Merged

feat: add i18n support#232
pikann merged 2 commits into
masterfrom
feature/add-i18n-support

Conversation

@pikann

@pikann pikann commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a full i18n foundation to apps/web and translates the entire UI into 7 languages: English, Vietnamese, Korean, Simplified Chinese, Japanese, Spanish, and French.

Architecture

  • Library: i18next + react-i18next + i18next-browser-languagedetector.
  • Persistence: client-side only (localStorage, key locale), mirroring how theme is already handled — no backend changes, no new user-preference column.
  • Resources: all locale JSON is statically imported and bundled (import.meta.glob), no runtime fetch/lazy-loading.
  • Type safety: TypeScript module augmentation against the English JSON files, so t("wrong.key") fails the build at compile time.
  • Namespaces: text is organized into 9 files per language — common, auth, appShell, profile, admin, projects, plugins, shared, errors (63 JSON files total: 9 namespaces × 7 languages).
  • <html lang> sync: now kept in sync with the active locale (previously hardcoded to "en"), which also unlocks locale-scoped CSS (see font fix below).

Scope

  • ~120 component/route files converted from hardcoded English strings to t() calls — essentially the entire authenticated app (admin, projects, profile, app shell/nav, shared components) plus the public auth pages.
  • Date formatting goes through a new Intl.DateTimeFormat-based helper (lib/format-date.ts) instead of a hardcoded "en-US" locale.
  • Language switcher lives in the user menu dropdown (sidebar) for the authenticated app, and as a standalone globe-icon toggle next to the theme toggle on the public login/change-password pages.
  • Vietnamese gets a dedicated font (Be Vietnam Pro) swapped in via html[lang="vi"], since the default fonts (Syne/DM Sans) render Vietnamese tone marks with visible hinting glitches.

Translation caveat

The 6 non-English locales (vi, ko, zh-CN, ja, es, fr) are LLM-translated with no human reviewer in the loop. Each was independently verified for key parity and {{interpolation}} placeholder integrity against the English source, so nothing is missing or broken — but the wording should get a native-speaker pass before this is the language real non-English users see in production.

Verification

  • tsc -b, biome check, and the full Vitest suite (261 tests) all pass.
  • Production build (vite build) verified — confirmed the locale-loading and CSS cascade (font override) resolve correctly in the compiled bundle, not just in dev.
  • New tests: LanguageToggle.test.tsx (opens the language dropdown, selects a language, asserts the locale and localStorage update).

Out of scope / follow-ups

  • Translation review by native speakers for vi/ko/zh-CN/ja/es/fr.
  • No backend/API-side localization (error messages from the API itself are not translated).

- Integrated translation functionality using react-i18next in the following files:
  - Conversations page
  - Document editor page
  - Backlog page
  - Sprint page
  - Timeline page
  - Settings page
  - Task detail page
  - Team management page
  - Change password page
  - Login page
- Updated static text to use translation keys for better localization support.
- Added LanguageToggle component to the header for language switching.
- Configured TypeScript to resolve JSON modules for translation files.
@pikann pikann linked an issue Jun 30, 2026 that may be closed by this pull request
@pikann pikann merged commit 64550fb into master Jun 30, 2026
4 checks passed
@pikann pikann deleted the feature/add-i18n-support branch June 30, 2026 17:25
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.

Add i18n foundation for the web UI

1 participant