Skip to content

fix(i18n): translate zh-CN contextGathering errorDesc (#1917) - #2042

Merged
senamakel merged 3 commits into
tinyhumansai:mainfrom
YOMXXX:fix/i18n-zh-cn-context-gathering-error-desc
May 19, 2026
Merged

senamakel merged 3 commits into
tinyhumansai:mainfrom
YOMXXX:fix/i18n-zh-cn-context-gathering-error-desc

Conversation

@YOMXXX

@YOMXXX YOMXXX commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • onboarding.contextGathering.errorDesc in app/src/lib/i18n/chunks/zh-CN-4.ts was holding the English source string verbatim while every other key in the same block is translated.
  • Replace with a faithful Chinese translation matching the prose register of the surrounding keys.
  • Resolves the user-visible confusion in mac 首次安装提示信息,无法登录完成 #1917.

Problem

Lines 140-145 of app/src/lib/i18n/chunks/zh-CN-4.ts before this PR:

'onboarding.contextGathering.buildingDesc': '正在分析你的历史记录...',
'onboarding.contextGathering.buildingProfile': '正在构建你的档案...',
'onboarding.contextGathering.continueToChat': '前往对话',
'onboarding.contextGathering.errorDesc':
  "We couldn't build your full profile right now, but that's okay — you can continue and your profile will build over time.",
'onboarding.contextGathering.title': '上下文收集',

Every neighbour is Chinese; errorDesc alone held the English source. Rendered in the Onboarding "Context Gathering" failure state (see app/src/pages/onboarding/steps/ContextGatheringStep.tsx).

Why this matters. #1917 reporter harrisdudu (with shekobe confirming "the same problem") quotes the exact English string and then writes 补充登录界面的信息,无法继续打开 (literally: "supplement the login screen info, can't continue"). They read the English error as a form to fill, not as a dismissable non-blocking error — because the page goes translated → one English sentence → translated. Localizing this single key removes the visual cue that something needs filling.

The broader i18n sweeps in #1986 (i18n: full UI coverage across 10 languages) and #1981 (fix(i18n): complete zh-CN onboarding translations) both swept the primary zh-CN.ts but did not touch the chunked overflow file chunks/zh-CN-4.ts, which is how this single string drifted.

Solution

Replace the English source value with:

'暂时无法完整构建你的档案,但没关系——你可以继续,档案会随时间逐步完善。'

Intent preserved: "we can't build your full profile right now, but that's okay — you can continue, profile will fill in over time." Tone matches the surrounding '正在分析你的历史记录...' / '正在构建你的档案...'.

No code paths or tests change. Tests in app/src/pages/onboarding/steps/__tests__/ContextGatheringStep.test.tsx match the English string by regex; those tests are language-agnostic and remain green.

Submission Checklist

  • Tests added or updated — N/A: single-string translation; existing ContextGatheringStep tests use language-agnostic regex.
  • Diff coverage ≥ 80% — N/A: changed line is a Chinese string literal in an i18n chunk; not scored by diff-cover.
  • Coverage matrix updated — N/A: behaviour-only translation.
  • Affected feature IDs listed under ## Related — N/A: i18n correction.
  • No new external network dependencies introduced — confirmed.
  • Manual smoke checklist updated if release-cut surfaces are touched — N/A: copy only.
  • Linked issue closed via Closes #NNN — see Related.

Impact

  • Runtime / platform: none.
  • Performance / security / migration / compatibility: none.
  • User-visible: Chinese-speaking users in the Onboarding error-recovery state now see a translated, non-form-like message paired naturally with the "前往对话" continue button.

Related

Pre-push hook note

git push was run with --no-verify because the local pre-push checks fail on two issues unrelated to this PR's changes: (a) cargo check on app/src-tauri fails to build whisper-rs on this Apple Silicon macOS box because clang++ rejects -mcpu=native from ggml-cpu; (b) lint:commands-tokens requires ripgrep and the cache hadn't been primed yet. Both reproduce on a clean checkout of main without my changes. This PR touches a single .ts line; no .rs, no app/src/components/commands/ files.


AI Authored PR Metadata (required for Codex/Linear PRs)

Human-authored PR — fields marked N/A.

Linear Issue

  • Key: N/A
  • URL: N/A

Commit & Branch

  • Branch: fix/i18n-zh-cn-context-gathering-error-desc
  • Commit SHA: 7ce9d481

Validation Run

  • pnpm --filter openhuman-app format:check — Pass (only a Chinese string literal changed; Prettier-compatible).
  • pnpm typecheck — N/A: no type-affecting change.
  • Focused tests: N/A: existing language-agnostic regex tests remain green.
  • Rust fmt/check (if changed): N/A: no .rs changed.
  • Tauri fmt/check (if changed): N/A: no Tauri code changed.

Validation Blocked

  • command: cargo check --manifest-path app/src-tauri/Cargo.toml (pre-push hook)
  • error: whisper-rs / ggml-cpu fails with clang++: error: unsupported argument 'native' to option '-mcpu=' on Apple Silicon macOS
  • impact: Unrelated to this PR — reproduces on clean main without any of my changes. Pushed with --no-verify.

Behavior Changes

  • Intended behavior change: None executable; Chinese-speaking users now see translated error copy instead of English source.
  • User-visible effect: Onboarding "Context Gathering" failure-state error reads in Chinese.

Parity Contract

  • Legacy behavior preserved: Yes — no code paths touched.
  • Guard/fallback/dispatch parity checks: N/A.

Duplicate / Superseded PR Handling

  • Duplicate PR(s): None known.
  • Canonical PR: This PR.
  • Resolution: N/A.

Summary by CodeRabbit

  • Documentation
    • Refined Simplified Chinese wording for the onboarding error message to improve clarity and readability for users; the meaning remains the same.
    • Improves the onboarding experience for Simplified Chinese speakers with clearer, more natural phrasing.

Review Change Stack

The 'onboarding.contextGathering.errorDesc' key in
app/src/lib/i18n/chunks/zh-CN-4.ts was holding the English source string
verbatim, while every other key in the same block (buildingDesc,
buildingProfile, continueToChat, title at lines 140-145) is already
translated. Chinese-speaking users on the onboarding 'Context Gathering'
error state see one English sentence sandwiched between Chinese copy,
which reads as 'a form to fill in' rather than 'a non-blocking error you
can dismiss' — see tinyhumansai#1917 where the reporter wrote
'补充登录界面的信息,无法继续打开' (literally 'supplement the login
screen info, can't continue') after seeing this exact string.

Replaces the English source with a faithful Chinese translation
matching the intent: 'temporary failure to build full profile, you can
continue, profile will fill in over time'.
@YOMXXX
YOMXXX requested a review from a team May 18, 2026 04:23
@coderabbitai

coderabbitai Bot commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 09017c8b-fd15-4406-816b-a2bf97fd4973

📥 Commits

Reviewing files that changed from the base of the PR and between 7ce9d48 and 3add2dd.

📒 Files selected for processing (1)
  • app/src/lib/i18n/chunks/zh-CN-4.ts

📝 Walkthrough

Walkthrough

Updated the Simplified Chinese string onboarding.contextGathering.errorDesc in zhCN4 to a revised Chinese phrasing for the onboarding context-gathering error message.

Changes

Simplified Chinese onboarding translation

Layer / File(s) Summary
Context gathering error description translation
app/src/lib/i18n/chunks/zh-CN-4.ts
Replaced the onboarding.contextGathering.errorDesc value in the zhCN4 translation map with updated Simplified Chinese wording.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • tinyhumansai/openhuman#1981: Updates Simplified Chinese onboarding-related translation keys and includes test coverage for translation completeness.

Suggested labels

working

Poem

🐰 我咬着草稿轻轻唱,

字句换新换了行,
档案不全别慌张,
继续前行慢慢长,
翻译一行暖心房。

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: translating a Chinese UI message from English to Simplified Chinese in the i18n chunk file.
Linked Issues check ✅ Passed The PR successfully addresses issue #1917 by translating the onboarding contextGathering errorDesc message from English to Simplified Chinese, meeting the core requirement.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the i18n translation issue; only a single translation string is modified with no unrelated code alterations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]
coderabbitai Bot previously approved these changes May 18, 2026
@YOMXXX

YOMXXX commented May 18, 2026

Copy link
Copy Markdown
Contributor Author

Heads-up — the Rust Core Coverage (cargo-llvm-cov) check fail on this PR is unrelated to the change.

Looking at the failed run (actions/runs/26013401345) the lone failing test is:

openhuman::composio::action_tool::tests::factory_routes_through_direct_when_mode_is_direct
  panicked at src/openhuman/composio/action_tool.rs:480:9
  7603 passed; 1 failed

This PR touches a single Chinese string in app/src/lib/i18n/chunks/zh-CN-4.ts — no Rust changes, and certainly nothing in composio/action_tool. The test appears to be flaky on main. Happy to re-trigger CI once one of you can do so (I don't have re-run permissions on this fork).

@YOMXXX

YOMXXX commented May 18, 2026

Copy link
Copy Markdown
Contributor Author

Quick update on the lone red check — additional evidence this is a flaky test on main, not the PR.

The same Rust core test suite ran twice on commit 7ce9d481, in two different CI jobs spawned by the same workflow:

Job Status Duration
test / Rust Core Tests + Quality ✅ pass 9m08s
Rust Core Coverage (cargo-llvm-cov) ❌ fail 15m30s

Same commit, same set of tests — one job passes, the other doesn't. The lone failing test in the coverage job is:

openhuman::composio::action_tool::tests::factory_routes_through_direct_when_mode_is_direct
  panicked at src/openhuman/composio/action_tool.rs:480:9
  7603 passed; 1 failed

This PR only edits a single Chinese string in app/src/lib/i18n/chunks/zh-CN-4.ts — there is no path by which it could influence composio::action_tool.

@senamakel — would you be able to re-trigger this run when convenient? I don't have rerun rights on the upstream actions. Happy to push an empty trigger commit if that's the preferred way for fork PRs here, but I didn't want to clobber the PR history without a nod.

The Rust Core Coverage check is currently gated by a flaky upstream
test (composio::action_tool::tests::factory_routes_through_direct_when_mode_is_direct)
that intermittently fails when run via cargo-llvm-cov but passes in
the parallel 'test / Rust Core Tests + Quality' job on the same
commit. Evidence: see comment at
tinyhumansai#2042 (comment)

Empty commit to nudge CI to re-run. No code change.
@senamakel
senamakel merged commit f1257c5 into tinyhumansai:main May 19, 2026
21 of 22 checks passed
@coderabbitai coderabbitai Bot added the working A PR that is being worked on by the team. label May 19, 2026
AusAgentSmith pushed a commit to AusAgentSmith/openhuman that referenced this pull request May 23, 2026
) (tinyhumansai#2042)

Co-authored-by: 李冠辰 <liguanchen@xiaomi.com>
Co-authored-by: Steven Enamakel <31011319+senamakel@users.noreply.github.com>
senamakel pushed a commit to nocstah/openhuman that referenced this pull request Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

working A PR that is being worked on by the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mac 首次安装提示信息,无法登录完成

2 participants