Files
Kennyzheng 6b5cb0b76b feat(i18n): add Vietnamese (vi-VN) language support (#14279)
### What this PR does

Before this PR:
Cherry Studio supported 11 languages but did not include Vietnamese.

After this PR:
Vietnamese (vi-VN / Tiếng Việt) is fully supported with 4016 translated
keys across both renderer and main processes. Ant Design components
correctly display Vietnamese locale. All 106 previously leaked
non-Vietnamese strings have been re-translated.

### Why we need it and why it was done in this way

Vietnamese users represent a growing segment of Cherry Studio's user
base. Adding vi-VN follows the same pattern as all existing
machine-translated locales (de-DE, es-ES, fr-FR, etc.):

1. Register `vi-VN` in the `LanguageVarious` TypeScript union type
2. Add locale entries to all `Record<LanguageVarious, ...>` maps (i18n,
dayjs, EmojiPicker)
3. Add `vi-VN` to main process `locales.ts` for menu/dialog translations
4. Add `vi-VN` case to `AntdProvider.tsx` for Ant Design component
localization
5. Add language selector option in GeneralSettings
6. Add `'vi-vn': 'Vietnamese'` to the auto-translate script's
`languageMap`
7. Generate the initial `vi-vn.json` translation file and fix 106
wrong-language entries

The following tradeoffs were made:
- EmojiPicker falls back to English data/i18n for Vietnamese since
`emoji-picker-element` doesn't ship Vietnamese locale data. This is
consistent with how Romanian and Greek are handled.

The following alternatives were considered:
- Manual translation: rejected in favor of machine translation for
consistency with other non-CJK locales, and because the CI pipeline
auto-maintains translations going forward.

### Breaking changes

None.

### Special notes for your reviewer

- The `vi-vn.json` file (~6000 lines) is machine-translated. 106 entries
that originally leaked from other locales (German, Spanish, French,
Italian, Thai, Japanese, Korean, etc.) were detected and re-translated.
- Compared to the previous PR (#14277), this version additionally
updates `src/main/utils/locales.ts` (main process translations) and
`src/renderer/src/context/AntdProvider.tsx` (Ant Design locale), which
were missing before.
- No changes to the CI workflow (`auto-i18n.yml`) were needed — it
auto-discovers all JSON files in the `translate/` directory.
- All checks pass: `pnpm lint`, `pnpm test` (4107 tests), `pnpm
typecheck`, `pnpm i18n:check`.

### Checklist

- [x] PR: The PR description is expressive enough and will help future
contributors
- [x] Code: Write code that humans can understand and Keep it simple
- [x] Refactor: You have left the code cleaner than you found it (Boy
Scout Rule)
- [ ] Upgrade: Impact of this change on upgrade flows was considered and
addressed if required
- [x] Documentation: A user-guide update was considered and is present
(link) or not required. Check this only when the PR introduces or
changes a user-facing feature or behavior.
- [x] Self-review: I have reviewed my own code before requesting review
from others

### Release note

```release-note
Added Vietnamese (Tiếng Việt) language support with complete UI translations and automatic translation maintenance via CI.
```

### Screenshots

| Agent Page | Assistant Page | Settings Page |
|:---:|:---:|:---:|
|
![Agent](https://pub-a9416c5573a34388b8d9465d8bef4257.r2.dev/pr-assets/14279/vi-agent.png)
|
![Assistant](https://pub-a9416c5573a34388b8d9465d8bef4257.r2.dev/pr-assets/14279/vi-assistant.png)
|
![Settings](https://pub-a9416c5573a34388b8d9465d8bef4257.r2.dev/pr-assets/14279/vi-settings.png)
|

---------

Signed-off-by: zhengke090@gmail.com <zhengke090@126.com>
Co-authored-by: zhengke090@gmail.com <zhengke090@126.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: SuYao <sy20010504@gmail.com>
Co-authored-by: George·Dong <98630204+GeorgeDong32@users.noreply.github.com>
2026-04-16 23:40:39 +08:00
..
2025-05-11 00:37:01 +08:00