Skip to content

feat(i18n): add Vietnamese translations for docs and WebUI#451

Open
thanhnn91qn-afk wants to merge 1 commit intoCJackHwang:mainfrom
thanhnn91qn-afk:feat/vi-translation
Open

feat(i18n): add Vietnamese translations for docs and WebUI#451
thanhnn91qn-afk wants to merge 1 commit intoCJackHwang:mainfrom
thanhnn91qn-afk:feat/vi-translation

Conversation

@thanhnn91qn-afk
Copy link
Copy Markdown

Summary / Tóm tắt

Add Vietnamese (vi) language support across user-facing surfaces so DS2API is friendlier to Vietnamese developers.

Bổ sung hỗ trợ tiếng Việt (vi) cho các bề mặt hướng người dùng để DS2API thân thiện hơn với lập trình viên Việt Nam.

What's new / Có gì mới

  • Docs
    • README.vi.md – full Vietnamese mirror of README.MD
    • docs/README.vi.md – Vietnamese docs index
    • docs/DEPLOY.vi.md – concise local-first deployment guide in Vietnamese
    • Cross-links added to README.MD, README.en.md, docs/README.md, docs/DEPLOY.md, docs/DEPLOY.en.md so users can switch languages
  • Config templates
    • Translated comments in config.example.json and .env.example to Vietnamese (no key/value structure changes)
  • WebUI / Admin Console
    • New locale webui/src/locales/vi.json – 1:1 with zh.json (489 keys)
    • webui/src/i18n.jsx now exposes vi and falls back safely (vi → en → original key)
    • LanguageToggle.jsx cycles VI → EN → ZH
    • Added language.vietnamese label to existing en.json and zh.json
  • Repo hygiene
    • .gitignore extended to ignore *.exe, .env.*.production, run.bat and accidental nested clones (no behavior change to authors' workflow)

Notes for reviewer / Ghi chú cho người review

  • I kept zh as a fallback for users who have explicitly chosen Chinese in their localStorage. The default for new visitors whose browser is not vi / zh / en is vi; you can flip the constant DEFAULT_LANG in webui/src/i18n.jsx if you'd rather keep zh as the global default.
  • No backend code (internal/, api/, cmd/) was touched – translations are limited to docs, config templates and the WebUI locale layer.
  • npm run build --prefix webui succeeds locally (1774 modules transformed); admin assets continue to ship from static/admin/.

How to test / Cách kiểm thử

go run ./cmd/ds2api
# Open http://127.0.0.1:5001/admin → UI loads in Vietnamese by default
# Click language toggle → cycles VI → EN → ZH

Happy to adjust the default language behavior, copy or scope per maintainer preference.

Sẵn lòng điều chỉnh ngôn ngữ mặc định, văn phong hoặc phạm vi theo ý của tác giả.

- Add full Vietnamese README (README.vi.md) and link from README.MD / README.en.md
- Add docs/README.vi.md and docs/DEPLOY.vi.md (concise local-first deployment guide)
- Translate config.example.json and .env.example comments to Vietnamese
- Add WebUI vi.json locale (489 keys, 1:1 with zh.json) and "vietnamese" label in en/zh
- Set Vietnamese as default language in webui/src/i18n.jsx with safe en fallback
- Update LanguageToggle.jsx to cycle VI -> EN -> ZH
- Extend .gitignore to ignore *.exe, .env.*.production, run.bat and nested clones

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2026

@thanhnn91qn-afk is attempting to deploy a commit to the cjack's projects Team on Vercel.

A member of the Team first needs to authorize it.

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