Repository navigation
fix(copy): rewrite the strings the Rust side shows in a written register - #37
Merged
Merged
Conversation
#36 rewrote the .tsx copy as statements without first or second person, but part of what users read never passes through a .tsx file: command errors shown as toasts, the menu bar menu, tool-call notifications, the uninstall log in Settings and the update window. Those strings still used the spoken tone #36 removed ("连不上控制面 …。core 可能还没起来, 或者已经挂了。", "设置存不下来", "ThinkWatch ○ 没在跑", "可以把应用拖进 废纸篓了。"), so one screen could mix both registers. They now follow the same rules: 无法/未能/尚未 instead of 连不上/没/ …不了, 此 instead of 这个/这一份, 开机启动 as the Settings page names it, and 已是最新版本 as the update section already says. A few changes go beyond word choice: - The dev-build autostart error explained that registering would write target/debug into the plist. The doc comments already say that; the toast now only says dev builds do not support autostart. - Restarting a core that is not running showed the supervisor's Debug output ("core 现在是 Restarting { attempt: 2, in_ms: 4000 },…"). It now says whether core is still starting or not running. - The dev-only "twcore not found" message had nine spaces before its last line, left by a lost line continuation. - Uninstall log lines join client and result with 「:」, as #36 does on the clients page, instead of an em dash. - The control-plane connection error loses its closing 「。」. Commands format errors with {:#}, which appends ": <os error>" after it. Left as they are: tracing lines, errors that only reach a log (the heartbeat timeout, report_wedged), the --measure-memory output, and the strategy names core sends. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Why
#36 rewrote the
.tsxcopy and left the stringssrc-tauriproduces for a separate pass. Those strings reach the same screens: command errors shown as toasts, the connection screen, the uninstall log in Settings, the update window, tool-call notifications and the menu bar menu. They still read like someone talking: 「连不上控制面 …。core 可能还没起来,或者已经挂了。」, 「设置存不下来」, 「ThinkWatch ○ 没在跑」, 「可以把应用拖进废纸篓了。」.What changes
The same rules as #36: statements, no first or second person, 无法 / 未能 / 尚未 instead of 连不上 / 没 / …不了, 此 instead of 这个 / 这一份, and no internal mechanics. Terms match what the frontend already shows: 开机启动 (the Settings section title), 已是最新版本 (the update section), 取消开机启动 (the uninstall steps after #36).
cargo build -p twcore。 → 未找到 twcore。已查找以下位置及 PATH:… 可通过 THINKWATCH_CORE_BIN 指定绝对路径,或在 core 仓库中执行cargo build -p twcore。Four changes go beyond word choice:
target/debug) is already in the doc comments ofautostart_enabledandautostart::allowed_in_this_build.Debugoutput, e.g. 「core 现在是 Restarting { attempt: 2, in_ms: 4000 },没在跑,不用重启」. It now says whether core is still starting or not running.pre-wrap, so they showed.{:#}, which appends: <os error>to the context, so it rendered as 「…或者已经挂了。: Connection refused (os error 61)」.Checked and left as they are, since they already read as written copy: 已还原, 数据目录已删除, 下载失败 / 安装失败, 开发构建不执行自动更新 (the update window says the same), 已更新到 {version}, 软件更新, 运行中, 额度 已用 N%, 今日 $N, 撤销上一次配置修改, 打开主界面, 退出 ThinkWatch Lite…, and 已重置 in the menu bar icon.
Not in this PR.
tracinglines and errors that only reach the log (the heartbeat timeout inControlClient::ping,Supervisor::report_wedged); the--measure-memoryoutput, which is a developer measurement printed to stderr; and text core sends, which passes through unchanged (strategy names, thewhyandexcerptof a flagged tool call, and error bodies from the control plane).copy.test.tsonly scans.tsx, so nothing mechanical guards these strings yet.Verification
pnpm typecheck,pnpm test(78),cargo fmt --check,cargo clippy --all-targets -D warnings,cargo test(76).Update.tsxprefixes check errors with 「检查更新失败:」, the uninstall log renders as a list under 「卸载完成」, and the core-missing text sits under 「未找到 core 程序」 on the connection screen. No frontend code matches on any of the changed strings.tauri devwould drive the real gateway, and the isolated preview mocks IPC, so the Rust side does not run there.🤖 Generated with Claude Code