feat: initialize i18next foundation for localisation#2503
Conversation
There was a problem hiding this comment.
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:COLUMNSstill stores English labels andZoneColumnrenderscol.label, so the four column headings stay asWorking,Needs you,In review, andReady to merge.frontend/src/renderer/components/SessionsBoard.tsx: session cards still render the hardcoded footer stringno PR yet, leavingboard.noPRunused.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.
Summary
This PR lays the initial localization foundation
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
i18next+react-i18nextsrc/renderer/i18nmodulezh-CN) as the first translated localelocalStorage<html lang="...">whenever the language changesNotes
This PR intentionally does not introduce a manual language selector
The current implementation:
The goal is to first establish a stable localization foundation before expanding translation coverage...
Relevant Screenshots