Skip to content

Comments

feat(i18n): add missing translations and fix Semi Design locale mapping#2958

Open
0-don wants to merge 1 commit intoQuantumNous:mainfrom
0-don:feat/i18n-missing-translations
Open

feat(i18n): add missing translations and fix Semi Design locale mapping#2958
0-don wants to merge 1 commit intoQuantumNous:mainfrom
0-don:feat/i18n-missing-translations

Conversation

@0-don
Copy link
Contributor

@0-don 0-don commented Feb 16, 2026

Summary

  • Add 425 missing translation keys across all non-English languages (zh-TW, fr, ru, ja, vi) covering disk cache settings, OAuth providers, performance monitoring, preferences, and pluralization forms
  • Fix SemiLocaleWrapper to map all supported languages to their Semi Design locale counterparts (zh-TW, fr, ru, ja, vi) — previously only zh and en were mapped, causing UI components like pagination to display Chinese labels ("每页条数") for non-Chinese/English users

Changes

Language Missing Keys Added Categories
zh-TW 27 Plurals, cache, recharge
fr 98 Disk cache, OAuth, preferences, performance monitor
ru 98 Disk cache, OAuth, preferences, performance monitor
ja 103 Disk cache, OAuth, preferences, performance monitor, Gemini
vi 99 Disk cache, OAuth, preferences, performance monitor

Test plan

  • Verify Semi Design components (pagination, tables) show localized labels in all languages
  • Verify new translation keys render correctly in disk cache settings, OAuth config, and performance monitor pages
  • Verify zh-TW plural forms work correctly in model/token/log count displays

Summary by CodeRabbit

  • Localization
    • Expanded translations for French, Russian, Vietnamese, Japanese, and Traditional Chinese with many new UI strings and plural variants across billing/quota, authentication/OAuth flows, caching/monitoring, notifications, channels, and model/configuration text.
    • Minor removals: three obsolete English translation entries were removed.
  • Chores
    • Added support for the new locales in the app and changed the default fallback to English (en_GB).

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 16, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds extensive translation entries to five locale JSON files (fr, ja, ru, vi, zh-TW), removes three entries from web/src/i18n/locales/en.json, and updates web/src/index.jsx to import/register these locales and change the default fallback to en_GB. No runtime logic or public API signatures changed.

Changes

Cohort / File(s) Summary
Localization additions
web/src/i18n/locales/fr.json, web/src/i18n/locales/ja.json, web/src/i18n/locales/ru.json, web/src/i18n/locales/vi.json, web/src/i18n/locales/zh-TW.json
Added large blocks of new translation keys and plural variants covering quota/billing, disk cache, performance/monitoring, OAuth/provider configuration, validation messages, UI labels, and other settings. Data-only locale expansions.
English locale removals
web/src/i18n/locales/en.json
Removed three translation keys: GC execution failed, Cache Directory, and Available. No other en.json edits.
Locale wiring
web/src/index.jsx
Imported multiple locale modules and expanded the SemiLocaleWrapper i18n mapping to include zh-CN, zh-TW, en, fr, ru, ja, vi; changed default fallback locale to en_GB.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • Calcium-Ion
  • seefs001

Poem

🐇 I hop through keys and strings today,
Français, 日本語, русский in bright array,
Tiếng Việt and 繁體 join the dance,
New labels sewn, each sentence given chance,
I twitch my whiskers — translations prance.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the two main changes: adding missing translations across multiple locales and fixing the Semi Design locale mapping for proper component localization.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Fix all issues with AI agents
Verify each finding against the current code and only fix it if needed.


In `@web/src/i18n/locales/fr.json`:
- Around line 2733-2831: The file contains a wrong value and non-Chinese keys:
replace the hash value for the key "设计版本" with the intended French label (so the
UI shows the localized label, not a hash), and remove or rename English keys
("Recharge Quota", "Cache Directory", "Available", "GC execution failed") back
to their original Chinese source-string keys mapping to the same French
translations; ensure the JSON uses only Chinese source strings as keys (e.g.,
restore the Chinese keys that correspond to those English entries) so lookups
follow the project convention.

