You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9d70768
Browse filesBrowse the repository at this point in the historyBrowse files
docs(skills): teach the flow step-name and related-list title translation keys (#37072)
repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr
Fixes#36401Fixes#36575
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户能看到什么变化:用户无感;读「多语言」和「数据建模」技能的 AI
助手现在知道,流程里每一步的名称、以及记录页上自定义的关联列表标签页标题,各自该写在哪个翻译位置。
-
为什么做:这两个翻译位置已经随平台发布,技能文字却没跟上,是「流程步骤名可翻译」和「关联列表标题可翻译」两项改动各自欠下的技能说明,这里一次补齐。
- 出错会怎样:只是技能里的几句说明和一条测评用例,不影响任何运行行为;写错的话 AI 助手会把翻译写到不生效的位置,可以直接撤回这一个合并。
- 要你做什么:批准合并。只改技能文字和一道评测题;因为一个 PR
同时关两张卡,工具无法判断走哪张卡的低风险通道,所以按需要人工批准处理。契约审核 PASS:记录 7141681211,Head-sha
`7523971c565c850e5183385030f0007e4ff08fd0`。
## What changes
One commit per card, then one merge of `main` and one fix commit after
the contract review.
**`76538fe36f`, the flow step-name key (#36401, the follow-up owed by
the flows `nodes` group).** `skills/objectstack-i18n/SKILL.md`, the
paragraph on keys that sit deeper than their group's `label`, now names
a fourth key:
> any other step's name at `flows.{flow}.nodes.{node_id}.label` (a
screen is named by its heading, `flows.{flow}.screens.{node_id}.title`,
and takes a `nodes` key only beside a `title` of its own; `os i18n
check` asks for a flow's top-level steps, and for one of
`FLOW_TECHNICAL_NODE_TYPES` — `script`, `http`, `connector_action`,
`assignment`, `boundary_event`, the four `*_record` types — only where a
decision's branch leads to it)
"Three keys" and "all three keys included" become four. This is what the
readers do: the walk in `packages/lint/src/i18n-walk.ts` asks
`nodes.NODE_ID.label` for each top-level node, skips an `approval`
(keyed `approvals.NODE_ID.label`) and a screen whose label
`screens.NODE_ID.title` already covers, skips `isFlowTechnicalNodeType`
nodes, and adds back a technical step a drawn decision's branch names
(`decisionBranchTechnicalTargets`); `os i18n extract` reads the same
walk. The nine types are the literal list of `FLOW_TECHNICAL_NODE_TYPES`
in `packages/spec/src/automation/flow-altitude.ts`, whose source file
does not ship in the package, so the skill lists them.
**`cd690662c7`, the related-list title key (#36575, the follow-up owed
by the related-list title translation).**
- `skills/objectstack-i18n/SKILL.md`, the object translation group
table, gains the `_relatedLists.{list}` row beside `_tabs`: the `label`
of an object-form `relatedLists` entry on the parent object, by the
entry's literal `list` (`event.related_to` is one key); an entry with no
`label` has no key and keeps the child field's `relatedListTitle`, else
the child's plural label; "Spelled `relatedLists`, the group is refused,
naming this one" (the alias table of `ObjectTranslationDataSchema` maps
the unprefixed spelling to `_relatedLists` as a refusal, never an
accepted second spelling).
- `skills/objectstack-data/rules/relationships.md`, the `relatedLists`
entry: "its `label` translates at
`objects.{parent}._relatedLists.{list}.label` (none: nothing to
translate)".
- `skills/objectstack-i18n/evals/bundles-locales-coverage.json`: one
case (id 16) covering both keys.
Precedence is stated as the contract has it
(`RelatedListEntryObjectSchema.label` in
`packages/spec/src/data/object.zod.ts`: the entry `label`, then the
child FK's `relatedListTitle`, then the child's plural label).
**`40f4e27ee0`, merge of `origin/main` `159113f4fe`** (plain merge, no
conflict; brings #37044's edit to the same file).
**`7523971c56`, the contract review's S1 and N1** (record 7141134189),
`relationships.md` only:
- S1: the `'primary'` bullet ends "its tab stays unless `relatedLists`
omits it" again (the first round had cut the qualifier, leaving a
sentence that was false for a declared list that omits the child).
- N1: "override the derived title / columns (columns: the child's
`highlightFields`); an entry's `label` / `columns` win."
**Paid in the same files; no ceiling of the skills token ratchet
moves.** Restatement cut from `skills/objectstack-i18n/SKILL.md`: three
sentences repeating the heading above them; the "Use both gates"
paragraph keeps its one new fact; the `relatedListTitle` cell says
"likewise"; "Requires `--out`" loses its restating clause; the
per-namespace row loses "assembled by your own imports" (said above the
table for every layout); "Both shipped adapters" loses the parenthetical
the Service Contract section spells in full; the `translation` item
section loses its heading restated as a sentence; the Register step
folds a repeat of the authoring section.
Cut from `skills/objectstack-data/rules/relationships.md`, inside the
related-list section: "absent, nothing changes" (the section opens by
saying every child relationship shows by default, and objectstack-ui
Record Page says it too); the section's opening sentence loses "You
usually don't declare the related list on the parent's record detail
page" (it restated "by default"); "a self-referential FK (a hierarchy)"
loses the parenthetical. The "Catalog auto-fill" bullet and the Delete
Behaviors section are untouched.
Published-skill size against `main` `159113f4fe` (before) and
`7523971c56` (after):
| | lines | bytes | tokens (ceiling) |
|:--|:--|:--|:--|
| `skills/objectstack-i18n/SKILL.md` | 520 / 515 | 25215 / 25193 | 6299
/ 6294 (6333) |
| `skills/objectstack-data/rules/relationships.md` | 401 / 402 | 16805 /
16800 | 4202 / 4200 (4203) |
| `skills/objectstack-i18n/evals/bundles-locales-coverage.json` | 155 /
165 | 14511 / 15724 | 3628 / 3931 (eval fixture, not ratcheted) |
The two authored files are 27 bytes smaller together; the eval case is
the tree's only growth.
## Tests
Text only: no package source, test or behaviour changes, so there is no
ablation. The pins the text was written from were read, not edited:
`packages/cli/test/i18n-flow-node-coverage.test.ts` and
`packages/lint/src/i18n-related-lists-label-36528.test.ts`.
## Acceptance notes
- The body opens with the seat signature line; the closing lines follow
it.
- `check:dual-build-cjs-loads` and `check:lean-entry-closure` were NOT
MEASURED locally (exit 3, prerequisite: a whole-workspace build); the
diff touches no package and CI runs both.
- The flows `nodes` key is accepted by `os validate` at any depth and
for a titled screen; the skill teaches what `os i18n check` asks for and
the one screen rule an author can get wrong, not the full acceptance
set.
- Contract review nit N2 (the nine-type list is a hand copy of
`FLOW_TECHNICAL_NODE_TYPES` with no gate tying them) is accepted as is.
## Verification
Read first, by risk: the "Four keys sit deeper" paragraph and the
`_relatedLists.{list}` row of `skills/objectstack-i18n/SKILL.md`; the
three related-list bullets of
`skills/objectstack-data/rules/relationships.md`.
Two-minute check: `node scripts/check-skills-token-ratchet.mjs` prints
`60 authored bundle file(s) within their ceilings`, with
`skills/objectstack-data/rules/relationships.md is 4200 tokens (ceiling
4203; headroom 3)`. `overlap-check` at `7523971c56`: `VERDICT clean exit
0` against `origin/main`, #36158 and #35129.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr)_
<!-- signed: repo:objectstack#4 · os-justin ·
session_01QSeKYpEsWWE9Y5YtSsDgqZ -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
docs(skills): the i18n and data skills teach the flow step-name key `flows.FLOW.nodes.NODE_ID.label` and the related-list title key `objects.OBJECT._relatedLists.LIST.label`
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
objectstack-i18n's SKILL.md, in the paragraph on the keys that sit deeper than their group's `label`, now names the flow step-name key `flows.FLOW.nodes.NODE_ID.label`: a screen is named through its heading `flows.FLOW.screens.NODE_ID.title` and takes a `nodes` key only beside a `title` of its own, `os i18n check` asks for a flow's top-level steps, and a step of one of the `FLOW_TECHNICAL_NODE_TYPES` (listed) is asked only where a decision's branch leads to it. Text only; paid inside the same file by cutting three restatements in the coverage and extract sections.
11
+
12
+
The object translation group table gains the `_relatedLists.LIST` row beside `_tabs`: the `label` of an object-form `relatedLists` entry on the parent object, keyed by the entry's literal `list` (a dotted `object.field` is one key); an entry with no `label` has no key and keeps the child field's `relatedListTitle`, else the child's plural label; the unprefixed `relatedLists` spelling is refused, naming the key. objectstack-data's `rules/relationships.md` says the same on the `relatedLists` entry: its `label` translates at `objects.PARENT._relatedLists.LIST.label`, and an entry with none has nothing to translate. One eval case covers both keys. Paid inside each file by cutting restatement; no ceiling of the skills token ratchet moves.
|`fields.{field_name}`|`label`, `help`, `placeholder`, `options` (option value → label), `inlineTitle` (the heading of the inline child grid a `master_detail` field draws on its parent's form — the field lives on the child object, so the key is the child's; untranslated it keeps its authored text, never the child's plural label), `relatedListTitle` (the title of the related list a `lookup` or `master_detail` field draws on its parent's record page — the key is the child's too; untranslated it keeps its authored text, never the child's label) per field |
161
+
|`fields.{field_name}`|`label`, `help`, `placeholder`, `options` (option value → label), `inlineTitle` (the heading of the inline child grid a `master_detail` field draws on its parent's form — the field lives on the child object, so the key is the child's; untranslated it keeps its authored text, never the child's plural label), `relatedListTitle` (likewise, the title of the related list a `lookup` or `master_detail` field draws on its parent's record page) per field |
164
162
|`_views.{view_name}`|`label`, `description`, `title` (a form view's own heading — only a form that authors one is translated; a list view has none), `submitBehavior.title` / `submitBehavior.message` (the thank-you panel of a form whose `submitBehavior` is `kind: 'thank-you'`; only the copy the form authors is translated, and the other kinds carry none), `emptyState.title` / `emptyState.message`, `bulkActions.{def_name}` (`label`, `confirmText`, `confirmLabel`, `params`) |
165
163
| `_actions.{action_name}` | `label`, `description`, `confirmText`, `submitText` (the param dialog's button verb — only under an action that declares `params`), `cancelText` (the dismiss button of the confirm or param dialog — only under an action that declares `confirmText` or a non-empty `params`), `successMessage`, `disabledReason` (the sentence a greyed action shows; absent keeps the console's default), `params.{param_name}` (and `.options.{value}` beneath it — an option's stored `value` in that param's inline `options`), `outcomeMessages.{outcome}` (an outcome the action's own `outcomeMessages` declares), `resultDialog.title` / `.description` / `.acknowledge` (only under an action that declares a `resultDialog`), `resultDialog.fields.{path}` (the literal `path` of a field in `resultDialog.fields[]`, dots included — `client.secret` is one key), `preflight.fields.{path}` (only under an action that declares `preflight`: a field's literal `path` in its `preflight.fields[]`, its value a plain string as under `resultDialog.fields`), `resultDialog.columns.{path}.{column_path}` / `preflight.columns.{path}.{column_path}` (a table's column headers, beside `fields`: the literal `path` of a `format: 'table'` field, then of one of its `columns[]`, each a plain string; `defineTranslationBundle` refuses any other key under `preflight`, a `title` included); the same keys hold under `globalActions.{action_name}` |
166
164
|`_sections.{section_name}`| Form section `label`, `description`; `fields.{field_name}` — the `label`, `placeholder`, `helpText` an entry overrides for that form alone (`helpText` here, `help` under `fields.{field_name}` above: each spells what its source does) |
|`_relatedLists.{list}`|`label` of an object-form `relatedLists` entry on this (parent) object, by its literal `list` (`event.related_to` is one key); an entry with no `label` has no key and keeps the child field's `relatedListTitle`, else the child's plural label. Spelled `relatedLists`, the group is refused, naming this one |
168
167
|`_validations.{rule_name}`|`message` only — the sentence a rejected write returns (replaces the retired `validationMessages`) |
169
168
|`_actions.{action_name}.refusals.{CODE}`|`message`, and `reasons.{reason}.message` per declared reason — the sentences of the action's `refusals` catalogue (**objectstack-ui** → Actions), for a code and reason it declares (any other is `translation-target-unknown`); the same under `globalActions.{action_name}`|
170
169
@@ -183,16 +182,21 @@ book once carried stays retired), `mappings` (an import mapping's `label` by its
183
182
`datasets.{dataset}.{dimensions,measures}.{member}` (a member's `synonyms` have no key: one
184
183
authored list carries every language), and a joined report's block headings sit at
185
184
`reports.{report}.blocks.{block_name}.{label,description}`, keyed by the block's required `name`.
186
-
Three keys sit deeper than their group's `label`: a `page:tabs` item at
185
+
Four keys sit deeper than their group's `label`: a `page:tabs` item at
187
186
`pages.{page}.components.{tabs_id}.items.{value}.label` (by the item's `value`; an item without
188
-
one has no key), an approval step at `flows.{flow}.approvals.{node_id}.label`, and the text a
187
+
one has no key), an approval step at `flows.{flow}.approvals.{node_id}.label`, any other step's
188
+
name at `flows.{flow}.nodes.{node_id}.label` (a screen is named by its heading,
189
+
`flows.{flow}.screens.{node_id}.title`, and takes a `nodes` key only beside a `title` of its own;
190
+
`os i18n check` asks for a flow's top-level steps, and for one of `FLOW_TECHNICAL_NODE_TYPES` —
191
+
`script`, `http`, `connector_action`, `assignment`, `boundary_event`, the four `*_record` types —
192
+
only where a decision's branch leads to it), and the text a
189
193
`create_record` / `update_record` writes into a field marked `{ dialect: 'template', source }` at
190
194
`flows.{flow}.records.{node_id}.fields.{field}`. That text, and each sentence a hook or a `script`
191
195
action declares in `texts` and writes through `ctx.text` — `hooks.{hook}.texts.{key}.message`,
192
196
`_actions.{action_name}.texts.{key}.message` (also under `globalActions`) — is picked in the
193
197
organization's language (the Localization setting if set, else `i18n.defaultLocale`; never the caller's).
194
198
`os i18n extract --no-objects-only` scaffolds every group above but `messages` and
195
-
`settingsCommon`, all three keys included. The `inlineTitle`, report-block, table-column and
199
+
`settingsCommon`, all four keys included. The `inlineTitle`, report-block, table-column and
196
200
mapping keys, as the shipped `app-crm`, `app-showcase` and platform bundles spell them for `zh-CN`
197
201
(`rows` is the table field's `path`, `error.message` one column's):
198
202
@@ -250,13 +254,13 @@ directory tree for you.
250
254
|:--|:--|:--|
251
255
| Bundled | one `crm.translation.ts` holding every locale | under 5 objects, 2-3 locales |
"prompt": "In zh-CN the `crm_account` record page still titles one tab `Meetings`: the object declares `relatedLists: [{ list: 'crm_event.related_to', label: 'Meetings' }, 'crm_contact']`. The manual's drawing of the `opportunity_approval` flow names its `high_value` decision in English too, and `os i18n check` never asks for the flow's `mark_approved` `update_record` step. Which keys do I add, and is the check missing one?",
157
+
"expected_output": "`objects.crm_account._relatedLists['crm_event.related_to'].label` on the parent, keyed by the entry's literal `list` as one key; the bare `crm_contact` entry authors no `label`, so it has no key and keeps the child field's `relatedListTitle`, else the child's plural label. `flows.opportunity_approval.nodes.high_value.label` for the decision. The check is not missing one: `update_record` is one of the technical node types, whose `nodes` key it asks for only where a decision's branch leads to the step.",
0 commit comments