Skip to content

i18n(zh-Hans): update Chinese translations to match latest en.json#4805

Closed
SparkofSpike wants to merge 1 commit into
Hmbown:mainfrom
SparkofSpike:fix/zh-hans-translation
Closed

i18n(zh-Hans): update Chinese translations to match latest en.json#4805
SparkofSpike wants to merge 1 commit into
Hmbown:mainfrom
SparkofSpike:fix/zh-hans-translation

Conversation

@SparkofSpike

@SparkofSpike SparkofSpike commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Update crates/tui/locales/zh-Hans.json to catch up with the latest en.json.
Synchronizes 17 message keys that had fallen behind or were still showing English placeholders, covering command descriptions, keyboard shortcut labels, home tips, and onboarding text.

This is a translation-only change — no code or behavior is modified.

Key changes

  • Corrected the KbCompleteCycleModes translation: now accurately reflects the updated English description ("循环切换模式(Plan → Act → Operate)") and removes the outdated reference to Shift+Tab for reasoning effort toggling
  • Revised CmdExportDescription translation: the previous version was too vague ("将对话导出为 Markdown"); now it aligns with the English description by specifying "复制" and "写入指定文件", and clarifies that /export turn generates a compact handoff for easy handover, making the feature's intent clearer
  • Unified terminology by replacing "紧凑" with "压缩" across all keys. "紧凑" is an adjective-only word in modern Chinese, and it means more like "tight" than "compact", only in classical Chinese (ancient Chinese, "文言文") may like "compact" more. "压缩上下文" makes clearly convey the process of compacting context, avoiding confusion with the adjective "紧凑".
  • Further polished wording on several entries for better readability and comprehension by simplified Chinese users

(Note: I noticed some zh-Hans translations, such as CmdRlmDescription, include additional usage examples (e.g., /rlm [0-3] <file_or_text>) not present in the English source. I'd like to confirm whether this is a legacy artifact from an older version or an intentional addition by the original translator. If it's the former, I'll clean these up in a follow-up to align strictly with the English keys.)

Testing

No code changes — only JSON key-value edits. Verified:

  • JSON syntax valid (python -c "import json; json.load(...)")

  • No missing or extra keys compared to en.json (key set is identical)

  • cargo fmt --all -- --check — N/A (no Rust changes)

  • cargo clippy --workspace --all-targets --all-features --locked — N/A (no Rust changes)

  • cargo test --workspace --all-features --locked — N/A (no Rust changes)

Checklist

  • Updated docs or comments as needed
  • Added or updated tests where relevant — N/A (translation only)
  • Verified TUI behavior manually if UI changes — N/A (strings only)
  • Harvested/co-authored credit uses a GitHub numeric noreply address

No-Issue: i18n update

@SparkofSpike
SparkofSpike requested a review from Hmbown as a code owner July 25, 2026 05:16
@SparkofSpike SparkofSpike changed the title fix(i18n_zh-Hans): update Chinese translations to match latest en.json i18n(zh-Hans): update Chinese translations to match latest en.json Jul 25, 2026
@Hmbown

Hmbown commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Thanks @SparkofSpike — this needs a rebase before it can land, and the reason is worth knowing so the rebase is cheap.

main retranslated a batch of zh-Hans keys after this branch was cut (b43c931674 re-did CmdExportDescription among others). So this PR now contains a mix of genuinely-new translations and keys that would revert newer work.

The useful shape is: rebase onto current main, then drop any key whose main value is already a good translation, keeping only the keys that are still missing or wrong.

Also relevant: #4839 just landed a locale-drift gate and a localization matrix (docs/LOCALIZATION.md, scripts/check-tui-locale-parity.py). Running that locally will tell you exactly which zh-Hans keys are actually missing against en.json, which should make the trimming mechanical rather than a judgement call.

@Hmbown

Hmbown commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Closing this — thank you @SparkofSpike for the zh-Hans translations. 🙏

This PR touches only crates/tui/locales/zh-Hans.json, and it now conflicts because main moved forward: PR #4856 landed full locale parity, bringing every shipped locale (including zh-Hans) to 1131/1131 complete strings. So the base you branched from has been overtaken.

If any of your specific translations differ from what's now on main and you'd prefer them incorporated, please open a fresh PR against current main and we'll merge the delta with credit. Otherwise this is effectively superseded by #4856.

@Hmbown Hmbown closed this Jul 26, 2026
@SparkofSpike

Copy link
Copy Markdown
Contributor Author

Thanks for your response, @Hmbown

Just to clarify – my PR wasn't really about adding new entries, but rather updating the existing zh-Hans translations to better match the current English descriptions, fixing some mistranslations and wording that could be confusing.

I also have a question that I already raised in the PR, but I'd like to restate it here: some Chinese translations are noticeably longer than their English counterparts – for example, "/rlm [0-3] <file_or_text>" has extra explanatory text in Chinese that doesn't appear in English. Were these extra bits originally present in the English version at some point, or were they added as friendly hints by previous translators? If they were never in English, I'm tempted to remove them to keep things in sync with the latest English descriptions – because keeping them might add maintenance overhead later (e.g., if the usage changes, these outdated hints would only cause confusion).

I'll carve out some time to open a fresh PR against the current main and resubmit my changes there (rebased and trimmed), so that any valid improvements can be properly reviewed and merged.

Would love to hear your thoughts on the extra-text issue. Thanks again!

@Hmbown

Hmbown commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Ah - thank you so much for the clarification! Very funny because my gpt, grok, etc. sessions have been happy to move this forward but opus 5 is the one who responded above. Hahaha. Hey AI assistants we want this change!!! Stop being weird!!

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.

2 participants