Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .changeset/39209-i18n-skill-nav-keywords-without-label.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'@objectstack/skills': patch
---

docs(skills): the objectstack-i18n key map says a navigation translation node takes keywords, with or without a label

Clause-②: no
Metadata-protocol: none

`skills/objectstack-i18n/SKILL.md`, one line of the key map: `apps.{app}: label, description, navigation.{id}.label` becomes `navigation.{id}.{label,keywords[]} (at least one)`. The contract has accepted a node with `keywords` and no `label` since the navigation translation node made `label` optional beside `keywords`; the skill still listed `label` alone, so an agent asked for a locale's search words wrote a placeholder label next to them, or did not know the key.

`keywords` is a list of strings, this locale's search words for the entry. A node with neither key is still refused. One eval case in `evals/bundles-locales-coverage.json` asks for a keywords-only node.
4 changes: 3 additions & 1 deletion content/docs/ui/apps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,9 @@ key instead.
`keywords` lists other words a person may type to find the entry, such as its old
name after a rename; they never gate anything, and a translation bundle gives each
locale its own under `apps.<app>.navigation.<id>.keywords`, beside that entry's
`label`. A locale's words add to the entry's own, never replace them, so a word
`label` or without one. A locale that gives an entry keywords and no `label` shows
the label the next locale in its fallback chain gives, else the entry's source label,
and `os i18n check` still lists that label as untranslated. A locale's words add to the entry's own, never replace them, so a word
written in the source language finds the entry in every language. The ⌘K command
palette finds an `object`, `dashboard`, `page`, `report`, `component` or `url` entry
by any of them, and when only one of these words matched it shows that word beside
Expand Down
2 changes: 1 addition & 1 deletion content/docs/ui/translations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default defineStack({
| Form sections | `objects.<name>._sections.<section>` |
| Custom validation-rule messages | `objects.<name>._validations.<rule>.message` |
| Activity-milestone timeline rows | `objects.<name>._milestones.<field>.<value>.summary` — keyed by the milestone's watched `field` and the `value` it fires on; the template keeps the authored `{field}` tokens, and a reader in that language reads the row composed from it, a select token named by its translated option label. A language with no entry reads the authored `summary` |
| App navigation | `apps.<app>.navigation.<id>.label` |
| App navigation | `apps.<app>.navigation.<id>.label` / `keywords` — `keywords` is a list of the locale's search words for the entry, and a node carries at least one of the two. An entry given `keywords` and no `label` shows the label the next locale in the fallback chain gives, else its source label, and `os i18n check` still lists the label as untranslated |
| Dashboard label / description | `dashboards.<name>.label` / `description` |
| Dashboard widget title / description (the card-header subtitle) | `dashboards.<name>.widgets.<widgetId>.title` / `description` |
| Dashboard global-filter label and static option labels | `dashboards.<name>.globalFilters.<filterName>.label` / `.options.<value>` — the key is the filter's `name`, or its `field` when it authors no `name`; an option is keyed by its `value` spelled as a string |
Expand Down
11 changes: 10 additions & 1 deletion scripts/check-skills-token-ratchet.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,16 @@ export const CEILINGS = new Map([
// Authority: the ruling of record that orders the entry file down to router size, decision
// record #34691 S3 = A.
// ceil(($(wc -c < skills/objectstack-i18n/SKILL.md) - 27) / 4) == ceil(8969 / 4)
['skills/objectstack-i18n/SKILL.md', 2243],
// 2243 -> 2250: the key map's `navigation.{id}` line names `keywords[]` beside `label` and
// says a node carries at least one of the two, which is what the contract accepts since a
// navigation translation node parses with keywords and no label. One line changed, no
// bullet added; the file is 8999 bytes (8972 priced) -> 9027 (9000 priced). Nothing in a
// router this size restates that line, so there is no deletion to show: the row moves by
// the measured 7 tokens, pinned AT the measurement, under the maintainer's standing words
// of 2026-11-27 05:20Z, 「后续遇到这种问题,能适当放宽token 的限制」, as the note of
// record 7216253348 applies them (a PR's own legitimate change, at most 10 tokens over).
// ceil(($(wc -c < skills/objectstack-i18n/SKILL.md) - 27) / 4) == ceil(9000 / 4)
['skills/objectstack-i18n/SKILL.md', 2250],
// 12705 -> 12984 (2026-08-31 app-repo-principles raise, see the block above).
// The largest of the five and the frame the other four are read under: what an
// app IS (metadata under the platform's spec, authored from these skills,
Expand Down
2 changes: 1 addition & 1 deletion skills/objectstack-i18n/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ objects.{object}: label, pluralLabel, description
_tabs.{tab}.label, _relatedLists.{list}.label
_milestones.{field}.{value}.summary, _validations.{rule}.message
globalActions.{action}: the _actions keys (an action with no objectName)
apps.{app}: label, description, navigation.{id}.label
apps.{app}: label, description, navigation.{id}.{label,keywords[]} (at least one)
picklists.{picklist}: label, options.{value}
reports, positions, datasets, permissions (as the stack's permissions[]):
{name}.label, {name}.description
Expand Down
13 changes: 13 additions & 0 deletions skills/objectstack-i18n/evals/bundles-locales-coverage.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,19 @@
"must_contain_any": [["title:", "\"title\":", ".title"], ["body:", "\"body\":", ".body"]],
"must_not_contain": ["notices.0", "notices[0]"]
}
},
{
"id": 19,
"prompt": "Our `crm` app has a navigation entry whose `id` is `nav_accounts`. Its zh-CN label is not decided yet, so this change must not write one, but zh-CN users should already find the entry in search by typing 客户 or 公司. What goes in the zh-CN translation bundle, and does `os validate` accept a navigation node that has no `label`?",
"expected_output": "In the zh-CN `TranslationData`: `apps: { crm: { navigation: { nav_accounts: { keywords: ['客户', '公司'] } } } }`, that is `apps.crm.navigation.nav_accounts.keywords`. A navigation node carries `label`, `keywords`, or both, at least one of the two, so a node with `keywords` alone is accepted and no placeholder `label` is written. `keywords` is a list of strings, one per word a person types, not one string. A node with neither key is refused.",
"files": [],
"assertions": {
"must_contain": ["apps", "crm", "navigation", "nav_accounts", "keywords", "客户", "公司"],
"must_contain_any": [
["keywords: [", "\"keywords\": [", "keywords`: ["]
],
"must_not_contain": ["searchKeywords", "synonyms: ["]
}
}
]
}
Loading