Skip to content

Commit b1461d5

Browse files
feat(i18n): add Vietnamese translation (anomalyco#857)
- Add vi.ts with 800 translation keys - Update Language type to include 'vi' - Add Vietnamese to LANGUAGE_OPTIONS in picker - Follow project convention: keep professional terms untranslated (Skills, Plugins, Commands, Sessions, OpenCode, OpenWork, MCP, etc.) Closes: Vietnamese language support for OpenWork
1 parent f96b50a commit b1461d5

3 files changed

Lines changed: 846 additions & 3 deletions

File tree

‎packages/app/src/i18n/index.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
import { createSignal, createRoot } from "solid-js";
22
import en from "./locales/en";
33
import zh from "./locales/zh";
4+
import vi from "./locales/vi";
45
import { LANGUAGE_PREF_KEY } from "../app/constants";
56

67
/**
7-
* Supported languages - only en and zh for initial PR
8+
* Supported languages
89
*/
9-
export type Language = "en" | "zh";
10+
export type Language = "en" | "zh" | "vi";
1011
export type Locale = Language;
1112

1213
/**
1314
* All supported languages - single source of truth
1415
*/
15-
export const LANGUAGES: Language[] = ["en", "zh"];
16+
export const LANGUAGES: Language[] = ["en", "zh", "vi"];
1617

1718
/**
1819
* Language options for UI - single source of truth
1920
*/
2021
export const LANGUAGE_OPTIONS = [
2122
{ value: "en" as Language, label: "English", nativeName: "English" },
2223
{ value: "zh" as Language, label: "简体中文", nativeName: "简体中文" },
24+
{ value: "vi" as Language, label: "Vietnamese", nativeName: "Tiếng Việt" },
2325
] as const;
2426

2527
/**
@@ -28,6 +30,7 @@ export const LANGUAGE_OPTIONS = [
2830
const TRANSLATIONS: Record<Language, Record<string, string>> = {
2931
en,
3032
zh,
33+
vi,
3134
};
3235

3336
/**

‎packages/app/src/i18n/locales/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
*/
44
export { default as en } from "./en";
55
export { default as zh } from "./zh";
6+
export { default as vi } from "./vi";

0 commit comments

Comments
 (0)