Skip to content

feat: initialize i18next foundation for localisation#2503

Open
Aakriti0207 wants to merge 1 commit into
AgentWrapper:mainfrom
Aakriti0207:feat/i18n-setup
Open

feat: initialize i18next foundation for localisation#2503
Aakriti0207 wants to merge 1 commit into
AgentWrapper:mainfrom
Aakriti0207:feat/i18n-setup

Conversation

@Aakriti0207

@Aakriti0207 Aakriti0207 commented Jul 7, 2026

Copy link
Copy Markdown

Summary

This PR lays the initial localization foundation

This follows the proposed phased approach discussed in Discord by introducing only the localization foundation and a small first UI slice.

The goal is to introduce i18n infrastructure while keeping the first contribution intentionally small and easy to review before migrating larger parts of the UI

Closes #2106

What's included

  • Added i18next + react-i18next
  • Created a dedicated src/renderer/i18n module
  • Added English as the default locale
  • Added Simplified Chinese (zh-CN) as the first translated locale
  • Detect the initial locale from the browser/system language
  • Persist the active locale in localStorage
  • Configure English fallback for missing translations
  • Update <html lang="..."> whenever the language changes
  • Migrated an initial dashboard UI slice (Board title, subtitle, actions, etc.)

Notes

This PR intentionally does not introduce a manual language selector

The current implementation:

  • detects the locale automatically
  • defaults to English
  • falls back to English for missing keys
  • stores the active locale in local storage

The goal is to first establish a stable localization foundation before expanding translation coverage...


Relevant Screenshots

image

This PR is intentionally being opened early as a Draft PR so the localization structure and overall approach can be reviewed before migrating a larger portion of the renderer

While adding the i18n dependencies, the lockfile was updated, if there's anything that should be adjusted before continuing with the remaining localization work, please let me know

@illegalcall illegalcall left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall.

One product issue to fix before this localization foundation lands: the board is only partially wired to the new locale resources, so zh-CN users get a mixed-language board.

The PR adds board.columns.* and board.noPR, but those keys are not used:

  • frontend/src/renderer/components/SessionsBoard.tsx: COLUMNS still stores English labels and ZoneColumn renders col.label, so the four column headings stay as Working, Needs you, In review, and Ready to merge.
  • frontend/src/renderer/components/SessionsBoard.tsx: session cards still render the hardcoded footer string no PR yet, leaving board.noPR unused.
  • frontend/src/renderer/components/BoardEmptyState.tsx: the empty project state duplicates board actions and keeps them in English (Spawn Orchestrator, New task), so the translated header actions sit beside English center actions.

A user with zh-CN selected would see a translated header such as 看板 and 启动编排器, but English column labels, English empty-state CTAs, and no PR yet in cards. That makes the board feel half-translated within the same visual surface.

The smallest fix is to remove the display label from the column config and derive it from the existing keys when rendering, for example using board.columns.${col.level} for working / action / pending / merge, and using board.noPR in SessionCard. For ProjectBoardEmpty, please either add/wire locale keys for the whole empty state or keep this board surface untranslated until it can be migrated as a complete unit.

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.

feat(i18n): add localization infrastructure for dashboard display text

2 participants