Repository navigation
fix(i18n): translate hardcoded Chinese panel tooltips - #50
Merged
Merged
Conversation
The knowledge-base / creative-space collapse buttons in ProcessPanel passed
literal Chinese strings as their `title`, so English mode still showed
"折叠知识库" / "展开知识库" and "折叠笔记" / "展开笔记". The same audit found
three more user-facing strings bypassing i18n:
- ProcessPanel stop button ("停止生成")
- MindMapPage layout toggle and export tooltips
- NoteEditor's loading fallback ("加载中...")
Move all of them to locale keys (ui, notebook, chat, common) with values for
both zh-CN and en-US. Tooltips are the only visible change; the collapse
buttons now also say "creative space" to match the panel title.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In English mode, the knowledge-base / creative-space collapse buttons in
ProcessPanelstill showed Chinese, because theirtitlewas a literalstring:
展开知识库/折叠知识库展开笔记/折叠笔记An audit for the same defect found three more user-facing strings that bypass
i18n entirely:
ProcessPanel— stop button tooltip停止生成MindMapPage— layout toggle切换为垂直布局/切换为横向布局, export导出为图片NoteEditor— loading fallback加载中...Fix
Move every one of them behind locale keys, added for both
zh-CNanden-US:ui.json—collapseKnowledgeBase,expandKnowledgeBase,collapseCreativeSpace,expandCreativeSpacenotebook.json—switchToVerticalLayout,switchToHorizontalLayout,exportAsImagechat.json—stopGenerating(was only present in en-US)common.json—loading(reused, already present in both)The right-hand toggle now says "creative space" instead of "notes" so the
tooltip matches the panel title (
notebook:creativeSpace).Verification
npm run typecheck(node / web / test) — passnpm run lint— passnpm run check:design— passnpm test— 20 passsrc/renderer/src/components: nouser-facing
title/placeholder/aria-label/ text node remains(only the intentional language label
简体中文)Not verified: switched the app to English in a running window; the change only
replaces literals with keys whose values exist in both locale files.