Skip to content

i18n(vi): translate combos page explanation + Round Robin label to Vietnamese - #51

Merged
caothu159 merged 2 commits into
mainfrom
task/i18n-combos-vi-clean
Jul 23, 2026
Merged

caothu159 merged 2 commits into
mainfrom
task/i18n-combos-vi-clean

Conversation

@caothu159

Copy link
Copy Markdown

Mục đích

Bổ sung bản dịch tiếng Việt cho phần giải thích trong page Combos + label "Round Robin" trong ConnectionsCard + STRATEGY_OPTIONS modal. Khi user chọn locale vi, runtime i18n tự thay thế qua JSON literal map.

Thay đổi (2 commits, 2 files)

File + -
public/i18n/literals/vi.json +10 -2 (chuẩn hóa 'Round Robin' → 'Luân phiên' + 8 keys mới)
docs/CUSTOM-FEATURES-MERGE-CHECKLIST.md +71 -0 (thêm §20)

Cơ chế

  • Runtime i18n (src/i18n/runtime.js) đọc exact-match key từ public/i18n/literals/{locale}.json.
  • Text node khớp key → thay thế; không khớp → giữ nguyên tiếng Anh.

Keys thêm/sửa (rev 2)

Key Value
Round Robin Luân phiên (sửa từ "Vòng tròn" sai nghĩa đen)
Round Robin — rotates models across requests to spread load Luân phiên — xoay vòng model giữa các request để phân tải
Round Robin — rotate Luân phiên — xoay vòng
Fallback — try in order Fallback — thử theo thứ tự
Fusion — panel + judge Fusion — panel + judge
Group models under one name, then pick a strategy per combo: Gom các model dưới một tên, rồi chọn chiến lược cho mỗi combo:
Fallback — tries models in order (next on failure) Fallback — thử các model theo thứ tự (model tiếp theo khi lỗi)
Fusion — queries all models in parallel... Fusion — truy vấn tất cả model song song...
Capacity auto-switch — sends image/PDF/audio requests to a model that supports them first Capacity auto-switch — gửi request hình ảnh/PDF/audio đến model hỗ trợ trước

Không ảnh hưởng

  • Không sửa base file — runtime i18n xử lý, zero merge conflict với upstream rebase.
  • Không ảnh hưởng RTK/proxy/fallback (mức ưu tiên cao nhất theo §5).

Verify

  • python3 -m json.tool public/i18n/literals/vi.json: JSON hợp lệ, 201 keys, không trùng.
  • node scripts/diepxuan/check-custom-features.mjs: 360 PASS / 0 WARN / 0 FAIL.
  • Key match exact với base file (kể cả em-dash —).
  • 9/9 keys match exact với text trong src/app/(dashboard)/dashboard/combos/page.js + providers/components/ConnectionsCard.js.

Smoke test

  1. Mở Dashboard, chuyển locale sang "Tiếng Việt 🇻🇳".
  2. Combos page → phần mô tả "Gom các model..." + 4 bullet (Fallback/Luân phiên/Fusion/Capacity auto-switch).
  3. Modal Create/Edit Combo → dropdown strategy: Fallback — thử theo thứ tự, Luân phiên — xoay vòng, Fusion — panel + judge.
  4. Providers → Connections → "Luân phiên" trong routing strategy.
  5. Locale "English 🇺🇸" → text gốc.

Liên quan

Add 5 keys to public/i18n/literals/vi.json:
- Group models under one name...
- Fallback, Round Robin, Fusion, Capacity auto-switch descriptions

Mechanism: runtime i18n (src/i18n/runtime.js) reads vi.json as exact-match
translation map; locale=vi users see translated text, locale=en falls back
to upstream English.

No base file touched (combos/page.js stays untouched); zero merge conflict
risk on upstream rebase.

Verify:
- python3 -m json.tool vi.json: valid JSON
- node scripts/diepxuan/check-custom-features.mjs: 360 PASS / 0 WARN / 0 FAIL
- 5/5 keys match base file text exactly (incl. em-dash)

Docs: docs/CUSTOM-FEATURES-MERGE-CHECKLIST.md §20.
Sếp yêu cầu trực tiếp: 'Round Robin' không dịch thành 'Vòng tròn'
(nghĩa đen, không đúng kỹ thuật). Bản dịch đúng trong ngữ cảnh
load balancing / scheduling là 'Luân phiên' (round-robin scheduling).

Changes:
- public/i18n/literals/vi.json:
  * key 'Round Robin': 'Vòng tròn' -> 'Luân phiên' (fix chuẩn kỹ thuật)
  * long-form key value: dùng 'Luân phiên — xoay vòng model...' thay vì lặp
    'Round Robin — luân phiên model...'
  * +3 keys mới cho STRATEGY_OPTIONS modal:
    - 'Round Robin — rotate' -> 'Luân phiên — xoay vòng'
    - 'Fallback — try in order' -> 'Fallback — thử theo thứ tự'
    - 'Fusion — panel + judge' -> 'Fusion — panel + judge'
- docs/CUSTOM-FEATURES-MERGE-CHECKLIST.md §20: rev 2, bảng quyết định dịch,
  smoke test mở rộng (modal strategy dropdown + ConnectionsCard).

Verify:
- python3 -m json.tool: JSON hợp lệ
- 201 keys, không trùng lặp
- node scripts/diepxuan/check-custom-features.mjs: 360 PASS / 0 WARN / 0 FAIL
- 'Round Robin' key giờ áp dụng cho 2 chỗ (combos bullet + ConnectionsCard)
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@caothu159
caothu159 merged commit 9221ba4 into main Jul 23, 2026
@caothu159
caothu159 deleted the task/i18n-combos-vi-clean branch July 23, 2026 16:27
caothu159 added a commit that referenced this pull request Jul 23, 2026
- Record i18n(vi) Combos PR #51 + fork sync PR #46 merged into main.
- Note Round Robin translation fix: 'Vòng tròn' -> 'Luân phiên' (chuẩn kỹ thuật).
- vi.json: 196 -> 201 keys, runtime i18n only, no base file touched.

Refs: AGENTS.md §1 (boot sequence + MEMORY.md reading).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant