Skip to content

feat: add Chinese (zh) locale for the dashboard (Closes #115) - #415

Open
waterWang wants to merge 1 commit into
tributary-protocol:mainfrom
waterWang:feat/zh-locale
Open

feat: add Chinese (zh) locale for the dashboard (Closes #115)#415
waterWang wants to merge 1 commit into
tributary-protocol:mainfrom
waterWang:feat/zh-locale

Conversation

@waterWang

Copy link
Copy Markdown

Summary

Adds Chinese (zh) locale for the Tributary dashboard.

Changes

  • src/lib/i18n.tsx:
    • Added "zh" to the Language type union
    • Added full zh translation block with all 103 catalog strings (same keys as en)
    • Updated readSavedLanguage() to accept "zh"
  • src/components/LanguageSwitcher.tsx: Added <option value="zh">ZH</option>
  • src/lib/i18n.test.tsx:
    • Added test for reading zh from localStorage
    • Added test for rendering zh translation correctly

Tests

14/14 i18n tests pass (existing + 2 new). All 103 zh keys match en keys exactly.

Closes #115

@waterWang
waterWang requested a review from Spagero763 as a code owner August 20, 2026 15:17
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 Chinese (zh) translation for the dashboard

1 participant