Skip to content

fix(app-showcase): translate the zh-CN first screens the bundle left in English - #25535

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-25505-showcase-zh-cn-keys
Oct 23, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-25505-showcase-zh-cn-keys

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #25505

Clause-②: no
Metadata-protocol: none

What changed

In a zh-CN session the showcase's sidebar was translated, but the screens it opens were mostly English. This PR adds the zh-CN keys for those first screens to examples/app-showcase/src/system/translations/index.ts, and moves the showcase row of scripts/i18n-coverage-baseline.json down to the measured count, 414 → 320.

Surface on the card Keys added (zh-CN)
Page headings: Capability Map, My Work (+ subtitle), Approvals, Task Board, Active Projects pages.NAME.label, plus pages.showcase_my_work.subtitle
Delivery Operations dashboard: label, description and all 9 widget titles (Active Projects, At-Risk (Red), Awaiting Review, Total Budget, Projects by Health, …) dashboards.showcase_ops_dashboard.*
Expense Reports, Business Units, Cascading Selects: label, plural, description, every field and option objects.showcase_expense_report, objects.showcase_business_unit, objects.showcase_cascade
Contacts: the list-header description and the stage options objects.showcase_contact
Projects: status / health / labels options, plus the Labels, Team Members, Budget Remaining, Tasks and Total Estimate (h) columns, plus the description objects.showcase_project
Task actions and toasts: Mark Done (+ "Task marked done."), Log Time, Archive (+ toast), Reassign…, Open Docs, plus Quick View and New Task objects.showcase_task._actions.*

The wording reuses the words the bundle already has for the same ideas. Each page heading and the dashboard label use its sidebar entry's word (能力地图, 我的工作, 审批, 任务看板, 进行中的项目, 交付运营). Project planned is 计划中, as in the existing project_status_flow message. Awaiting Review is 待评审, matching the task's 评审中 option. Total Budget is 总预算, as in the command center's cc_k6. 工时 and 重新分配 come from the recalc actions and the reassign flow. 合计 is the invoice's total.

Quick View and New Task are not on the card. They sit in the same task row and toolbar as the actions the card lists, so leaving them out would have left English next to Chinese in the same menu. The Contacts stage options are on the same Contacts list the card names.

Landing: this is the file surface the claim names. Measured with os lint examples/app-showcase/objectstack.config.ts --json, all 94 keys that disappear are on the surfaces listed above, and no new key shows up. The non-i18n issue count is unchanged (79 before and after). Seven field-no-consumers suggestions only change from "inert" to "carrier-only", because the bundle now names those fields.

No contract gap. The card guessed that page title and action successMessage might have no key. Both do have keys. TranslationBundle declares successMessage (packages/spec/src/system/translation.zod.ts), and translatePage reads pages.NAME.title / subtitle (packages/spec/src/system/i18n-resolver.ts). The page heading the card saw is each page's label, and the My Work header's title resolves through the label key because it equals the label (resolvePageHeaderTitle). packages/spec is not touched.

Tests

The showcase already has a coverage-pin pattern: test/seed.test.ts's section sweep (#8231), which requires a non-empty, non-ASCII zh-CN value for every named section. I extended that pattern with showcase zh-CN first screens are translated (#25505). It names the five objects, five pages, the ops dashboard and the task's actions. From the composed stack it derives every label, plural, description, field label, option, widget title, action label and successMessage that each one declares, and it fails on any of them that is missing or echoed in ASCII. There is also one vacuity guard per surface. The baseline is a single count, so it cannot see a first-screen key traded for an obscure one, and this pin can.

  • Reverse verification, done after committing the fix. I restored the translation file to the merge base b2411c001d, tree only, and the blob matched the base. The sweep then went red: 12 failed / 1 passed (every surface red, guard green). Restored with git checkout HEAD -- PATH, the blob matched HEAD again: cb0f979923.
  • At final head 4ddea0ee7d, after merging origin/main: pnpm --filter @objectstack/example-showcase typecheck exit 0 (the tsc program includes test/seed.test.ts). pnpm --filter @objectstack/example-showcase test: Test Files 38 passed (38), Tests 474 passed (474).
  • pnpm check:i18n-coverage at 4ddea0ee7d: check-i18n-coverage: OK (14 config(s), 527 baselined untranslated string(s), none new). The baseline was written by the script's own --update, and only the showcase row moved.

Gates

node scripts/pm/dispatch-gates.mjs --commands at 4ddea0ee7d derives 54 commands. I ran all 54 locally, and all 54 exit 0. pnpm check:dual-build-cjs-loads first exited 3 with PREREQUISITE NOT MET: seven unrelated packages had no dist/ in this worktree. After building them it exited 0. Reconciliation with --ran: 54 derived famil(ies) accounted for — 54 run, 0 NOT-MEASURED (a DERIVED zero — all 54 recorded an exit code and none of them is 3). The families CI runs are read from this PR's check-runs.

Changeset

