Repository navigation
fix(i18n): fill missing zh translations and align agent terminology policy - #17049
Dazzle-sys wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (12)
🚧 Files skipped from review as they are similar to previous changes (11)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughChinese agent-related translations and repair rules now use Merge Risk: ⚪ Minimal · up to 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)
✅ Passed checks (4 passed)
Full details: Description checkExplanation 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 Full details: Docstring CoverageExplanation 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.)
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. Comment |
- 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.
c69950e to
38c7c8d
Compare
|
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 SummaryThe PR substantially expands and corrects the Simplified Chinese catalog while aligning localization repair policies on 智能体 as the canonical translation of “agent.”
Confidence Score: 5/5The 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.
|
| 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
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−):
automations, sidebar, dashboard map, browser SSH routing, etc.) and 313
untranslated entries
spacing (76), ellipsis style (63, follows the en literal), and curly quotes (6)
following the fix(i18n): standardize Simplified Chinese product terminology #15464 glossary; commands and paths keep Latin
and use Artifact for a single shared entity
reserved for proxy/user-agent semantics
en.json + compare-summary.tsx (2 lines):
commit{{value1}}plural-suffix hack withCommits ahead of {{value2}}: {{value0}}so every locale can translate allplaceholders (per the i18n policy on positional placeholders)
Policy files (9 files, 42+/40−):
/智能体/g → 代理phrase fix; point the remainingagent-phrase fixes at 智能体
at 智能体; proxy copy keeps 代理
Agentbrand entries (智能体 is canonical, 代理 is adifferent word — neither is a mistranslation to revert)
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— passpnpm run verify:localization-catalog— pass (zh 13,621/13,633; the 12remaining keys are policy-preserved English: brand names, URLs, code paths)
pnpm run verify:localization-coverage— pass (same 12 allowlisted)pnpm run verify:localization-extraction— passvitest run config/scripts src/renderer/src/i18n— 31 files / 208 tests pass,including the reviewed terminology assertions
oxlinton all changed files — cleanwith a clean checkout too (missing Python for node-gyp, path separators, zsh
lane) — verified by stashing this change and re-running
pnpm buildnot run locally (same native toolchain gap); CI covers itAI 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
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
literal in compare-summary.tsx
Notes
No impact on security, cross-platform support, SSH, mobile, backwards
compatibility, or performance.