feat(i18n): add Vietnamese (vi) translation#115
feat(i18n): add Vietnamese (vi) translation#115jhm1909 wants to merge 1 commit intowebadderall:mainfrom
Conversation
Add complete Vietnamese locale with ~389 translation keys across 7 namespace files: common, launch, editor, timeline, settings, dialogs, shortcuts. Register 'vi' in SUPPORTED_LOCALES and I18nContext bundle. All i18n:check, tsc, vite build, and vitest validations pass.
|
|
|
Warning
|
| Cohort / File(s) | Summary |
|---|---|
I18n Configuration src/contexts/I18nContext.tsx, src/i18n/config.ts |
Extended SUPPORTED_LOCALES to include 'vi' and imported seven Vietnamese locale JSON bundles (common, dialogs, editor, launch, settings, shortcuts, timeline) into the messages mapping. |
Vietnamese Locale Files src/i18n/locales/vi/common.json, src/i18n/locales/vi/dialogs.json, src/i18n/locales/vi/editor.json, src/i18n/locales/vi/launch.json, src/i18n/locales/vi/settings.json, src/i18n/locales/vi/shortcuts.json, src/i18n/locales/vi/timeline.json |
Added comprehensive Vietnamese translations for app metadata, common actions, dialogs (export/font/shortcuts), editor controls and formats, recording workflow and permissions, UI settings (video effects, captions, zoom, webcam, export), keyboard shortcuts, and timeline features. |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~15 minutes
Poem
🐰 Hop, hop! Vietnamese voices now sing,
Seven scrolls of translation we bring!
From 'vi' locale sprouts, translations bloom,
Making room in the app for more to zoom! 🌍✨
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title clearly and accurately describes the main change: adding Vietnamese translation support to the i18n system. |
| Description check | ✅ Passed | The description provides comprehensive details about the change including summary, file changes, statistics, translation approach, and validation results. However, it does not follow the provided PR template structure. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
Comment @coderabbitai help to get the list of available commands and usage tips.
|
|
|
Hi! This PR was flagged by the anti-slop bot, but this is legitimate work — I'd like to provide some context: Why Vietnamese? Translation quality:
Verification:
Happy to address any feedback or adjust translations. Thank you for reviewing! 🙏 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/i18n/config.ts`:
- Line 3: SUPPORTED_LOCALES includes "vi" but the language dropdown mapping
LOCALE_LABELS in LaunchWindow.tsx is missing that key, causing the raw locale
code to display; add an entry for 'vi' in LOCALE_LABELS (e.g., 'vi': 'Tiếng
Việt' or 'Vietnamese') so the selector shows a readable label that matches the
SUPPORTED_LOCALES key.
In `@src/i18n/locales/vi/settings.json`:
- Around line 87-93: The two caption keys "deleteModel" and "clearModel"
currently both translate to "Xóa mô hình", causing UI ambiguity; update the
translation values so they are distinct and reflect their different actions
(e.g., keep "deleteModel" as "Xóa mô hình" and change "clearModel" to a clearer
alternative like "Xóa dữ liệu mô hình" or "Đặt lại mô hình" depending on the
source intent), and verify the chosen wording matches the original action
semantics used by the UI.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 26288d1a-e931-43bd-a5e3-6fda06586f63
📒 Files selected for processing (9)
src/contexts/I18nContext.tsxsrc/i18n/config.tssrc/i18n/locales/vi/common.jsonsrc/i18n/locales/vi/dialogs.jsonsrc/i18n/locales/vi/editor.jsonsrc/i18n/locales/vi/launch.jsonsrc/i18n/locales/vi/settings.jsonsrc/i18n/locales/vi/shortcuts.jsonsrc/i18n/locales/vi/timeline.json
| export const DEFAULT_LOCALE = 'en' as const | ||
|
|
||
| export const SUPPORTED_LOCALES = ['en', 'es', 'zh-CN'] as const | ||
| export const SUPPORTED_LOCALES = ['en', 'es', 'vi', 'zh-CN'] as const |
There was a problem hiding this comment.
Vietnamese will appear as raw code in the language selector.
Line 3 enables vi, but src/components/launch/LaunchWindow.tsx (LOCALE_LABELS, Line 54-58) does not include vi, so the dropdown falls back to vi instead of a readable label (see rendering at Line 1013-1025).
💡 Suggested follow-up patch
const LOCALE_LABELS: Record<string, string> = {
en: "EN",
es: "ES",
+ vi: "Tiếng Việt",
"zh-CN": "中文",
};🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/i18n/config.ts` at line 3, SUPPORTED_LOCALES includes "vi" but the
language dropdown mapping LOCALE_LABELS in LaunchWindow.tsx is missing that key,
causing the raw locale code to display; add an entry for 'vi' in LOCALE_LABELS
(e.g., 'vi': 'Tiếng Việt' or 'Vietnamese') so the selector shows a readable
label that matches the SUPPORTED_LOCALES key.
| "captions": { | ||
| "enabled": "Hiện", | ||
| "language": "Ngôn ngữ", | ||
| "downloading": "Đang tải xuống...", | ||
| "deleteModel": "Xóa mô hình", | ||
| "clearModel": "Xóa mô hình", | ||
| "downloadModel": "Tải mô hình", |
There was a problem hiding this comment.
Differentiate deleteModel and clearModel translations to avoid UI ambiguity.
Both keys currently map to "Xóa mô hình", which can hide distinct actions if the source meanings differ.
✏️ Suggested wording split
- "deleteModel": "Xóa mô hình",
- "clearModel": "Xóa mô hình",
+ "deleteModel": "Xóa mô hình",
+ "clearModel": "Gỡ mô hình",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "captions": { | |
| "enabled": "Hiện", | |
| "language": "Ngôn ngữ", | |
| "downloading": "Đang tải xuống...", | |
| "deleteModel": "Xóa mô hình", | |
| "clearModel": "Xóa mô hình", | |
| "downloadModel": "Tải mô hình", | |
| "captions": { | |
| "enabled": "Hiện", | |
| "language": "Ngôn ngữ", | |
| "downloading": "Đang tải xuống...", | |
| "deleteModel": "Xóa mô hình", | |
| "clearModel": "Gỡ mô hình", | |
| "downloadModel": "Tải mô hình", |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/i18n/locales/vi/settings.json` around lines 87 - 93, The two caption keys
"deleteModel" and "clearModel" currently both translate to "Xóa mô hình",
causing UI ambiguity; update the translation values so they are distinct and
reflect their different actions (e.g., keep "deleteModel" as "Xóa mô hình" and
change "clearModel" to a clearer alternative like "Xóa dữ liệu mô hình" or "Đặt
lại mô hình" depending on the source intent), and verify the chosen wording
matches the original action semantics used by the UI.
Summary
Add complete Vietnamese (Tiếng Việt) locale to Recordly's i18n system.
What changed
7 new locale files under
src/i18n/locales/vi/:common.json— app name, actions, errorslaunch.json— recording UI, source selector, permissionseditor.json— annotations, font styles, export, feedback, tutorialtimeline.json— zoom, trim, speed, annotation controlssettings.json— zoom, cursor, webcam, frame, background, captions, crop, exportdialogs.json— export dialogs, add font, shortcuts configshortcuts.json— keyboard shortcut action labelssrc/i18n/config.ts— added'vi'toSUPPORTED_LOCALESsrc/contexts/I18nContext.tsx— imported 7 Vietnamese locale files and registered thevibundleStats
Translation approach
{{placeholder}}variables and<html>tags preservedTRANSLATION_GUIDE.mdconventionsValidation
npm run i18n:checktsc --noEmitvite build(production)vitest --runReviewer focus
Summary by CodeRabbit