In `@web/src/i18n/locales/ja.json`:
- Line 2718: Replace the newly added English keys in ja.json ("Recharge Quota",
"GC execution failed", "Cache Directory", "Available") with their Chinese
source-key equivalents from the zh locale (use the exact Chinese strings used in
web/src/i18n/locales/zh.json for those entries) and remove the English-key
duplicates so the Japanese file continues to use Chinese source keys for
lookups; update the corresponding translations as needed under the Chinese keys
to preserve the Japanese values.

In `@web/src/i18n/locales/ru.json`:
- Line 2747: Replace the newly added English i18n keys with the
Chinese-source-key equivalents from the zh locale to follow the project
convention: locate the entries with keys "Recharge Quota", "GC execution
failed", "Cache Directory", and "Available" (also the duplicate English keys
around lines referenced in the comment) in the ru.json diff and swap each
English key for the corresponding Chinese source string used in
web/src/i18n/locales/zh.json, then remove the English-duplicated keys so lookups
use the Chinese-source-key convention consistently.

In `@web/src/i18n/locales/vi.json`:
- Around line 3343-3348: Remove the duplicate English-keyed translation entries
"GC execution failed", "Cache Directory", and "Available" from the vi.json file;
keep the Chinese-keyed entries "GC 执行失败", "缓存目录", and "可用" as the single
source-of-truth, and ensure the resulting JSON remains valid (no trailing
commas) after deleting those three keys.

In `@web/src/i18n/locales/zh-TW.json`:
- Around line 2791-2818: The zh-TW locale contains English keys (e.g., "Recharge
Quota", "Cache Directory", "Available", "GC execution failed") which breaks the
Chinese-source-key convention; update the locale so keys remain the original
Chinese source strings used by the app (replace the English keys with their
Chinese source keys or re-run the i18n extraction tool), keeping the existing
Traditional Chinese translations as values; verify entries like "Recharge Quota"
-> use the Chinese source key for that string, and likewise for "Cache
Directory", "Available", "GC execution failed" and any other non-Chinese keys in
the zh-TW JSON.
🧹 Nitpick comments (1)
🤖 Fix all nitpicks with AI agents
Verify each finding against the current code and only fix it if needed.


In `@web/src/i18n/locales/vi.json`:
- Around line 3343-3348: Remove the duplicate English-keyed translation entries
"GC execution failed", "Cache Directory", and "Available" from the vi.json file;
keep the Chinese-keyed entries "GC 执行失败", "缓存目录", and "可用" as the single
source-of-truth, and ensure the resulting JSON remains valid (no trailing
commas) after deleting those three keys.
web/src/i18n/locales/vi.json (1)

3343-3348: Remove duplicate English-keyed translations that violate project i18n convention.

Lines 3346–3348 contain English-keyed variants (GC execution failed, Cache Directory, Available) mapping to identical Vietnamese translations as their Chinese-keyed counterparts on lines 3343–3345. These English keys are not referenced anywhere in the codebase and contradict the project convention of using Chinese source strings as keys. Remove the English-keyed entries to maintain consistency and reduce duplication.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@web/src/i18n/locales/vi.json` around lines 3343 - 3348, Remove the duplicate
English-keyed translation entries "GC execution failed", "Cache Directory", and
"Available" from the vi.json file; keep the Chinese-keyed entries "GC 执行失败",
"缓存目录", and "可用" as the single source-of-truth, and ensure the resulting JSON
remains valid (no trailing commas) after deleting those three keys.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@web/src/i18n/locales/vi.json`:
- Line 3341: Update the Vietnamese translation value for the JSON key "重置失败":
replace the incorrect copy-pasted value ("Đặt lại thống kê") with the correct
translation "Đặt lại thất bại" so the entry reads "重置失败": "Đặt lại thất bại".
- Around line 3294-3297: Update the untranslated English `_other` plural forms
to Vietnamese so counts ≠ 1 render correctly: replace `(筛选后显示 {{count}}
条)_other` with the Vietnamese equivalent of "(Hiển thị {{count}} mục sau khi lọ
lọc)" matching the `(筛选后显示 {{count}} 条)_one` style, replace `共 {{count}}
个模型_other` with the plural Vietnamese for "{{count}} mô hình", replace `共
{{count}} 条日志_other` with the plural Vietnamese for "{{count}} bản ghi nhật ký",
and replace `已删除 {{count}} 个令牌!_other` with the plural Vietnamese for "Đã xóa
{{count}} token!" so each `_other` key mirrors its `_one` counterpart in
Vietnamese.

---

Duplicate comments:
In `@web/src/i18n/locales/fr.json`:
- Line 2733: The JSON value for the key "设计版本" is still the placeholder hash
"b80c3466cb6feafeb3990c7820e10e50"; replace that value with the correct French
translation (e.g., "Version de conception" or the approved localization) in
fr.json, ensuring the file remains flat JSON with the Chinese source string
"设计版本" as the key and the French string as the value.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@web/src/i18n/locales/vi.json`:
- Line 3293: Replace the garbage hex value for the i18n key "设计版本" with proper
translations in the affected locale JSONs (en.json, vi.json, ru.json, ja.json,
fr.json); use the zh-TW entry "設計版本" as the source meaning ("Design Version")
and provide the correct localized strings (English: "Design Version",
Vietnamese: "Phiên bản thiết kế", Russian: "Версия дизайна", Japanese:
"設計バージョン", French: "Version de conception") for the key "设计版本" in each
respective file so the UI shows readable translations instead of the hex digest.