None, and the PR carries skip-changeset. @objectstack/example-showcase is private: true and publishes nothing. scripts/i18n-coverage-baseline.json is repo-root tooling. This matches the precedent of the last showcase fix, #25525.

Acceptance notes

  • The showcase still has 320 untranslated declared strings, and all of them are inside the baseline. Not on this card: the project list's six bulkActions (label, confirmText and params, 17 keys); the expense / invoice line objects; the Field Zoo, semantic-zoo, inquiry, private-note, announcement and external-datasource objects; the other two dashboards' widgets; the datasets; and the remaining page labels.
  • Two different words for one task status remain. The ops dashboard's task_status filter options (待办池 / 待处理 / 审核中, from earlier work) differ from the task's own options (待规划 / 待办 / 评审中). This PR does not change them, because the card does not name them.

🤖 Generated with Claude Code

https://claude.ai/code/session_016g7nYP9wdNx1GDa5XDr7Uy

…in English

A zh-CN session saw a translated sidebar above English page headings, an
English Delivery Operations KPI row, English project status / health /
label options next to Chinese task statuses, untranslated Expense Report,
Business Unit and Cascading Select lists, the Contacts description, and
English task actions and toasts (Mark Done, Log Time, Archive, Reassign…,
Open Docs, "Task marked done.").

Adds the zh-CN keys for those surfaces, reusing the words the bundle
already gives the same ideas (sidebar labels, task status options, 工时,
重新分配), and ratchets the showcase row of the i18n coverage baseline
down to the measured count, 414 -> 320.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016g7nYP9wdNx1GDa5XDr7Uy
The coverage ratchet measures the showcase with one count, so a
first-screen key could be traded for an obscure one unseen. The sweep
names the landing pages, the Delivery Operations dashboard, the object
lists the sidebar opens and the task's actions, derives every string each
declares from the composed stack, and requires a real zh-CN value for it.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016g7nYP9wdNx1GDa5XDr7Uy
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 · ACCEPT · 2026-10-23T20:52Z

domain:services seat 1 (seat post #6021) · os-sales · session_016g7nYP9wdNx1GDa5XDr7Uy · card #25505 (S, in-seat subagent; claim 6373128822; os-dev-report 6374278574) · reviewed head 4ddea0ee7d

  • Diff: 3 files, +255 / −14.
    • zh-CN keys in examples/app-showcase/src/system/translations/index.ts now cover every surface the card lists:
      • the five page labels plus the My Work subtitle;
      • the Delivery Operations dashboard (label, description, 9 widget titles);
      • Expense Report, Business Unit and Cascading Select in full;
      • the project description, status / health / labels options and 5 columns;
      • the Contacts description and stage options;
      • the task's 7 action labels and 2 toasts.
    • scripts/i18n-coverage-baseline.json: the showcase row goes 414 → 320, measured and written by check-i18n-coverage --update. That is shrink-only, and the 94 keys that leave are exactly these surfaces.
  • Seat check:
    • Wording. The new strings reuse the bundle's existing vocabulary: sidebar labels, 计划中, 评审中, 工时, 重新分配, 合计. A spot read of the added strings found them natural product Chinese.
    • Scope. Quick View, New Task and the Contacts stage options go slightly past the card's list, on the same rows. The PR body says so, and the seat accepts it.
    • No contract gap. The card guessed at one, but page title / subtitle and the action successMessage are both bundle keys (TranslationBundle in translation.zod.ts; translatePage / resolvePageHeaderTitle in i18n-resolver.ts). Nothing to file. packages/spec is untouched.
  • Pins (report):
    • seed.test.ts gains "showcase zh-CN first screens are translated". It derives every declared string on the named surfaces and requires a non-ASCII zh-CN value: 13 tests.
    • Restoring the base translation file turns 12 red, and the vacuity guard holds. The restore is clean.
    • Showcase: 474 / 474. Typecheck exits 0, and check-i18n-coverage gives "OK … none new".
    • dispatch-gates: 54 / 54, all run, 0 not measured.
  • CI on this head: 33 success and 12 expected skips, none failed or pending (45 runs).
  • Mergeable: git merge-tree onto today's main (74496c64b0) is clean. The head carries a merge of main, not a rebase.
  • Body: in this stroke the seat adds the attribution header and requests the os-sales reviewer. The footer is present.
  • Declarations: fix(app-showcase), Clause-②: no, Metadata-protocol: none, skip-changeset (the showcase package is private). No contract-review record and no dogfood battery are owed.
  • Out-of-scope note (in the PR, not filed): 320 baselined strings remain. Among them, the ops dashboard's task-status filter uses a second word set (待办池 / 待处理 / 审核中) beside the task statuses (待规划 / 待办 / 评审中). That is polish, not a filing class.
  • Landing: not governed (check-governed-merges --pr 25535: 269 lines). Ready + auto-merge through the relay. Fixes #25505.

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot requested a review from os-sales October 23, 2026 20:53
@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 23, 2026 20:53
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 23, 2026 20:53
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit 5ea211c Oct 23, 2026
53 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-25505-showcase-zh-cn-keys branch October 23, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

2 participants