Skip to content

Add basic i18n support, language selector, and Chinese translations#2

Merged
osoulmate merged 1 commit intomainfrom
codex/check-internationalization-support-in-project
Mar 10, 2026
Merged

Add basic i18n support, language selector, and Chinese translations#2
osoulmate merged 1 commit intomainfrom
codex/check-internationalization-support-in-project

Conversation

@osoulmate
Copy link
Copy Markdown
Owner

Motivation

  • Introduce a simple internationalization layer so the UI can present localized labels and copy and allow users to pick a language.
  • Provide an initial Chinese (zh-CN) translation set for core navigation and UI strings.
  • Persist language preference in settings so the selected language is applied across sessions.

Description

  • Add a new i18n.ts module exposing tr, UiLanguage type, resolveUiLanguage, and setUiLanguage, and include a zh-CN translation dictionary.
  • Wire language preference into persistent settings by adding language to UiSettings and persisting it in storage.ts.
  • Add a language selector to the topbar and replace many hard-coded UI strings with tr(...) calls across app-render.ts, app-render.helpers.ts, navigation.ts, and other view files.
  • Ensure the selected language is applied by calling setUiLanguage and updating document.documentElement.lang when settings are applied and when the app connects.

Testing

  • Built the TypeScript project with the project build (tsc / npm run build) and the build completed successfully.
  • Ran the project's automated test suite (npm test) and the tests passed.

Codex Task

@osoulmate osoulmate merged commit 26ae3cc into main Mar 10, 2026
7 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant