Skip to content

fix(i18n): fill missing zh translations and align agent terminology policy - #17049

Closed
Dazzle-sys wants to merge 2 commits into
stablyai:mainfrom
Dazzle-sys:fix/zh-localization-gaps-and-terminology
Closed

Dazzle-sys wants to merge 2 commits into
stablyai:mainfrom
Dazzle-sys:fix/zh-localization-gaps-and-terminology

Conversation

@Dazzle-sys

Copy link
Copy Markdown

PR 描述草稿(分支 fix/zh-localization-gaps-and-terminology)

ELI5

Orca's Simplified Chinese UI had 1,890 strings that showed up in English (or raw
machine translation) because the zh catalog lagged behind the code. This fills
those gaps, fixes terminology errors, and removes the maintenance trap where the
build-time repair policy kept rewriting the canonical 智能体 (agent) back to 代理
(proxy). After this, zh.json covers 13,621 of 13,633 keys (99.9%) — the highest
of any locale — and a repair run no longer undoes translator work.

What Changed

zh.json (content, 2,511+/417−):

  • Translate 1,565 missing keys (skills, settings, workspace cleanup, Artifacts,
    automations, sidebar, dashboard map, browser SSH routing, etc.) and 313
    untranslated entries
  • Fix terminology errors (e.g. WSL Distribution was 分布 → 发行版), CJK-Latin
    spacing (76), ellipsis style (63, follows the en literal), and curly quotes (6)
  • Unify review → 评审 / hosted review → 托管评审 and prose worktree → 工作树
    following the fix(i18n): standardize Simplified Chinese product terminology #15464 glossary; commands and paths keep Latin
  • Keep the feature name Artifacts in English (matches Orca Relay / Orca Cloud)
    and use Artifact for a single shared entity
  • Follow the catalog-wide 智能体 rendering for agent (500+ entries); 代理 stays
    reserved for proxy/user-agent semantics

en.json + compare-summary.tsx (2 lines):

  • Replace the commit{{value1}} plural-suffix hack with
    Commits ahead of {{value2}}: {{value0}} so every locale can translate all
    placeholders (per the i18n policy on positional placeholders)

Policy files (9 files, 42+/40−):

  • Drop the Add Simplified Chinese, Korean, and Japanese UI localization #5046-era /智能体/g → 代理 phrase fix; point the remaining
    agent-phrase fixes at 智能体
  • Point 13 zh value overrides, 4 zh key overrides, and the agent search keywords
    at 智能体; proxy copy keeps 代理
  • Remove the inert zh Agent brand entries (智能体 is canonical, 代理 is a
    different word — neither is a mistranslation to revert)
  • Pin the reviewed tests to the canonical rendering so a repair run can never
    undo it again

Why

The zh catalog predates several feature waves, so Chinese users saw English for
entire surfaces (skills management, workspace cleanup, Artifacts, SSH browser
routing). Separately, the repair policy still carried the #5046-era assumption
that 智能体 is a machine-translation error, which conflicts with both the
catalog (500+ entries) and the maintainer direction in #8923
("智能体 … are the right calls"). This lands the zh side of that standardization
ahead of #15464, scoped to the same override architecture — no new locale, no
dependency, no verifier rewrite.

Linked Issue

Refs #9574 (zh mistranslation tracking), #8923 and #15464 (terminology
standardization this change aligns with). No closed issue.

Visual Proof

N/A — locale copy and repair policy only, no layout or interaction change.

Testing

  • pnpm typecheck — pass
  • pnpm run verify:localization-catalog — pass (zh 13,621/13,633; the 12
    remaining keys are policy-preserved English: brand names, URLs, code paths)
  • pnpm run verify:localization-coverage — pass (same 12 allowlisted)
  • pnpm run verify:localization-extraction — pass
  • vitest run config/scripts src/renderer/src/i18n — 31 files / 208 tests pass,
    including the reviewed terminology assertions
  • oxlint on all changed files — clean
  • Full-suite note: 6 unrelated build/native tests fail on this Windows machine
    with a clean checkout too (missing Python for node-gyp, path separators, zsh
    lane) — verified by stashing this change and re-running
  • pnpm build not run locally (same native toolchain gap); CI covers it

