Repository navigation
i18n: the 31 tool names are translated (zh-hans, zh-hant) - #1514
Conversation
|
Follow-up for the other panel catalogs: the 31 rows this PR adds land in |
217ae3b to
91172d7
Compare
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Add Chinese tool translations crates/ui-egui/src/i18n/ui.rs |
Simplified and Traditional Chinese catalogs add translations for 31 toolbar tool names. The converted-source inventory includes state.rs. |
Use translated labels in the header crates/ui-egui/src/header.rs, crates/ui-egui/src/i18n/ui.rs |
Tool-slot tooltips and multi-tool fly-out rows display translated labels. A test checks translated display labels and English automation labels. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Feature
Possibly related issues
- Issue 1451 describes the same Chinese catalog translations and header display changes. This pull request does not add the Japanese catalog rows mentioned as a follow-up.
Suggested reviewers: aiongg
Merge Risk: 
Minimal · up to 1354a
-
The change is limited to Chinese toolbar-label localization, with no established merge-blocking risk.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 2 files.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Rebased on current |
The toolbar's tool labels come from Tool::label() through header.rs; they were the last English surface on the chrome. 31 rows, Simplified and Traditional, and the header asks the catalog.
91172d7 to
1354aa4
Compare
|
Same treatment as #1581 and #2427, since it was under the same rule and got no reply of its own: rebased onto Two things moved: 313 + 603 passed, clippy |
|
Merged, thank you @FeiLiuEM! It landed on |
The 31 tool names in
Tool::label()were the last English surface in a translated interface: they reach the screen in the toolbar tooltip (header.rs:71-75) and the flyout rows (:106), and neither asked the catalog (#1451). This is the Chinese half — the Japanese rows are @zitann2020's, who has them ready from AE's own flyouts.The catalog is keyed by the English source, so the rows land in the order the tests require: 31 rows in
SIMPLIFIED_CHINESEand the same 31 in the same order inTRADITIONAL_CHINESE(catalogs_are_unique_and_keep_the_english_shapewants every Japanese key to exist in the Chinese one, and the two Chinese catalogs to be equal — the shape #1178 had, where the Chinese Settings rows landed before the Japanese).Where the wordings come from, and which six to correct if your UI disagrees:
Selection Toolis 选择工具 / 選取工具,Pen Tool钢笔工具 / 筆型工具, and the shape, hand, zoom, eraser and type tools come from the same source.向后平移工具(Pan Behind),蒙版羽化工具,添加顶点工具/转换顶点工具,画笔工具/仿制图章工具/橡皮擦工具,Roto 笔刷工具,调整边缘工具,对象遮罩工具, and人偶位置控点工具/人偶扑粉控点工具/人偶重叠控点工具.删除顶点工具follows its添加顶点工具/转换顶点工具, and人偶弯曲控点工具/人偶高级控点工具follow its three named puppet tools plus its 弯曲控点 / 高级控点 sections. Those six strings are the ones to change; nothing else depends on them.Traditional Chinese follows this catalog's own conventions (遮色片, 攝影機, 頂點, 筆刷, 選取, 添加) rather than a second source — Adobe ships no zh_TW After Effects, which is also why its /tw/ guide carries none of these names.
CONVERTEDgainsstate.rs(the sources live there and are drawn byheader.rs, the case the comment above that list describes), andheader.rs's tooltip and flyout row ask the catalog.app.auto's labels andTool::from_namestay English, soui.set {"tool": …}and thetool.*dispatch are untouched.Two tests:
every_tool_name_is_translatedwalksTool::ALLin zh-hans and zh-hant (removing one row fails it withzh-hans: Selection Tool has no row), andthe_toolbar_asks_the_catalog_for_the_tool_namespins that both drawn sites ask the catalog while the automation label keeps the English name (reverting the tooltip fails it).Verified on Linux:
cargo fmt --all --check,cargo test -p effectcraft-ui-egui— every suite passes,cargo clippy -p effectcraft-ui-egui --all-targets -- -D warnings.Shares
i18n/ui.rswith #1424 (which adds anEffectsrow to the same catalogs) and with the tool-name rows the Japanese PR will add — happy to rebase, whichever lands first.Summary by CodeRabbit