Skip to content

Add i18n support with Simplified Chinese translations - #53

Open
buzhidaoqusm wants to merge 1 commit into
chuunibian:mainfrom
buzhidaoqusm:main
Open

Add i18n support with Simplified Chinese translations#53
buzhidaoqusm wants to merge 1 commit into
chuunibian:mainfrom
buzhidaoqusm:main

Conversation

@buzhidaoqusm

Copy link
Copy Markdown

Summary

This PR adds internationalization(i18n) support to Delta and includes an initial Simplified Chinese (zh-CN) translation.

Instead of replacing English text directly, this introduces a reusable i18n structure so the app can support additional languages more easily in the future.

What changed

  • added i18next and react-i18next
  • added a new src/i18n/ module for i18n setup and language definitions
  • added locale files for:
    • English (en)
    • Simplified Chinese (zh-CN)
  • initialized i18n in the app entry point
  • added a language selector in the settings panel
  • translated major user-facing UI text, including:
    • scan tabs and scan cards
    • snapshot table and settings panel
    • tree header
    • overview panel
    • history chart states
    • notification UI
    • top bar labels
  • updated date formatting to follow the active language instead of using a hardcoded locale

Language behavior

  • uses the saved language preference if one exists
  • otherwise falls back to the system/browser language when supported
  • falls back to English if the detected language is not supported

Notes

  • this PR focuses on frontend UI localization
  • backend diagnostic/error strings are not fully localized yet
  • the current structure is intended to make adding more languages straightforward later

Validation

I verified the changes with:

npm run build
npm run tauri build

Manually tested:
switching languages from the settings panel updates the UI correctly

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.

1 participant