feat: Add Vietnamese (vi) localization support#2358
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds full Vietnamese language support (vi) to CodeWhale, including a new Vietnamese README, UI localization strings, and locale reinforcement prompts. It also updates documentation to reflect that both Vietnamese and Latin American Spanish (es-419) are now fully shipped locales. The review feedback suggests two minor translation improvements: updating the onboarding language picker footer to instruct users to press keys 1-7 (instead of 1-6) to account for the new locale, and refining a Vietnamese phrasing in the system prompt reinforcement to make it more idiomatic.
| mã nguồn, đường dẫn tệp, tên công cụ (ví dụ `read_file`, `exec_shell`), biến môi trường, \ | ||
| tham số dòng lệnh và URL giữ nguyên dạng gốc —— chỉ các văn bản giải thích bằng ngôn ngữ \ | ||
| tự nhiên mới được chuyển sang tiếng Việt.\n\n\ | ||
| Nếu người dùng chuyển sang ngôn ngữ khác trong phiên làm việc, hãy chuyển theo từ lượt tiếp theo. \ |
There was a problem hiding this comment.
The phrasing "hãy chuyển theo từ lượt tiếp theo" is slightly unnatural in Vietnamese. It is more idiomatic and precise to say "hãy chuyển sang ngôn ngữ đó từ lượt tiếp theo" (switch to that language from the next turn).
| Nếu người dùng chuyển sang ngôn ngữ khác trong phiên làm việc, hãy chuyển theo từ lượt tiếp theo. \ | |
| Nếu người dùng chuyển sang ngôn ngữ khác trong phiên làm việc, hãy chuyển sang ngôn ngữ đó từ lượt tiếp theo. \ |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
how wonderful - thank you for making this PR! I'll work on getting this in for the next version |
|
I pushed a small maintainer follow-up to keep this moving: merged current Local verification on the updated branch:
Thank you again @hoclaptrinh33. This is a lovely addition; I am watching the refreshed checks now and will merge it once GitHub agrees. |
|
Awesome! Thank you so much for reviewing and helping me merge this PR. I'm glad to contribute to CodeWhale. If there are any issues or updates needed for the Vietnamese localization in the future, please let me know. Cheers! |
This PR adds full Vietnamese translation support to CodeWhale TUI, updates documentation and locale configuration, and creates the README.vi.md.
Greptile Summary
This PR adds full Vietnamese (
vi) localization support: a newLocale::Vienum variant with ~400 translated strings, locale system-prompt preambles, a Vietnamese README, and updates to the onboarding language-picker footer text ("1-7") across all existing translations.localization.rs: Adds theVivariant to theLocaleenum, removesvifromPLANNED_QA_LOCALES, supplies a completevietnamese()translation function, and bumps allOnboardLanguageFooterstrings from "1-6" → "1-7".prompts.rs: AddsLOCALE_PREAMBLE_VI/LOCALE_CLOSER_VIsystem-prompt constants and wires Vietnamese into the reinforcement and translation-target helpers.onboarding/language.rs:LANGUAGE_OPTIONSwas not updated — it still only defines six hotkeys (1–6), so the new "1-7" footer hint is misleading and hotkey7silently does nothing in the first-run picker.Confidence Score: 4/5
Safe to merge after fixing the missing LANGUAGE_OPTIONS entry so that the onboarding picker's hotkey '7' actually selects Vietnamese.
The translation work itself is thorough and correctly wired throughout the codebase. The one concrete defect is that LANGUAGE_OPTIONS in the first-run language picker was not updated to include Vietnamese, leaving the 'Press 1-7' footer text pointing to a non-functional hotkey.
crates/tui/src/tui/onboarding/language.rs — LANGUAGE_OPTIONS needs a Vietnamese entry added.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[First-run onboarding\nOnboardingState::Language] --> B[User presses digit key 1-7] B --> C{LANGUAGE_OPTIONS.find\nhotkey == pressed key} C -- found --> D[set_locale_from_onboarding\ntag] C -- not found\ne.g. '7' for vi --> E[Silent no-op\nhotkey ignored] D --> F[advance_onboarding_after_language] F --> G[API key step / trust step] subgraph LANGUAGE_OPTIONS [LANGUAGE_OPTIONS current state] L1["'1' auto"] L2["'2' en"] L3["'3' ja"] L4["'4' zh-Hans"] L5["'5' zh-Hant"] L6["'6' pt-BR"] L7["'7' missing vi entry"] end style L7 fill:#f66,color:#fff style E fill:#f66,color:#fffReviews (3): Last reviewed commit: "fix(localization): finish Vietnamese loc..." | Re-trigger Greptile