Repository navigation
feat(i18n): add Vietnamese (vi-VN) translation - #2035
Conversation
|
🔍 OpenCodeReview found 1 issue(s) in this PR.
📄
|
|
recheck |
|
@dung997tb Hello, thanks for taking time to contribute! Some questions:
|
|
@dung997tb merge conflicts |
# Conflicts: # AGENTS.md # CONTRIBUTING.md # README.md # docs/i18n/CONTRIBUTING.ja-JP.md # docs/i18n/CONTRIBUTING.ko-KR.md # docs/i18n/CONTRIBUTING.ru-RU.md # docs/i18n/CONTRIBUTING.zh-CN.md # docs/i18n/README.ja-JP.md # docs/i18n/README.ko-KR.md # docs/i18n/README.ru-RU.md # docs/i18n/README.zh-CN.md # pages/src/components/Navbar.tsx # pages/src/content/docs/index.ts # pages/src/i18n/context.tsx # pages/src/i18n/types.ts # pages/src/pages/NotFoundPage.test.tsx # scripts/github-actions/check-translation-sync.js
|
Hi @wu21-web, thanks for the questions — answering each: Native speaker? Yes, Vietnamese is my native language. PR template / AI disclosure? Honest answer: no — my PR description did not follow the template, and the AI disclosure was missing. To state it plainly here: the translation was drafted with assistance from the Fable 5.2 model and then fully reviewed and corrected by me, a native speaker, before submitting. I will also update the PR description to match the template, including the checklist and this disclosure. Reviewed the output? Yes. Beyond my own read-through: Translating the VS Code extension? I considered it — Maintenance? Yes, I can maintain the Vietnamese files and keep them in sync as the source strings evolve — your sync-check script makes drift easy to spot, and I'll use it before sending updates. Speakers / necessity, and the rebase cost? Vietnamese has roughly 100 million speakers and one of the larger developer communities in Southeast Asia, so I believe the audience is there. On the rebase burden for the other open docs PRs: you're right, and I'm sorry for the churn — the shared-file edits are one-line additions per file (language bars and locale lists), so resolving over them should be mechanical, and if any author hits a conflict because of this change I'm happy to help sort it out. Also @lizhengfeng101 — the merge conflicts are now resolved; thanks for flagging them. |
|
@dung997tb The French-language navigation is missing. I suggest you check which content was synced from main and whether any content was omitted and not localized. |
|
Thanks @lizhengfeng101 — you were right, and I audited the full sync after the merge rather than only the spot you flagged: Fixed in ea464f3:
Checked and already in sync:
|
|
Follow-up on the Pages CI failure (run 45383934825, Root cause: resolving the merge in Fix: the locale import is now aliased ( Verification, run locally with the same toolchain as the Pages CI container (node:24.22.1): The hosted runs for the new head currently show |
| import type { Language, TranslationKeys } from '../i18n/types'; | ||
|
|
||
| const translations: Record<Language, TranslationKeys> = { en, zh, ja, ko, ru, tr }; | ||
| const translations: Record<Language, TranslationKeys> = { en, zh, ja, ko, ru, tr, vi }; |
| const STORAGE_KEY = 'ocr-lang'; | ||
|
|
||
| const SUPPORTED_LANGUAGES: Language[] = ['en', 'zh', 'ja', 'ko', 'ru', 'tr']; | ||
| const SUPPORTED_LANGUAGES: Language[] = ['en', 'zh', 'ja', 'ko', 'ru', 'tr', 'vi']; |
There was a problem hiding this comment.
ditto, not apart of this change, but just to mention
Description
Adds Vietnamese (vi-VN) as a new language, following the existing ja-JP / ko-KR / ru-RU pattern: full README and CONTRIBUTING translations under
docs/i18n/, plus the pages UI locale (pages/src/i18n/vi.ts, 297/297 keys identical in set and order toen.ts) with locale registration. The VS Code extension and IDEA plugin are separate translation surfaces and are not included — happy to add them in a follow-up if wanted.Type of Change
How Has This Been Tested?
Verified with the repo's own gate:
check-translation-sync.js readmespasses (all 8 READMEs share the same heading structure) and its self-tests pass. Key set ofvi.tsverified identical toen.ts(297/297); link/image targets in both translated docs match the originals.make testwas not run — this change touches documentation and UI strings only, no Go code.Checklist
AI disclosure: the translation was drafted with assistance from the Fable 5.2 model and then fully reviewed and corrected by me, a native Vietnamese speaker, before submitting.
(The style and tests checkboxes are left unticked: no Go code is changed, and no new tests were added — the affected component tests were updated for the new locale and the repo's translation-sync checks above were run instead.)
Related Issues
None.