|
| 1 | +--- |
| 2 | +'@objectstack/skills': patch |
| 3 | +--- |
| 4 | + |
| 5 | +docs(skills): the objectstack-i18n entry file becomes a router |
| 6 | + |
| 7 | +Clause-②: no |
| 8 | +Metadata-protocol: none |
| 9 | + |
| 10 | +`skills/objectstack-i18n/SKILL.md` goes from 25.3 KB to 9.0 KB (504 lines to 160). It now holds five things: three first checks (read the stack's `i18n` block and the contract before writing a key; which of `defaultLocale`, `sourceLocale`, `supportedLocales` and `fallbackLocale` is which; verify with `os i18n check` and `os validate`), one type-checked bundle with the `translation` metadata item beside it, the key map as one path listing, seven traps, and a table that says where to go for the rest. No rule's teaching changes. This skill has no hand-written reference file, so no text moved: what left the entry was cut, and this entry says what now answers it. |
| 11 | + |
| 12 | +**What the entry keeps.** The key map lists, as paths, the groups under `objects.{object}` (`fields`, `_views`, `_actions`, `_sections`, `_tabs`, `_relatedLists`, `_milestones`, `_validations`) and the top-level groups the old entry listed, with their keys. It is not the whole contract: it stops above the leaf keys of `bulkActions.{def}`, of `params.{param}`, of a dataset member and of a report block's `description`, and it does not list the top-level `forms` group (the old entry did not either). The routing table sends a key or shape the map does not show to the contract. Six notes under it carry the placements a path cannot show: `inlineTitle` and `relatedListTitle` are keys of the child object; `_views.{view}.title` is a form's own heading and a section's override says `helpText` where the field says `help`; `columns` is a sibling of `fields` (with the one worked example the map keeps) and `preflight` has no `title`; `_relatedLists.{list}` is on the parent; a report block is keyed by its `name` and a `books` group by its `key`; a flow step is keyed under `approvals`, `screens` or `nodes`. The seven traps, each one a bundle that parses and ships and then translates nothing or the wrong text: an option key is the stored `value`, never the label; `t()` fills double braces only and there is no ICU MessageFormat; `os i18n extract` writes `objects` and `globalActions` only unless you pass `--no-objects-only`; coverage is not freshness, so `os i18n extract … --check` is the second gate; a generated module is an `objects` subtree that needs wrapping, and `withSourceFallback` needs the `--source-hashes` companion as its fourth argument; text the server writes is in the organization's language; an app-authored refusal has no `en` floor. |
| 13 | + |
| 14 | +**What left, and what answers it now.** |
| 15 | + |
| 16 | +- The condition on each key (which declaration a key needs before it is accepted) and the retired and misspelled keys (`o`, `app`, `nav`, `dashboard`, `_globalOptions`, `_meta`, `validationMessages`, `settings`, `confirmMessage`, `sourceLanguage`, `authoringLocale`, `authoringLanguage`): the contract, `node_modules/@objectstack/spec/src/system/translation.zod.ts`. Its shapes are strict, a key with a condition says it in its `.describe()` text, and a refused key is answered with the key to write. `os validate` reports a key that names nothing the metadata declares as `translation-target-unknown`, an error. |
| 17 | +- The `i18n` property table, the naming-convention table and the file-layout table: the contract and the bundle example. |
| 18 | +- The flags of `os i18n check` and `os i18n extract` beyond the ones a run needs (`--include-platform`, `--show-keys`, `--fill`, `--default-locale`, `--no-metadata-forms`) and `os lint --i18n-strict`: each command's `--help`. |
| 19 | +- The `II18nService` method list: `@objectstack/spec/contracts`. The locale resolution order: https://objectstack.ai/docs/protocol/kernel/i18n-standard. The coverage and diff shapes: the contract (`TranslationCoverageResultSchema`, `TranslationDiffItemSchema`). The three `/api/v1/i18n` routes: https://objectstack.ai/docs/api/plugin-endpoints, which the entry does not link. |
| 20 | +- The paragraph on platform-composed `userMessage` sentences, the list of shipped example bundles, and the sentence that validation, delete-restriction and permission-denial messages name fields in the request's language: cut. They describe what the platform does and ask nothing of a bundle author. |
| 21 | + |
| 22 | +**Anchors that no longer exist in `SKILL.md`.** Every section heading of the old file: `#translation-configuration`, `#stack-level-i18n-config`, `#authoring-translation-bundles-objects`, `#object-level-translation-structure`, `#naming-conventions`, `#file-organization-strategies`, `#authoring-at-runtime-the-translation-item`, `#message-interpolation`, `#simple-format-default`, `#no-icu-messageformat`, `#translation-coverage`, `#os-i18n-check`, `#os-i18n-extract---check--freshness-not-coverage`, `#diff--coverage-schemas`, `#integration-with-ii18nservice`, `#service-contract`, `#registration`, `#server-composed-user-text-usermessage`, `#translation-workflow-best-practices`, `#1-extract-skeletons-from-metadata`, `#2-register`, `#shipped-examples`, `#common-pitfalls`, `#-the-retired-o-shape`, `#verify-your-work`, `#references`, `#see-also`. The new ones are `#first-checks`, `#a-bundle`, `#key-map`, `#traps` and `#where-to-go`. No file in this repository linked an anchor of the old entry. |
0 commit comments