Repository navigation
Commit 5ea211c
fix(app-showcase): translate the zh-CN first screens the bundle left in English (#25535)
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuACdPWFJTLDcTrByFCHLzqb)_
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.com/claude-code)
https://claude.ai/code/session_016g7nYP9wdNx1GDa5XDr7Uy
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent d7ccdfc commit 5ea211c
3 files changed
Lines changed: 255 additions & 14 deletions
File tree
- examples/app-showcase
- src/system/translations
- test
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
375 | 383 | | |
376 | 384 | | |
377 | 385 | | |
378 | 386 | | |
379 | | - | |
380 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
381 | 395 | | |
382 | 396 | | |
| 397 | + | |
383 | 398 | | |
384 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
385 | 407 | | |
386 | 408 | | |
387 | 409 | | |
| |||
503 | 525 | | |
504 | 526 | | |
505 | 527 | | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
506 | 540 | | |
507 | 541 | | |
508 | 542 | | |
| |||
579 | 613 | | |
580 | 614 | | |
581 | 615 | | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
582 | 622 | | |
583 | 623 | | |
584 | 624 | | |
585 | 625 | | |
586 | 626 | | |
587 | 627 | | |
588 | 628 | | |
589 | | - | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
590 | 633 | | |
591 | 634 | | |
592 | 635 | | |
| |||
700 | 743 | | |
701 | 744 | | |
702 | 745 | | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
703 | 771 | | |
704 | | - | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
705 | 775 | | |
706 | 776 | | |
707 | 777 | | |
| |||
751 | 821 | | |
752 | 822 | | |
753 | 823 | | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
758 | 829 | | |
759 | 830 | | |
760 | 831 | | |
| |||
769 | 840 | | |
770 | 841 | | |
771 | 842 | | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
772 | 847 | | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
773 | 861 | | |
774 | 862 | | |
775 | 863 | | |
| |||
781 | 869 | | |
782 | 870 | | |
783 | 871 | | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
784 | 897 | | |
785 | 898 | | |
786 | 899 | | |
| |||
945 | 1058 | | |
946 | 1059 | | |
947 | 1060 | | |
948 | | - | |
949 | | - | |
950 | | - | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
951 | 1064 | | |
952 | 1065 | | |
953 | 1066 | | |
| |||
1050 | 1163 | | |
1051 | 1164 | | |
1052 | 1165 | | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
1053 | 1185 | | |
1054 | 1186 | | |
1055 | 1187 | | |
| |||
1071 | 1203 | | |
1072 | 1204 | | |
1073 | 1205 | | |
1074 | | - | |
1075 | | - | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
1076 | 1212 | | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
1077 | 1218 | | |
1078 | 1219 | | |
1079 | 1220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
317 | 417 | | |
318 | 418 | | |
319 | 419 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments