From b25b9e0fd24c95126d0d4300577b87073c76c31f Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 3 Dec 2026 14:40:18 +0000 Subject: [PATCH 1/2] docs(skills): a bundle navigation node may carry keywords without a label The apps and translations pages and the objectstack-i18n key map say that apps.APP.navigation.ID takes label, keywords, or both, and what a locale that gives keywords alone shows. One eval case exercises a keywords-only node. The objectstack-i18n ratchet row follows the measurement, 2243 to 2250. Claude-Session: https://claude.ai/code/session_01Utp6Cbb4nipp9xHscbT4fu Co-authored-by: Claude --- content/docs/ui/apps.mdx | 4 +++- content/docs/ui/translations.mdx | 2 +- scripts/check-skills-token-ratchet.mjs | 11 ++++++++++- skills/objectstack-i18n/SKILL.md | 2 +- .../evals/bundles-locales-coverage.json | 13 +++++++++++++ 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/content/docs/ui/apps.mdx b/content/docs/ui/apps.mdx index 2bc2aa98fab..a2bdf64abd8 100644 --- a/content/docs/ui/apps.mdx +++ b/content/docs/ui/apps.mdx @@ -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..navigation..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 diff --git a/content/docs/ui/translations.mdx b/content/docs/ui/translations.mdx index 1be563e6e9f..83b2c4ff12a 100644 --- a/content/docs/ui/translations.mdx +++ b/content/docs/ui/translations.mdx @@ -80,7 +80,7 @@ export default defineStack({ | Form sections | `objects.._sections.
` | | Custom validation-rule messages | `objects.._validations..message` | | Activity-milestone timeline rows | `objects.._milestones...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..navigation..label` | +| App navigation | `apps..navigation..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..label` / `description` | | Dashboard widget title / description (the card-header subtitle) | `dashboards..widgets..title` / `description` | | Dashboard global-filter label and static option labels | `dashboards..globalFilters..label` / `.options.` — 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 | diff --git a/scripts/check-skills-token-ratchet.mjs b/scripts/check-skills-token-ratchet.mjs index 5f28902d35a..b8e097953d4 100644 --- a/scripts/check-skills-token-ratchet.mjs +++ b/scripts/check-skills-token-ratchet.mjs @@ -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, diff --git a/skills/objectstack-i18n/SKILL.md b/skills/objectstack-i18n/SKILL.md index 5805616ac25..a6e3354cf8c 100644 --- a/skills/objectstack-i18n/SKILL.md +++ b/skills/objectstack-i18n/SKILL.md @@ -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 diff --git a/skills/objectstack-i18n/evals/bundles-locales-coverage.json b/skills/objectstack-i18n/evals/bundles-locales-coverage.json index ccbe3237500..50f326433ac 100644 --- a/skills/objectstack-i18n/evals/bundles-locales-coverage.json +++ b/skills/objectstack-i18n/evals/bundles-locales-coverage.json @@ -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: ["] + } } ] } From 1958ca7ee11fc9152a6e20f9fbfd0e80f9d18dd7 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 3 Dec 2026 14:41:01 +0000 Subject: [PATCH 2/2] chore: changeset for the i18n skill key-map line Claude-Session: https://claude.ai/code/session_01Utp6Cbb4nipp9xHscbT4fu Co-authored-by: Claude --- .../39209-i18n-skill-nav-keywords-without-label.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .changeset/39209-i18n-skill-nav-keywords-without-label.md diff --git a/.changeset/39209-i18n-skill-nav-keywords-without-label.md b/.changeset/39209-i18n-skill-nav-keywords-without-label.md new file mode 100644 index 00000000000..4fb36a48760 --- /dev/null +++ b/.changeset/39209-i18n-skill-nav-keywords-without-label.md @@ -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.