Skip to content

Commit abe95a9

Browse files
fix(app-showcase): label the invoice pre-tax roll-up Subtotal / 小计, not Total / 合计 (#36563)
<!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9XS45uS4YmpkyKDUwCT41Tq)_ Fixes #36314 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:示例应用里发票的记录页和编辑表单上,税前金额的标签从「Total / 合计」改为「Subtotal / 小计」,不再和旁边的「Total incl. Tax / 含税总额」看着像两个总额。 - 为什么做:发票页面体验问题——替看发票的人分清哪个是税前、哪个是含税。 - 出错会怎样:只动示例应用里一个字段的显示文字,最坏是标签措辞不合适,可直接撤回。 - 要你做什么:无。 ## What changes - `examples/app-showcase/src/system/translations/index.ts`: `showcase_invoice.fields.total.label` reads `Subtotal` (en, was `Total`) and `小计` (zh-CN, was `合计`). The object metadata already labels the field `Subtotal` (`examples/app-showcase/src/data/objects/invoice.object.ts`), and the line-grid summary stack calls the same figure Subtotal; only the bundle disagreed. - The bundle ships exactly two locales, `en` and `zh-CN` — no other locale key exists anywhere under `examples/app-showcase` (grep for `ja-JP` / `es-ES`: zero hits), so "every shipped language" is these two. - The comment above `showcase_expense_report` that said 「合计 is showcase_invoice's `total`」 moves with the label: 合计 is now the report's own total, and the invoice's pre-tax `total` reads 小计 beside its 含税总额. - Not changed: the field name, any other field's label, the expense report's own 合计 (`total_amount`), the source metadata. - No test, QA checklist item or fixture pinned the old label: a grep over `examples/`, `packages/qa/`, `docs/qa/` and every `*.test.ts` for the old invoice label finds nothing to update (the `records-forms` checklist item already calls this field "the Subtotal (`total`)"). **Read first** (risk order): the two label lines in `examples/app-showcase/src/system/translations/index.ts` (en block, zh-CN block); the rewritten comment above `showcase_expense_report` in the same file. **Two-minute check:** boot the showcase, open invoice INV-1010 — the record page and the edit form read `Subtotal €230.00` beside `Total incl. Tax €276.00`; switch to zh-CN and they read 小计 beside 含税总额. ## Tests Text-only change in a private example; no behaviour moved, so no new pin and no ablation. Run on the final head `60d6b511` (after merging `origin/main`): <details><summary>showcase typecheck + tests (under the shared verify lock)</summary> - `pnpm --filter @objectstack/example-showcase typecheck` — clean (tsc --noEmit, no output). - `pnpm --filter @objectstack/example-showcase test` — `Test Files 49 passed (49)`, `Tests 554 passed (554)`. - Lock verdict: `os-verify-lock: VERDICT command-exit 0` (closure build + typecheck + test in one locked run). </details> ## Acceptance notes - No changeset, `skip-changeset`: the only path touched is `examples/app-showcase` (`@objectstack/example-showcase`, a private package) — nothing any released package ships moves. - Screenshot of INV-1010: NOT MEASURED. `pnpm dev` refuses to boot in this worktree until the whole workspace is built (its prerequisite check names 35 of 108 packages without a `dist/`, most under `ui/`); a full workspace build for a screenshot was outside this card's budget, and no full dogfood run was made for it. ## Verification <details><summary>Derived gate families — 37/37 exit 0 on 60d6b51</summary> `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 37 commands for this diff; each was run on head `60d6b511` and every one exited 0. Reconciliation: `dispatch-gates --ran: 37 derived famil(ies) accounted for — 37 run, 0 NOT-MEASURED`. Families CI runs beyond that list (the required contexts, `test:repo`, dogfood shards) are CI's. `node scripts/pm/overlap-check.mjs --repo=objectstack-ai/objectstack --branch=HEAD`: `VERDICT clean exit 0` (merges cleanly onto origin/main, 0 open PR heads overlap). </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01ADHkmNmMEXS4EzeVz9RjvD Co-authored-by: Claude <noreply@anthropic.com>
1 parent 3b58921 commit abe95a9

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • examples/app-showcase/src/system/translations

‎examples/app-showcase/src/system/translations/index.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export const ShowcaseTranslationBundle = {
231231
issued_on: { label: 'Issued On' },
232232
tax_rate: { label: 'Tax Rate (%)' },
233233
paid_on: { label: 'Paid On' },
234-
total: { label: 'Total' },
234+
total: { label: 'Subtotal' },
235235
// Translated at birth (the multi-currency fields, ADR-0144):
236236
// check-i18n-coverage ratchets this example at its untranslated count.
237237
currency_code: { label: 'Currency' },
@@ -760,7 +760,7 @@ export const ShowcaseTranslationBundle = {
760760
issued_on: { label: '开具日期' },
761761
tax_rate: { label: '税率 (%)' },
762762
paid_on: { label: '付款日期' },
763-
total: { label: '合计' },
763+
total: { label: '小计' },
764764
currency_code: { label: '币种' },
765765
invoice_date: { label: '发票日期' },
766766
amount: { label: '含税总额' },
@@ -791,7 +791,8 @@ export const ShowcaseTranslationBundle = {
791791
// 报销单), so its object label, description, every column and every
792792
// status option are translated here — the sidebar's word and the list's
793793
// header now agree. 草稿 / 已提交 / 已批准 follow the 已… shape this
794-
// bundle uses for a reached state; 合计 is showcase_invoice's `total`.
794+
// bundle uses for a reached state. 合计 is this report's own total; the
795+
// invoice's pre-tax `total` reads 小计 (Subtotal) beside its 含税总额.
795796
showcase_expense_report: {
796797
label: '报销单',
797798
pluralLabel: '报销单',

0 commit comments

Comments
 (0)