Repository navigation
fix(i18n): drop machine-translated 的 from short Simplified Chinese labels - #52288
Conversation
[Low impact] This PR appears safe to merge. SummaryImproves short Chinese labels and Settings search words in the desktop and mobile catalogs.
Reviews (2) · Last reviewed commit: "fix(i18n): drop machine-translated 的 fro..." · Reviewed by Greptile |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…bels
Machine translation rendered many one-word English labels as Chinese
adjective-的 forms (红色的, 最近的, 失败的) and picked the wrong sense
for a few: the glab CLI read 光亮的 ("shiny"), a Raw notebook cell read
生的 ("uncooked"), a Fresh automation session read 新鲜的, Urgent read
紧迫的, and No priority read 无优先权 (a legal right of priority).
Use the plain label (红色, 全局, 失败, 最近) or the right sense (紧急,
无优先级, 优先级, glab, 原始, 全新, 本地). Settings search keywords keep
the words main already matched (过时, 声音, 私人) so search recall does
not regress.
67 desktop and 6 phone values; keys and other locales are unchanged.
Refs stablyai#32207
Co-authored-by: Neil <[email protected]>
4b8d639 to
53ed703
Compare
ELI5
Machine translation turned many one-word English labels in the Simplified Chinese UI into "adjective + 的" forms, so they read like "the red one" or "the global one" instead of plain labels. A few also got the wrong meaning: the glab CLI showed as 光亮的 ("shiny"), a Raw notebook cell as 生的 ("uncooked"), a Fresh automation session as 新鲜的 (fresh as in food), and Linear's Urgent priority as 紧迫的. This PR replaces them with the plain word a Chinese user expects. Nothing else changes.
What Changed
Catalog values only: 67 in
src/renderer/src/i18n/locales/zh.jsonand 6 inmobile/src/i18n/locales/zh.json. No code, no keys, no other locale.Before / after (examples):
Settings search keywords (never shown; Settings search matches when a keyword contains what the user typed): the trailing 的 is dropped, wrong senses are fixed (光亮的 → glab, 冷冻的 → 卡死, 专注的 → 聚焦, 快的 → 快捷, 当地的 → 本地), and keywords that main matched by substring keep matching: 过时 (Codex accounts, whose status message says 已过时), 声音 (microphone and camera permissions) and 私人 (browser search engines, whose Kagi text says 私人会话链接).
Five values that match the 的 pattern are correct Chinese and are left alone: 我的, 我创建的, 好的, and 已更改的 mid-sentence.
Why
Linked Issue
Refs #32207 (zh localization quality; this is a partial fix covering Simplified Chinese short labels, and zh-Hant has the same pattern for a follow-up).
Visual Proof
N/A. Every change is a catalog string value (short labels and search keywords) with no layout or behavior change; the tables above list the English, old and new value for each area.
Testing
Reproduced on main with a probe that flattens both zh catalogs and matches values against
^[一-鿿]{1,3}的$, values containing 优先权, and the known wrong-sense words: 68 desktop + 8 mobile hits on main, and only the five correct values above on this branch.Key sets and key order are unchanged in both catalogs; no changed value contains a placeholder or tag.
repairTranslatedValue(config/scripts/locale-catalog) leaves every new value unchanged, so a future repair pass will not revert them.Simulated Settings search substring matching for the Codex accounts entry: 过时, 到期, 已到期 match on both main and this branch.
Passing:
pnpm verify:localization-catalogs,pnpm verify:localization-protected-copy,pnpm verify:mobile-localization(7526 call sites, 7005 English entries),oxfmt --checkandast-grep scanon both catalogs.Platforms: catalog data only, so platform-independent.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
No new tests: the change is catalog values only, and the existing localization catalog verifiers cover structure and coverage.
Performance
None, because this only changes 73 catalog string values; no runtime code runs differently. The desktop zh catalog shrinks from 1,599,100 to 1,598,913 bytes, and
JSON.parsetime is unchanged within noise (2.72 ms vs 2.91 ms over 50 runs).Risk
Level: Low
Review
Reviewed for wording against each key's English source, call site, zh-Hant value and neighbouring zh terms, and for search-recall regressions (two rounds of fixes applied: 过时, 声音, 私人).
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Original fix by @x-Ai in #52288.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)