Skip to content

i18n(plugin-approvals): ship the approval objects, notifications, record page and e-mail link line in zh-Hant, ar, fr and pt-BR - #30790

Queued
objectstack-fleet[bot] wants to merge 2 commits into
mainfrom
claude/project-thread-1jep1s
Queued

objectstack-fleet[bot] wants to merge 2 commits into
mainfrom
claude/project-thread-1jep1s

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread

domain:server#1 · os-elon-musk · session_016WV4cya5ej5GQV86RPbRPK

Part of #30512 — package 9 of 11, first half (@objectstack/plugin-approvals in zh-Hant, ar, fr, pt-BR). The card stays open: the second half (ru, de, ko), settings and platform-objects follow, and the last PR of the series makes the bundle check read the platform locale table.

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么: 审批插件的 3 个对象(审批请求、审批动作、审批委派)的名称、字段、选项、帮助和动作,审批通知的 40 条句子,审批请求记录页的标题和「详情 / 时间线」两个标签,以及审批邮件里「打开审批」那一行,补上繁中、阿语、法语、巴葡 4 种。俄语、德语、韩语在下半包。
  • 为什么改: 平台语言表要求每个界面带齐 11 种语言;这是第 3 期按包补齐的第 9 个包的上半(每种语言 164 条对象文本 + 40 条消息)。用这 4 种语言的审批人和提交人看到的审批界面、通知和邮件不再是英文。
  • 风险与回滚: 只加翻译数据和注册行,不动逻辑、schema、接口;邮件模板的结构、选模板的规则和 EMAIL_TEMPLATE_FLOOR_LOCALE 都没动,只给「打开审批」那一行加了 4 种语言(按裁决 A)。原有 4 种语言一字未改。测试改动只是各语言测试把 4 种新语言加进列表(覆盖变宽,没有放宽任何断言)。回滚即撤 PR。
  • 先看: src/translations/index.ts(按表标签注册,zh-CN 在 zh-Hant 前,每种语言带页面标题和消息)、src/approval-email-templates.ts 的 APPROVAL_EMAIL_LINK_LINES、src/translations/messages.ts,再看 sys-approval-request-page.test.ts。
  • 两分钟验证: node scripts/check-i18n-bundles.mjs --filter=approvals 输出 plugins/plugin-approvals in sync;pnpm --filter @objectstack/plugin-approvals test 全绿。
  • 需要你做的: 无,席位落地。

What changes

  • Four new locales under the platform locale table's tags (zh-Hant, ar, fr, pt-BR): each a TAG.objects.generated.ts with all 164 object leaves of sys_approval_request, sys_approval_action and sys_approval_delegation, plus its TAG.source-hashes.generated.ts, written by the repo's own os i18n extract --fill=default --source-hashes and served through withSourceFallback like the existing three. zh-CN stays ahead of zh-Hant in index.ts.
  • The hand-written records gain an entry per new locale: messages.ts (the 40 approval notification sentences; approvalMessages widens to eight locales), pages.ts (the record page label sys_approval_request_detail, recorded against the same en digest the existing three carry), and the record page's inline Details / Timeline labels in sys-approval-request.page.ts.
  • approval-email-templates.ts: APPROVAL_EMAIL_LINK_LINES (the line that opens the request from its e-mail, {{approvalUrl}} kept byte-identical) gains the four locales. This follows the seat's ruling A, as recorded in the handover commit 7db48bdd: the link line is added per locale; the e-mail templates' shape, the template selection and EMAIL_TEMPLATE_FLOOR_LOCALE are unchanged.
  • The extract command in scripts/i18n-extract.config.ts lists the four tags and its merge baseline imports the four bundles with their page entries, so check:i18n covers them from this PR on.

Tests

  • sys-approval-request-page.test.ts pins the served locale set; it now lists the eight locales this PR serves, and every served locale is still held to carrying the authored page label.
  • approval-status-vocabulary.test.ts, approve-decision-question.test.ts, decision-question-i18n.test.ts, success-copy-names-request-i18n.test.ts and admin-copy-vocabulary.test.ts add the four new bundles to their locale lists. Coverage widens; no assertion changed.

Acceptance notes

Verification

Package suite, typecheck, build (verify lock)
turbo run build --filter=!@objectstack/docs: 118/118 tasks successful, exit 0
pnpm --filter @objectstack/plugin-approvals test && typecheck   (at head 63d63a1b, on main 561d532c)
 Test Files  115 passed (115)
      Tests  1492 passed (1492)
check:test-typecheck: OK (tsconfig.test.json)
os-verify-lock: VERDICT command-exit 0
same suite at 4a8b606d (the same patch on main adf6ee09): 115 files, 1492 passed, VERDICT command-exit 0
i18n gates and the derived families
node scripts/check-i18n-bundles.mjs --filter=approvals         (at 63d63a1b)
  plugins/plugin-approvals       in sync (15 bundle(s))                      EXIT 0
