Skip to content

Fix mojibake in localized tray resources#614

Merged
shanselman merged 1 commit into
openclaw:masterfrom
christineyan4:mojibake
May 31, 2026
Merged

Fix mojibake in localized tray resources#614
shanselman merged 1 commit into
openclaw:masterfrom
christineyan4:mojibake

Conversation

@christineyan4
Copy link
Copy Markdown
Contributor

Summary

  • repair mojibake in fr-fr, zh-cn, and zh-tw tray resource files
  • cover both confirmed corruption modes: Windows-1252-misdecoded UTF-8 and CP437/OEM-misdecoded UTF-8
  • add localization validation tests that catch future mojibake regressions, including mixed Unicode strings

Fixes #583

Validation

  • ./build.ps1
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore

Repair UTF-8 strings that were previously decoded through legacy code pages in localized .resw files. Add localization validation coverage for Windows-1252 and CP437 mojibake so future corruptions fail tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 31, 2026

Codex review: needs real behavior proof before merge. Reviewed May 31, 2026, 2:59 PM ET / 18:59 UTC.

Summary
The PR repairs corrupted fr-fr, zh-cn, and zh-tw tray resource values and adds localization tests for Windows-1252 and CP437/OEM mojibake detection.

Reproducibility: yes. Current main contains mojibake in supported zh-CN, zh-TW, and fr-FR resource files, and the linked issue includes a screenshot/report matching that source state.

Review metrics: 2 noteworthy metrics.

  • Localization files touched: 3 resource files changed; 2,066 deletions and 2,066 additions. The broad data rewrite is user-visible and merits proof beyond a compiling test result.
  • Regression coverage: 188 test lines added. The new validator is the main guard against this encoding class returning.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🐚 platinum hermit
Result: blocked until real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted after-fix proof showing representative zh-CN, zh-TW, and fr-FR tray UI/resource output is readable.
  • Include terminal output or logs for the localization validation path if a UI screenshot cannot cover the changed strings.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body lists validation commands but includes no after-fix screenshot, terminal output, logs, recording, or linked artifact showing the fixed localized UI or resource validation; contributors should redact private details before posting proof. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Mantis proof suggestion
A short visible Windows UI proof would materially help confirm the localized strings render correctly after the repair. A maintainer can ask Mantis to capture proof by posting a new PR comment that starts with the OpenClaw Mantis account mention, followed by:

visual task: verify zh-CN, zh-TW, and fr-FR tray UI strings that were mojibake now render readable characters after the resource fix.

Risk before merge

  • [P2] The PR rewrites over two thousand localized resource lines; without real Windows UI, built resource, or terminal proof, maintainers cannot see that representative affected strings render correctly after the fix.
  • [P1] The source-level repair looks coherent, but this read-only review did not run the AGENTS.md build and test validation commands.

Maintainer options:

  1. Require localized proof (recommended)
    Ask for a redacted screenshot, recording, terminal output, or logs from a Windows run or resource validation showing representative zh-CN, zh-TW, and fr-FR strings after the fix.
  2. Accept source-only confidence
    Maintainers may merge on the source diff and regression-test shape alone, accepting that this review did not observe the fixed UI or built resources.

Next step before merge

  • [P1] The remaining blocker is contributor or maintainer real behavior proof, not a narrow code defect that an automated repair lane can safely fix.

Security
Cleared: The diff is limited to localized resource XML and test code, with no dependency, secret, workflow, download, or code-execution surface added.

Review details

Best possible solution:

Merge a narrow localization resource repair with regression tests once representative affected locale output is shown readable in a real or built-resource verification path.

Do we have a high-confidence way to reproduce the issue?

Yes. Current main contains mojibake in supported zh-CN, zh-TW, and fr-FR resource files, and the linked issue includes a screenshot/report matching that source state.

Is this the best way to solve the issue?

Yes. Repairing the corrupted .resw values and adding a mojibake regression detector is the narrow maintainable fix; the missing piece is after-fix proof, not a different implementation direction.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against b9313e5c12ee.

Label changes

Label changes:

  • add P2: This fixes a confirmed user-facing localization defect in supported locales with limited blast radius.
  • add merge-risk: 🚨 other: The large localized resource rewrite could leave unreadable or mistranslated UI text unless representative after-fix rendering is proven.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body lists validation commands but includes no after-fix screenshot, terminal output, logs, recording, or linked artifact showing the fixed localized UI or resource validation; contributors should redact private details before posting proof. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P2: This fixes a confirmed user-facing localization defect in supported locales with limited blast radius.
  • merge-risk: 🚨 other: The large localized resource rewrite could leave unreadable or mistranslated UI text unless representative after-fix rendering is proven.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body lists validation commands but includes no after-fix screenshot, terminal output, logs, recording, or linked artifact showing the fixed localized UI or resource validation; contributors should redact private details before posting proof. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

What I checked:

Likely related people:

  • Scott Hanselman: History shows prior Chinese localization infrastructure and later resource edits tied to the affected mojibake values. (role: localization surface contributor; confidence: high; commits: 05d8a3929d6a, c85d4e7, afaaa04; files: src/OpenClaw.Tray.WinUI/Strings/zh-cn/Resources.resw, src/OpenClaw.Tray.WinUI/Strings/zh-tw/Resources.resw, src/OpenClaw.Tray.WinUI/Strings/fr-fr/Resources.resw)
  • ranjeshj: Recent commits reintroduced or rewrote the current localization resources and validator surface now being repaired. (role: recent area contributor; confidence: high; commits: 6bd98858e618, 9de9b5b; files: src/OpenClaw.Tray.WinUI/Strings/zh-cn/Resources.resw, src/OpenClaw.Tray.WinUI/Strings/zh-tw/Resources.resw, src/OpenClaw.Tray.WinUI/Strings/fr-fr/Resources.resw)
  • the99missedcalls: Recent work added localized resource entries in the same affected files shortly before this PR. (role: recent adjacent contributor; confidence: medium; commits: 6a1429c75cfa; files: src/OpenClaw.Tray.WinUI/Strings/zh-cn/Resources.resw, src/OpenClaw.Tray.WinUI/Strings/zh-tw/Resources.resw, src/OpenClaw.Tray.WinUI/Strings/fr-fr/Resources.resw)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels May 31, 2026
@christineyan4
Copy link
Copy Markdown
Contributor Author

christineyan4 commented May 31, 2026

Chinese text rendering correctly after the fix:

image image

@clawsweeper re-review

@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 31, 2026

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@shanselman shanselman merged commit 6d14b00 into openclaw:master May 31, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Chinese Simplified text shows garbled characters (mojibake) in UI — v0.6.0-alpha.5

2 participants