AI Disclosure

Claude (claude-sonnet-4-5, via the pi coding agent) was used to audit the
catalog against the repair policy, produce the translations, apply the policy
edits, and run the validation suite. Terminology decisions follow the #15464
glossary and maintainer direction in #8923.

Review

  • Code review summary: policy-vs-catalog alignment was verified by importing
    the policy modules and asserting ja/ko/es tables are untouched; repair rerun
    drift for 智能体 → 代理 is zero (was 662 values); regression tests now guard
    the canonical rendering
  • Security: no code paths changed — string catalogs, policy tables, one string
    literal in compare-summary.tsx
  • Cross-platform / SSH / mobile: no behavior change; copy only
  • Performance: repair policy is no slower (one fewer phrase fix)

Notes

No impact on security, cross-platform support, SSH, mobile, backwards
compatibility, or performance.

@coderabbitai

coderabbitai Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1c0c046b-ec0f-4f1f-aaa1-b10eb3fa4697

📥 Commits

Reviewing files that changed from the base of the PR and between fd9125e and 38c7c8d.

📒 Files selected for processing (12)
  • config/scripts/locale-brand-mistranslations.mjs
  • config/scripts/locale-key-overrides.mjs
  • config/scripts/locale-macos-tcc-key-overrides.mjs
  • config/scripts/locale-phrase-fixes.mjs
  • config/scripts/locale-search-keyword-overrides.mjs
  • config/scripts/locale-translation-policy.test.mjs
  • config/scripts/locale-translation-policy.zh-round5.test.mjs
  • config/scripts/locale-value-overrides.mjs
  • config/scripts/locale-zh-value-overrides.mjs
  • src/renderer/src/components/right-sidebar/source-control/sync/compare-summary.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/zh.json
🚧 Files skipped from review as they are similar to previous changes (11)
  • config/scripts/locale-macos-tcc-key-overrides.mjs
  • src/renderer/src/i18n/locales/en.json
  • config/scripts/locale-key-overrides.mjs
  • config/scripts/locale-translation-policy.zh-round5.test.mjs
  • config/scripts/locale-phrase-fixes.mjs
  • config/scripts/locale-search-keyword-overrides.mjs
  • config/scripts/locale-value-overrides.mjs
  • src/renderer/src/components/right-sidebar/source-control/sync/compare-summary.tsx
  • config/scripts/locale-translation-policy.test.mjs
  • config/scripts/locale-brand-mistranslations.mjs
  • config/scripts/locale-zh-value-overrides.mjs

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Chinese agent-related translations and repair rules now use 智能体 instead of 代理, while preserving 代理 for proxy and user-agent meanings. Tests now expect the canonical Chinese rendering. The commits-ahead tooltip changed to “Commits ahead of {{value2}}: {{value0}}” and no longer uses a pluralization parameter.

Merge Risk: ⚪ Minimal · up to 38c7c

This PR fills Simplified Chinese localization gaps and standardizes terminology without changing application behavior; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 10 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main changes: completing Simplified Chinese translations and standardizing agent terminology.
Description check ✅ Passed The description is detailed and covers the main template sections, including the change scope, rationale, linked issues, visual proof, testing, AI disclosure, review notes, and compatibility considera…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description is detailed and covers the main template sections, including the change scope, rationale, linked issues, visual proof, testing, AI disclosure, review notes, and compatibility considerations. It omits the Agent skill upstream boundary and Checklist sections, and it uses issue references instead of a Fixes #... entry, but the core information is complete.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 10 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI

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.

- Fill 1565 missing zh leaves and translate 313 untranslated ones;
  zh.json reaches 13621/13633 (99.9%) with only the 12 policy-preserved
  English keys left (brand names, URLs, code paths)
- Correct terminology errors: WSL Distribution was 分布 -> 发行版, etc.
- Normalize CJK-Latin spacing (76), ellipsis style (63, follows the en
  literal), and curly quotes (6, shell examples keep straight quotes)
