← Back to Pull requests

A Chinese (zh-CN) board UI, with no new dependencies #36

Closed
unknown closed this pull request without merging on Nov 06, 2026 09:38 UTC
View on GitHub
unknown unknown commented on Nov 05, 2026 18:35 UTC
Author

Implements #34: the board reads Chinese when the browser asks for it, with no new dependencies and nothing extra for anyone else.

How it works

  • src/zh-cn.js is a dictionary keyed by the English string (9.5 KB, 173 entries). It's served at /i18n/zh-cn.js and fetched by app.js only when the chosen language isn't English: English users download nothing and run no extra code.

  • The language comes from localStorage (kanzo.lang, like kanzo.filters), defaulting to navigator.language; it's set under Settings → Board. A missing key falls back to the English original, so a string renamed upstream degrades gracefully instead of breaking.

  • Static index.html text, title, aria-label and placeholder are translated by a walker that runs once, before the board's dynamic parts render, so task content is never touched. Dynamic strings (toasts, confirms, busy labels, relative times) go through a small tr() helper that fills {0}, {1}… slots so word order can move around.

  • Column titles show translated status names; the stored status values, the MCP API, MCP replies and CLI output stay English. The status dropdown in the task panel keeps English values too, to match what agents see — happy to translate it if you'd rather.
  • Verification

  • cargo fmt --check, cargo clippy --all-targets --locked -- -D warnings and cargo test --locked pass on Windows (47 tests; two are cfg(unix)) and macOS (49).

  • Tried in Edge in light and dark mode (31 assertions): English default fetches no dictionary and shows no Chinese; switching to Chinese in Settings translates everything, remembers the choice across reloads, and switching back to English restores it fully; status moves and drag & drop still store todo/doing/review/done.
  • We use Kanzo daily and will keep the dictionary current as strings change.

  • cargo fmt --check, cargo clippy --all-targets -- -D warnings and cargo test pass

  • A board change was tried in a browser, in light and dark mode

  • The README says what changed for users
  • Diff: 256 lines (+192 / -64) across 3 files Reviewer: emanuele-em Review duration: 903m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 256 lines diff across 3 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.332
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #36"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.1% (MEDIUM) · Higher = larger blast radius
    39.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.4% · Safe to merge
    15.4%