Skip to content

Commit 0b69a3c

Browse files
philzexedev-shelley
andcommitted
fix(i18n): finish Vietnamese locale wiring
Prompt: Cherry-pick that change carefully onto a new worktree with origin/main. (Note commit is on shelley which is in exe.git:shelley, but you can make it work.) Then fix the things you suggested in the "blocking" category and add a new commit on top with those fixes Add Vietnamese to the command palette language switcher, align the translation export with the vi locale code, keep Up-Goer Five last, and fix Vietnamese copy issues. Co-authored-by: Shelley <shelley@exe.dev>
1 parent c939469 commit 0b69a3c

5 files changed

Lines changed: 16 additions & 8 deletions

File tree

ui/src/components/ChatInterface.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,8 +550,8 @@ const LANGUAGE_OPTIONS: { locale: Locale; flag: string; label: string }[] = [
550550
{ locale: "es", flag: "🇪🇸", label: "Español" },
551551
{ locale: "zh-CN", flag: "🇨🇳", label: "简体中文" },
552552
{ locale: "zh-TW", flag: "🇹🇼", label: "繁體中文" },
553-
{ locale: "upgoer5", flag: "🚀", label: "Up-Goer Five" },
554553
{ locale: "vi", flag: "🇻🇳", label: "Tiếng Việt" },
554+
{ locale: "upgoer5", flag: "🚀", label: "Up-Goer Five" },
555555
];
556556

557557
function LanguageDropdown({

ui/src/components/CommandPalette.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ function CommandPalette({
474474
| "spanish"
475475
| "simplifiedChinese"
476476
| "traditionalChinese"
477+
| "vietnamese"
477478
| "upgoerFive";
478479
nativeName: string;
479480
keywords: string[];
@@ -527,6 +528,13 @@ function CommandPalette({
527528
nativeName: "\u7e41\u9ad4\u4e2d\u6587",
528529
keywords: ["chinese", "traditional", "zh", "zh-tw", "\u4e2d\u6587", "\u7e41\u9ad4"],
529530
},
531+
{
532+
loc: "vi",
533+
flag: "\ud83c\uddfb\ud83c\uddf3",
534+
name: "vietnamese",
535+
nativeName: "Tiếng Việt",
536+
keywords: ["vietnamese", "vi", "tiếng việt", "tieng viet"],
537+
},
530538
{
531539
loc: "upgoer5",
532540
flag: "\ud83d\ude80",

ui/src/i18n/context.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { es } from "./es";
88
import { upgoer5 } from "./upgoer5";
99
import { zhCN } from "./zh-CN";
1010
import { zhTW } from "./zh-TW";
11-
import { vn } from "./vi";
11+
import { vi } from "./vi";
1212

1313
const LOCALE_STORAGE_KEY = "shelley-locale";
1414

@@ -21,7 +21,7 @@ const translations: Record<Locale, TranslationKeys> = {
2121
"zh-CN": zhCN,
2222
"zh-TW": zhTW,
2323
upgoer5,
24-
vi: vn,
24+
vi,
2525
};
2626

2727
function getStoredLocale(): Locale {

ui/src/i18n/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ export { I18nProvider, useI18n, I18nContext } from "./context";
33
export { en } from "./en";
44
export { zhCN } from "./zh-CN";
55
export { zhTW } from "./zh-TW";
6-
export { vn } from "./vi";
6+
export { vi } from "./vi";

ui/src/i18n/vi.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { TranslationKeys } from "./types";
22

3-
export const vn: TranslationKeys = {
3+
export const vi: TranslationKeys = {
44
// App-level
55
loading: "Đang tải ...",
66
retry: "Thử lại",
@@ -65,7 +65,7 @@ export const vn: TranslationKeys = {
6565
renderMarkdownAgent: "Render markdown chỉ cho tin nhắn gửi từ agent",
6666
enableMarkdownAll: "Kích hoạt markdown toàn bộ",
6767
renderMarkdownAll: "Render markdown cho tất cả tin nhắn",
68-
disableMarkdown: "Disable Markdown",
68+
disableMarkdown: "Tắt Markdown",
6969
showPlainText: "Chỉ văn bản thuần, không hơn không kém",
7070
archiveConversationAction: "Lưu trữ",
7171
archiveCurrentConversation: "Lưu trữ cuộc hội thoại hiện tại",
@@ -131,7 +131,7 @@ export const vn: TranslationKeys = {
131131
tags: "Tags",
132132
tagsPlaceholder: "phân cách bằng dấu phẩy, ví dụ slug, rẻ",
133133
tagsTooltip:
134-
'Sử dung tag phân cách bằng dấu phẩy cho model. Dùng "slug" để setup model này làm model tạo tiêu đề. Nếu không có model nào có tag này thì model mặc định (gpt-oss-20b) sẽ được sử dung.',
134+
'Sử dụng tag phân cách bằng dấu phẩy cho model. Dùng "slug" để đánh dấu model này làm model tạo tiêu đề hội thoại. Nếu không có model nào có tag "slug", model của hội thoại sẽ được sử dụng.',
135135
reasoningEffort: "Mức độ suy nghĩ",
136136
reasoningEffortPlaceholder: "ví dụ: medium, high, xhigh, none — để trống là mức mặc định",
137137
reasoningEffortHint:
@@ -146,7 +146,7 @@ export const vn: TranslationKeys = {
146146
apiKeyRequired: "Cần có API key",
147147
noModelsConfigured: "Chưa có model nào",
148148
noModelsHint:
149-
"Đặt biến môi trường ANTHROPIC_API_KEY, hoặc dung flag -gateway, hoặc thêm model bên dưới.",
149+
"Đặt biến môi trường ANTHROPIC_API_KEY, hoặc dùng flag -gateway, hoặc thêm model bên dưới.",
150150

151151
// Notifications Modal
152152
notifications: "Thông báo",

0 commit comments

Comments
 (0)