node scripts/check-i18n-stale-fill.mjs                          (at 63d63a1b)
check-i18n-stale-fill: OK (11 bundle set(s) — no new stale fills, 1 baselined).   EXIT 0
dispatch-gates --commands (at 4a8b606d): 61 families, each run and recorded with its exit code: 61 x exit 0
dispatch-gates --ran: 61 derived, 61 run, 0 NOT-MEASURED (a derived zero)
re-derived at 63d63a1b: the identical 61-command list
pnpm lint (repo-wide, at 4a8b606d): exit 0
eslint --no-inline-config on the changed .ts files: exit 0
changed lines 1962 (+1950 / -12), 21 files: under the 3000-line human-merge threshold

The branch is one commit on main 561d532c (after #30767 landed). Its diff has the same patch id (7e31c844) as 4a8b606d, where the derived families ran on main adf6ee09; none of the six main commits in between touches plugin-approvals. The package suite and both i18n checks were re-run on this head.

Dogfood: not run — content-only package PR, no ! in the title and no (narrowing) arm.


Generated by Claude Code

…ord page and e-mail link line in zh-Hant, ar, fr and pt-BR

Four new locales for sys_approval_request, sys_approval_action and
sys_approval_delegation (generated and hashed by the repo's own extract),
the approval notification messages, the record page's label and its
Details / Timeline tabs, and the line that opens an approval from its
e-mail (APPROVAL_EMAIL_LINK_LINES). Registered in index.ts under the
platform-table tags (zh-CN before zh-Hant) and in the extract command +
merge baseline. The e-mail templates' shape, the template selection and
EMAIL_TEMPLATE_FLOOR_LOCALE are unchanged. The per-locale tests list the
four new locales.

Carried unchanged from the released handover commit 7db48bd (written by
session_01Utp6Cai5CRdAs4u9gTipWU).

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cya5ej5GQV86RPbRPK
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests labels Nov 6, 2026
@github-actions github-actions Bot added the tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/plugin-approvals, touching 62 documentable anchor(s).

7 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/automation/approvals.mdx (via sys_approval_action (symbol, a field of const object arObjects; a field of const object frObjects; a field of const object ptBRObjects; a field of const object zhHantObjects), sys_approval_delegation (symbol, a field of const object arObjects; a field of const object frObjects; a field of const object ptBRObjects; a field of const object zhHantObjects), sys_approval_request (symbol, a field of const object arObjects; a field of const object frObjects; a field of const object ptBRObjects; a field of const object zhHantObjects))
  • content/docs/automation/flows.mdx (via sys_approval_action (symbol, a field of const object arObjects; a field of const object frObjects; a field of const object ptBRObjects; a field of const object zhHantObjects), sys_approval_request (symbol, a field of const object arObjects; a field of const object frObjects; a field of const object ptBRObjects; a field of const object zhHantObjects))
  • content/docs/automation/workflows.mdx (via sys_approval_action (symbol, a field of const object arObjects; a field of const object frObjects; a field of const object ptBRObjects; a field of const object zhHantObjects), sys_approval_request (symbol, a field of const object arObjects; a field of const object frObjects; a field of const object ptBRObjects; a field of const object zhHantObjects))
  • content/docs/data-modeling/field-types.mdx (via sys_approval_request (symbol, a field of const object arObjects; a field of const object frObjects; a field of const object ptBRObjects; a field of const object zhHantObjects))
  • content/docs/data-modeling/objects.mdx (via sys_approval_delegation (symbol, a field of const object arObjects; a field of const object frObjects; a field of const object ptBRObjects; a field of const object zhHantObjects))
  • content/docs/plugins/packages.mdx (via sys_approval_action (symbol, a field of const object arObjects; a field of const object frObjects; a field of const object ptBRObjects; a field of const object zhHantObjects), sys_approval_request (symbol, a field of const object arObjects; a field of const object frObjects; a field of const object ptBRObjects; a field of const object zhHantObjects))
  • content/docs/ui/translations.mdx (via sys_approval_request (symbol, a field of const object arObjects; a field of const object frObjects; a field of const object ptBRObjects; a field of const object zhHantObjects))

⛔ 4 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v16.mdx (via sys_approval_action (symbol, a field of const object arObjects; a field of const object frObjects; a field of const object ptBRObjects; a field of const object zhHantObjects), sys_approval_delegation (symbol, a field of const object arObjects; a field of const object frObjects; a field of const object ptBRObjects; a field of const object zhHantObjects), sys_approval_request (symbol, a field of const object arObjects; a field of const object frObjects; a field of const object ptBRObjects; a field of const object zhHantObjects))
  • content/docs/releases/v17/17-6.mdx (via sys_approval_request (symbol, a field of const object arObjects; a field of const object frObjects; a field of const object ptBRObjects; a field of const object zhHantObjects))
  • content/docs/releases/v17/17-7.mdx (via sys_approval_action (symbol, a field of const object arObjects; a field of const object frObjects; a field of const object ptBRObjects; a field of const object zhHantObjects))
  • content/docs/releases/v18/18-1.mdx (via sys_approval_delegation (symbol, a field of const object arObjects; a field of const object frObjects; a field of const object ptBRObjects; a field of const object zhHantObjects))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 1 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 63 of 221 client-bound route-ledger rows — the other 158 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 158: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 103 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 6 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 612468cc20e4d4adeba047d2416126ec9a8cc077 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from da2b51956b527699104b40d9e195aa8de4522402 — the merge of head 0ac1f7dd06ae8a45f1cdf1d70edde9f2b9178d1d into base 612468cc20e4d4adeba047d2416126ec9a8cc077, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin da2b51956b527699104b40d9e195aa8de4522402 && git checkout da2b51956b527699104b40d9e195aa8de4522402
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 612468cc20e4d4adeba047d2416126ec9a8cc077 0ac1f7dd06ae8a45f1cdf1d70edde9f2b9178d1d && git checkout -B drift-repro 612468cc20e4d4adeba047d2416126ec9a8cc077 && git merge --no-ff 0ac1f7dd06ae8a45f1cdf1d70edde9f2b9178d1d

node scripts/docs-audit/affected-docs.mjs --json 612468cc20e4d4adeba047d2416126ec9a8cc077

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 612468cc20e4d4adeba047d2416126ec9a8cc077 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

…h "os "

check-cli-command-ids reads a quoted string that opens with `os ` and a
lowercase word as a command id, so the pt-BR clause
approvalAdminRescueFallbackUnresolved ('os fallbackApprovers declarados
também não…') was taken for the command `os fallback` and refused. The
clause is lowercase by design (it is joined mid-sentence after the
separator), so it is reworded to 'tampouco os fallbackApprovers
declarados corresponderam a ninguém', which keeps the "either" of the
English and no longer opens with the article.

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

Copy link
Copy Markdown
Contributor Author

domain:server#1 · os-elon-musk · session_016WV4cytLmJxfAmgPVjUbbW

席位核对 · ACCEPT · 2026-11-06T03:48Z · #30512 (package 9 of 11, plugin-approvals, first half)

Head-sha: 0ac1f7d

  • Shape: 21 files, +1950/−12, all in packages/plugins/plugin-approvals/ plus one patch changeset: four new locale bundles with source-hash companions (zh-Hant, ar, fr, pt-BR) for the three approval objects, translations/index.ts registering them under the platform-table tags, the four locales' entries in messages.ts and pages.ts, the record page's inline Details / Timeline labels, APPROVAL_EMAIL_LINK_LINES, the extract config's --locales list and stack locales, and six tests that add the four bundles to their locale lists. Under the 3000-line threshold and inside claim 6672078792. Not governed. Two commits on origin/main 561d532c.
  • Spot check (read in the diff):
    • approval-email-templates.ts changes only APPROVAL_EMAIL_LINK_LINES: its key type widens and four lines are added, each keeping {{approvalUrl}} byte-identical. The template shape, the template selection and EMAIL_TEMPLATE_FLOOR_LOCALE are untouched, which is ruling A as the handover commit 7db48bdd records it. That citation is fine.
    • approvalMessages, ApprovalsLocale and APPROVAL_EMAIL_LINK_LINES widen to eight locales. None is reachable from the package entry (exports is . only, and src/index.ts re-exports neither translations/ nor approval-email-templates.ts), so no public surface moves.
    • pages.ts records each new page label against the same en digest 903e2bc9c8f36633 as the existing three.
    • sys-approval-request-page.test.ts pins the served locale set at the eight locales and still holds every served locale to the authored label. The other five test edits only add the four bundles to their lists; no assertion is relaxed.
    • The zh-Hant text is Traditional (spot-read zhHantMessages and the page labels).
  • Gates: every check-run on this head has concluded: 35 success, 13 skipped, 0 failure. Locally, the dev report 6675823690 shows build 118/118, plugin-approvals 115 files / 1492 tests, typecheck clean, check-i18n-bundles --filter=approvals in sync, stale-fill OK, and the 61 derived families and pnpm lint exit 0 at 4a8b606d (the same patch as the first commit). Addendum 6676005589 covers the second commit.
  • Deviation from handover 7db48bdd: one pt-BR string. At 63d63a1b, "Lint · docs & code guards" failed check-cli-command-ids, because approvalAdminRescueFallbackUnresolved began with the article "os" ('os fallbackApprovers declarados…') and the gate read it as the command os fallback. The second commit rewords the clause to 'tampouco os fallbackApprovers declarados corresponderam a ninguém'. It stays lowercase because it follows the "; " reason separator, and it is the gate's only hit across approvals A and B. Per addendum 6676005589, the whole docs & code guards lane, the package suite and both i18n checks exit 0 at this head.
  • Contract: Clause-②: no, Metadata-protocol: none, confirmed from the diff: translations and internal locale-key widening only, with no key or shape change.
  • Landing: ready, then auto-merge, through the relay. The card's plugin-approvals row is ticked when the second half (ru, de, ko) merges.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 6, 2026 03:49
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge November 6, 2026 03:49
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 6, 2026
Any commits made after this event will not be merged.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant