From 2daffe1364bc05ea3d7560414d9801da707b438e Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Sat, 31 Oct 2026 16:16:39 +0100 Subject: [PATCH] fix: complete the vietnamese strings and register them for plugin controls #1448 --- i18n/plain-language.ts | 4 +- lib/__tests__/plain-language-strings.test.ts | 6 +- lib/plugin-sandbox/ui-kit/kit-strings.ts | 1 + locales/vi/common.json | 99 +++++++++++++++++++- 4 files changed, 101 insertions(+), 9 deletions(-) diff --git a/i18n/plain-language.ts b/i18n/plain-language.ts index ac1814815..cb51afbd7 100644 --- a/i18n/plain-language.ts +++ b/i18n/plain-language.ts @@ -4,8 +4,8 @@ type Messages = Record; /** * Plain-language mode (CO-14): simpler wording for settings and error - * * messages. English, German and Vietnamese have plain versions; every other locale - * keeps its normal strings when the setting is on. + * messages. English, German and Vietnamese have plain versions; every + * other locale keeps its normal strings when the setting is on. * * The plain strings live in `locales//plain.json`, outside common.json, * so the translation parity test doesn't ask every locale for them. Each file diff --git a/lib/__tests__/plain-language-strings.test.ts b/lib/__tests__/plain-language-strings.test.ts index 5e1dca5a2..c19e45403 100644 --- a/lib/__tests__/plain-language-strings.test.ts +++ b/lib/__tests__/plain-language-strings.test.ts @@ -43,9 +43,9 @@ function icuArgs(text: string): string[] { const plainLocales = fs.readdirSync(localesDir).filter((l) => fs.existsSync(path.join(localesDir, l, 'plain.json'))); describe('plain-language strings', () => { - it('exist for English and German only, each with a loader', () => { - expect(plainLocales.sort()).toEqual(['de', 'en']); - expect(Object.keys(PLAIN_LANGUAGE_LOADERS).sort()).toEqual(['de', 'en']); + it('exist for English, German and Vietnamese only, each with a loader', () => { + expect(plainLocales.sort()).toEqual(['de', 'en', 'vi']); + expect(Object.keys(PLAIN_LANGUAGE_LOADERS).sort()).toEqual(['de', 'en', 'vi']); }); for (const locale of plainLocales) { diff --git a/lib/plugin-sandbox/ui-kit/kit-strings.ts b/lib/plugin-sandbox/ui-kit/kit-strings.ts index 2d58fefcf..93afefeac 100644 --- a/lib/plugin-sandbox/ui-kit/kit-strings.ts +++ b/lib/plugin-sandbox/ui-kit/kit-strings.ts @@ -33,6 +33,7 @@ export const KIT_STRINGS: Record> = { th: { remove: 'นำออก', remove_named: 'นำ {name} ออก', clear: 'ล้าง', clear_search: 'ล้างการค้นหา', open: 'เปิดรายการ', close: 'ปิดรายการ' }, tr: { remove: 'Kaldır', remove_named: '{name} öğesini kaldır', clear: 'Temizle', clear_search: 'Aramayı temizle', open: 'Listeyi aç', close: 'Listeyi kapat' }, uk: { remove: 'Вилучити', remove_named: 'Вилучити {name}', clear: 'Очистити', clear_search: 'Очистити пошук', open: 'Відкрити список', close: 'Закрити список' }, + vi: { remove: 'Xóa', remove_named: 'Xóa {name}', clear: 'Xóa hết', clear_search: 'Xóa tìm kiếm', open: 'Mở danh sách', close: 'Đóng danh sách' }, zh: { remove: '移除', remove_named: '移除 {name}', clear: '清除', clear_search: '清除搜索', open: '打开列表', close: '关闭列表' }, 'zh-TW': { remove: '移除', remove_named: '移除 {name}', clear: '清除', clear_search: '清除搜尋', open: '開啟清單', close: '關閉清單' }, }; diff --git a/locales/vi/common.json b/locales/vi/common.json index 4de108b2c..7d4219351 100644 --- a/locales/vi/common.json +++ b/locales/vi/common.json @@ -116,7 +116,7 @@ "close": "Đóng", "compose": "Soạn thư", "compose_hint": "Soạn thư (c)", - "search_placeholder": "Tìm kiếm thư...", + "search_placeholder": "Tìm thư...", "search_placeholder_hint": "Tìm kiếm thư... (nhấn /)", "storage": "Dung lượng lưu trữ", "storage_used": "Đã dùng", @@ -775,6 +775,69 @@ "copied": "Đã sao chép mã", "copy_failed": "Không sao chép được mã" }, + "structured_mail": { + "kind_flight": "Chuyến bay", + "kind_train": "Tàu hỏa", + "kind_bus": "Xe buýt", + "kind_lodging": "Khách sạn", + "kind_rentalcar": "Xe thuê", + "kind_event": "Sự kiện", + "kind_restaurant": "Nhà hàng", + "kind_order": "Đơn hàng", + "kind_parcel": "Bưu kiện", + "region_flight": "Đặt vé máy bay", + "region_train": "Đặt vé tàu", + "region_bus": "Đặt vé xe buýt", + "region_lodging": "Đặt phòng khách sạn", + "region_rentalcar": "Đặt xe thuê", + "region_event": "Đặt vé sự kiện", + "region_restaurant": "Đặt bàn nhà hàng", + "region_shipment": "Đơn hàng và giao hàng", + "status_cancelled": "Đã hủy", + "status_pending": "Đang chờ", + "status_hold": "Tạm giữ", + "order_status_payment_due": "Chờ thanh toán", + "order_status_processing": "Đang xử lý", + "order_status_problem": "Có sự cố", + "order_status_in_transit": "Đã gửi hàng", + "order_status_pickup_available": "Sẵn sàng để nhận", + "order_status_returned": "Đã trả lại", + "order_status_delivered": "Đã giao", + "order_status_cancelled": "Đã hủy", + "reference": "Mã đặt chỗ", + "order_number": "Số đơn hàng", + "tracking_number": "Mã vận đơn", + "copy_reference": "Sao chép mã đặt chỗ {value}", + "copy_order_number": "Sao chép số đơn hàng {value}", + "copy_tracking_number": "Sao chép mã vận đơn {value}", + "copied_reference": "Đã sao chép mã đặt chỗ", + "copied_order_number": "Đã sao chép số đơn hàng", + "copied_tracking_number": "Đã sao chép mã vận đơn", + "copy_failed": "Không thể sao chép vào bộ nhớ tạm", + "passengers": "Hành khách", + "seats": "Chỗ ngồi", + "tickets": "Vé", + "link_check_in": "Làm thủ tục", + "link_manage": "Quản lý đặt chỗ", + "link_ticket": "Vé", + "link_track": "Theo dõi", + "link_view_order": "Xem đơn hàng", + "check_in_label": "Nhận phòng", + "check_out_label": "Trả phòng", + "from_time": "từ {time}", + "until_time": "đến {time}", + "nights": "{count, plural, other {# đêm}}", + "pickup": "Nhận xe", + "dropoff": "Trả xe", + "party_size": "{count, plural, other {Bàn cho #}}", + "items_more": "và {count} mục khác", + "items_count": "{count, plural, other {# mục}}", + "total": "Tổng {total}", + "expected_by": "Dự kiến đến trước {date}", + "local_time": "giờ địa phương", + "local_time_title": "Giờ địa phương tại nơi đó, không phải múi giờ của bạn", + "route": "{from} đến {to}" + }, "mv_position": "{index} trên {total}", "copy": "Sao chép", "contact_added": "Đã thêm liên hệ", @@ -1264,7 +1327,6 @@ "switch_to_dutch": "Chuyển sang tiếng Hà Lan", "switch_to_portuguese": "Chuyển sang tiếng Bồ Đào Nha", "switch_to_russian": "Chuyển sang tiếng Nga", - "switch_to_vietnamese": "Chuyển sang tiếng Việt", "switching": "Thay đổi ngôn ngữ...", "switch": "Chuyển đổi ngôn ngữ", "current": "Ngôn ngữ hiện tại", @@ -1285,7 +1347,6 @@ "ru": "Tiếng Nga", "sk": "Tiếng Slovakia", "uk": "Tiếng Ukraina", - "vi": "Tiếng Việt", "zh": "Tiếng Trung (giản thể)", "fa": "Tiếng Ba Tư", "farsi": "Tiếng Ba Tư", @@ -4952,7 +5013,6 @@ "any_size": "Mọi kích thước", "larger_than_mb": "Lớn hơn {size} MB", "custom_size": "Kích thước tùy chỉnh", - "done": "Xong", "name_or_address": "Tên hoặc địa chỉ" }, "welcome": { @@ -5965,5 +6025,36 @@ "easy_read": "Dễ đọc", "sign_language": "Ngôn ngữ ký hiệu", "new_tab": "Mở trong một tab mới" + }, + "structured_mail_calendar": { + "add_to_calendar": "Thêm vào lịch", + "update_in_calendar": "Cập nhật trong lịch", + "remove_from_calendar": "Xóa khỏi lịch", + "in_calendar": "Có trong lịch của bạn", + "view_in_calendar": "Xem trong lịch", + "select_calendar": "Chọn lịch", + "added": "Đã thêm vào lịch của bạn", + "updated": "Đã cập nhật lịch", + "removed": "Đã xóa khỏi lịch của bạn", + "action_failed": "Không thể thay đổi lịch của bạn. Hãy thử lại.", + "blocked": "Một plugin đã chặn thay đổi lịch này.", + "title": { + "rental_car": "Xe thuê", + "rental_car_company": "Xe thuê: {company}" + }, + "description": { + "reference": "Mã đặt chỗ: {reference}", + "passengers": "Hành khách: {names}", + "seats": "Chỗ ngồi: {seats}", + "checkin": "Làm thủ tục: {url}", + "manage": "Quản lý đặt chỗ: {url}", + "ticket": "Vé: {url}", + "phone": "Điện thoại: {phone}", + "car": "Xe: {car}", + "tickets": "Vé: {numbers}", + "party_size": "Số người: {count}", + "added_from": "Được thêm từ một thư của {domain}", + "added_from_subject": "Được thêm từ thư “{subject}” của {domain}" + } } }