- Unify review -> 评审, hosted review -> 托管评审, worktree -> 工作树 in
  prose (commands and paths keep Latin) per the #15464 glossary
- Keep the feature name Artifacts in English (matches Orca Relay/Cloud)
  and use Artifact for a single shared entity
- Follow the catalog-wide 智能体 rendering for agent (476+ entries);
  代理 stays reserved for proxy/user-agent semantics
- Replace the commit{{value1}} plural-suffix hack with a positional-free
  fallback so every locale can translate all placeholders (#15464 policy)
The #5046-era phrase fix rewrote 智能体 back to 代理 on every repair run,
while the catalog (and #8923/#15464, plus maintainer direction in
gh-#8923#issuecomment-5177175707) settled on 智能体 as the canonical zh
rendering of agent. Repair drift measured 662 values before this change.

- Drop the /智能体/g -> 代理 phrase fix; point the other agent-phrase
  fixes at 智能体 (客服人员/代理商/座席/发射代理)
- Point 13 zh value overrides and 4 zh key overrides at 智能体; keep
  代理 for proxy/user-agent copy (HTTP 代理, 用户代理, 反向代理)
- Switch zh search keywords agent/agents to 智能体
- Remove the inert zh Agent brand entries: 智能体 is canonical and 代理
  is a different word, so neither is a mistranslation to revert
- Pin the reviewed tests to the canonical rendering (智能体 survives a
  repair run) and keep the proxy-boundary assertions

verify-localization-catalog / -extraction / -coverage all pass; repair
rerun drift for 智能体 -> 代理 is now zero.
@Dazzle-sys
Dazzle-sys force-pushed the fix/zh-localization-gaps-and-terminology branch from c69950e to 38c7c8d Compare August 29, 2026 02:21
@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@greptile-apps

greptile-apps Bot commented Aug 29, 2026

Copy link
Copy Markdown

Greptile Summary

The PR substantially expands and corrects the Simplified Chinese catalog while aligning localization repair policies on 智能体 as the canonical translation of “agent.”

  • Adds or revises thousands of Chinese translations across application surfaces.
  • Updates Chinese terminology repair rules, overrides, search keywords, and regression tests.
  • Replaces the branch-comparison plural-suffix interpolation with a locale-friendly tooltip string.

Confidence Score: 5/5

The PR appears safe to merge because no concrete changed-code failure was identified.

The updated compare-summary interpolation matches every locale value currently defining the key, while the remaining changes consistently align Chinese catalog content and repair-policy expectations without establishing a reachable contract violation.

Important Files Changed

Filename Overview
src/renderer/src/i18n/locales/zh.json Expands Chinese localization coverage and normalizes terminology, punctuation, spacing, and retained technical literals; no concrete catalog-contract defect was established.
config/scripts/locale-phrase-fixes.mjs Aligns Chinese agent-related phrase repairs with the canonical 智能体 terminology while retaining 代理 for proxy semantics.
config/scripts/locale-brand-mistranslations.mjs Removes Chinese Agent forms from brand-reversion rules so legitimate translated terminology is not reverted to English.
config/scripts/locale-value-overrides.mjs Updates Chinese value overrides to follow the revised agent terminology policy.
config/scripts/locale-key-overrides.mjs Updates targeted Chinese UI overrides from 代理 to 智能体.
src/renderer/src/components/right-sidebar/source-control/sync/compare-summary.tsx Replaces manual English plural-suffix interpolation with a fully translatable commits-ahead tooltip whose arguments match the updated catalogs.
src/renderer/src/i18n/locales/en.json Updates the canonical commits-ahead string to the new two-placeholder translation contract.
config/scripts/locale-translation-policy.test.mjs Revises regression expectations to enforce the canonical Chinese agent rendering.

Reviews (1): Last reviewed commit: "fix(i18n): align zh agent terminology po..." | Re-trigger Greptile

@Dazzle-sys Dazzle-sys closed this by deleting the head repository Sep 11, 2026
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