Skip to content

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

Open
ThaiTrevor wants to merge 3 commits into
caret-collective:mainfrom
ThaiTrevor:i18n-vi/issue-144-add-translations-for-vietnamese
Open

i18n(vi): add Vietnamese (vi) locale#246
ThaiTrevor wants to merge 3 commits into
caret-collective:mainfrom
ThaiTrevor:i18n-vi/issue-144-add-translations-for-vietnamese

Conversation

@ThaiTrevor
Copy link
Copy Markdown

Summary

Adds a Vietnamese translation for the application, addressing #144.

  • New locale file src/i18n/locales/vi.ts mirroring the structure of en.ts (all required keys: site, icon, alert, header, input, output.map, nav, option.locale, option.general.map, option.lintingRegion, option.theme.map).
  • Registers vi in src/config/locale.ts: added to the LocaleId union and the localeMap (marked wip: true, rtl: false), following the same convention used for other in-progress locales (de, es, fr, id, it, zh).
  • Uses formal Vietnamese ("bạn"), preserves all template placeholders (${SITE.title}), keeps brand/theme names (AMOLED, Solarized, Gruvbox, Catppuccin, Nord, Dracula, Teal) untranslated, and keeps proper tonal marks throughout.

Translation notes

  • Pangram placeholder rendered as a natural Vietnamese sentence rather than a literal word-for-word copy, matching the convention used by the other non-English locale files (e.g. id.ts).
  • Theme names that mix a brand + light/dark variant (e.g. "Solarized Light") use the pattern Brand + Sáng/Tối, consistent with id.ts.
  • lintingRegion keeps the auto key mapped to the shared AUTO_LABEL ("Tự động") constant.

Closes #144

Test plan

  • pnpm build succeeds with the new locale registered
  • Visit the site with ?lang=vi (or the language selector) and confirm Vietnamese strings render with correct tonal marks
  • Confirm option.lintingRegion.unsupportedWarning tooltip displays for Vietnamese (no Harper dialect support yet)

🤖 Generated with Claude Code

ThaiTrevor and others added 2 commits May 22, 2026 22:11
Adds Vietnamese translation file at src/i18n/locales/vi.ts mirroring the
structure of the source English locale, and registers 'vi' in the locale
map (src/config/locale.ts) as a work-in-progress language.

Closes caret-collective#144

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ThaiTrevor ThaiTrevor marked this pull request as ready for review May 22, 2026 16:55
Copy link
Copy Markdown
Collaborator

@twocaretcat twocaretcat left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Couple changes requested:

  • The Markdoc files also need to be translated. #144 has the details on how to do this. Make sure to translate image alt text as well
  • .bounty_pr.json should be removed
  • The build needs to be run locally with bun run build to generate the social images in Vietnamese and make sure nothing else is broken. If you need help with this, let me know

Are you able to review Claude's translations yourself (do you speak Vietnamese)?

Comment thread .bounty_pr.json Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please remove this file

@ThaiTrevor
Copy link
Copy Markdown
Author

Thanks for the review @twocaretcat!

  • .bounty_pr.json removed — internal tooling metadata that slipped in.

  • ✅ I'm a native Vietnamese speaker. The initial translation was AI-assisted, and I'll do a polish pass on the existing strings before any further work.

  • 🔄 Markdoc translation and bun run build verification will come in follow-up commits once the current scope passes review.

Let me know if you'd prefer to close this PR and reopen scoped per-area, or keep iterating here.

@twocaretcat
Copy link
Copy Markdown
Collaborator

You can keep working here. Feel free to merge or rebase your branch on main if you want. When you're done all tasks, request a review again and I'll take a look

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 translations for Vietnamese

2 participants