Skip to content

i18n(vi): add Vietnamese (vi) locale#154

Closed
ThaiTrevor wants to merge 2 commits into
O2sa:mainfrom
ThaiTrevor:i18n-vi/issue-133-refactor-standardize-localization
Closed

i18n(vi): add Vietnamese (vi) locale#154
ThaiTrevor wants to merge 2 commits into
O2sa:mainfrom
ThaiTrevor:i18n-vi/issue-133-refactor-standardize-localization

Conversation

@ThaiTrevor
Copy link
Copy Markdown

Summary

Adds Vietnamese (vi) localization to DevImpact, alongside the existing English and Arabic locales. This addresses issue #133's goal of standardizing localization config to simplify adding new languages by demonstrating the full path for a new locale: a JSON message file plus minimal entries in lib/i18n-core.ts and lib/i18n.ts.

Changes

  • New file: locales/vi.json — 217 message keys translated from locales/en.json, formal Vietnamese (bạn form), full diacritics, all {placeholder} tokens preserved verbatim.
  • lib/i18n-core.ts: add vi to supportedLocales and a localeMeta entry ({ dir: "ltr", label: "Tiếng Việt" }).
  • lib/i18n.ts: import viMessages and register it in messagesByLocale.

Translation notes

  • Brand/proper nouns kept in English: DevImpact, GitHub, Pull Request, Repository, Issue, PR, commit, merge, fork, token, API, repo.
  • Technical terms kept in English where no clean Vietnamese equivalent exists (webhook-style policy).
  • Formula strings (e.g. finalScore = repoScore * 0.45 + ...) kept verbatim.
  • All ICU-style placeholders ({name}, {seconds}, {username}, {score}, {other}, {diff}, {winner}, {language}, {title}, {repo}, {value}, {number}, {user1}, {user2}) preserved byte-for-byte.

Validation

  • python -m json.tool locales/vi.json → valid JSON
  • Key parity check: en 217 keys ↔ vi 217 keys, zero missing/extra
  • Placeholder parity check: zero mismatches across all 217 entries

Closes #133

🤖 Generated with Claude Code

ThaiTrevor and others added 2 commits May 23, 2026 19:02
- Add locales/vi.json with all 217 message keys translated from en.json
- Register `vi` in supportedLocales and localeMeta (ltr, "Tiếng Việt")
- Wire viMessages into messagesByLocale in lib/i18n.ts

Closes O2sa#133

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 23, 2026

@ThaiTrevor is attempting to deploy a commit to the osama's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown

Thank you for the pull request! ✅

A maintainer will review this soon. Please be patient while we take a look. 🙌

@ThaiTrevor ThaiTrevor marked this pull request as ready for review May 23, 2026 12:05
@vercel
Copy link
Copy Markdown

vercel Bot commented May 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dev-impact Ready Ready Preview, Comment May 23, 2026 7:35pm

Comment thread .bounty_pr.json
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need for this file!

@O2sa O2sa closed this May 24, 2026
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.

refactor: Standardize localization config to simplify adding new languages

2 participants