Add missing translation keys for all non-English languages:
- zh-TW: 27 keys (plurals, cache, recharge)
- fr: 98 keys (disk cache, OAuth, preferences, performance monitor)
- ru: 98 keys (disk cache, OAuth, preferences, performance monitor)
- ja: 103 keys (disk cache, OAuth, preferences, performance monitor)
- vi: 99 keys (disk cache, OAuth, preferences, performance monitor)

Fix SemiLocaleWrapper to map all supported languages (zh-TW, fr, ru,
ja, vi) to their Semi Design locale counterparts instead of only
zh/en, which caused UI components like pagination to show Chinese
labels for non-Chinese/English users.

fix(i18n): remove duplicate English-keyed translations

Remove English keys (Recharge Quota, GC execution failed, Cache Directory,
Available) that duplicate existing Chinese source keys, violating the
project's Chinese-source-key convention for i18n lookups.

fix(i18n): translate Vietnamese _other plural forms from English

The _other plural variants for filtering, models, logs, and token
deletion were left as English strings, causing English fallback text
for count > 1 in Vietnamese locale.

fix(i18n): remove duplicate English keys from en.json

Remove English-keyed duplicates (GC execution failed, Cache Directory,
Available) that duplicate existing Chinese-keyed entries in en.json.
@0-don 0-don force-pushed the feat/i18n-missing-translations branch from c65a0ba to f392110 Compare February 18, 2026 23:13
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@web/src/i18n/locales/vi.json`:
- Line 3293: The "设计版本" translation value is incorrectly a hex digest instead of
a Vietnamese string — replace the value "b80c3466cb6feafeb3990c7820e10e50" for
the key "设计版本" in vi.json with the correct Vietnamese translation (e.g., a
human-readable phrase like "Phiên bản thiết kế") and ensure the same correction
is applied for the same key in en.json, ru.json, ja.json, and fr.json if they
still contain the digest; search for the exact digest string to find all
occurrences and update each file so the UI shows proper translated text instead
of the hash.

@0-don 0-don force-pushed the feat/i18n-missing-translations branch 2 times, most recently from 1e45c9b to f392110 Compare February 20, 2026 17:54
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