Filed by the triage seat (objectstack-wide, seat post #6015, session_01AavokzJ5DndAwitDXvKy4U) to carry the spec half of the maintainer's ruling B on objectstack-ai/objectui#11201, with its clarification 「11201 按此」. ⛔ Not a claim, ⛔ not a dispatch. Graded here: documentation · priority:p3 · domain:spec · area:devpath · pm:queue.
The ruling this carries
The maintainer ruled B on objectui#11201: the renderer's rule that translates a present label because its text equals the target's machine name is retired.
Asked whether "if there is an i18n translation, use it; otherwise fall back to the metadata label" is right, the triage seat confirmed it is the platform's existing model, and the maintainer agreed (「同意」). Translation is keyed by the entry's identity, never by its text.
The text that caused the question
packages/spec/src/ui/app.zod.ts (read on origin/main 30839063b5), BaseNavItemSchema.label, the JSDoc and the describe at :321–:324: "…a present label renders verbatim and is never overwritten…".
- The sentence was written about inheritance: a present label is never replaced by its target's label.
- It does not mention translation. Read literally, it forbids what
translateApp (packages/spec/src/system/i18n-resolver.ts:1153, wired as app: translateApp at :1053) already does. At the /meta boundary it replaces a node's label with apps.<app>.navigation.<id>.label for the active locale chain, keyed by the node's stable id.
label is also an I18nLabelSchema, so an inline locale map is a second identity-keyed route.
- That gap is what made objectui#11201's question look open.
Direction
One wording change, in the JSDoc and the describe, stating the resolution order once:
- A present label is the author's source text. It is localized by the entry's own translation, keyed by its
id:
- the bundle entry
apps.<app>.navigation.<id>.label for the active locale chain (translateApp);
- else the inline locale map's value for that locale;
- else it is shown as authored.
- It is never replaced by its target's label, and never translated by matching its text against any name.
- An absent label inherits its target's current label at render time, which the target's own translation localizes.
- Name
translateApp as the one place the bundle step runs. ⛔ No second resolver in the renderer.
- Pin:
translateApp translates a node whose label equals its target's machine name only through the node's id key; with no such key, the label comes back unchanged. This locks the "never by text" half at the spec.
- Regenerate whatever the describe feeds (JSON schema, reference docs) in the same PR.
- ⛔ No schema change: the key stays
I18nLabelSchema, optional.
Related
- objectui#11201: the renderer half. Stage 1 stops producers writing machine-name labels and runs the census.
- objectui#11198: the skills guide sentence. It may add "a present label is shown as authored, localized by its own translation".
Filed by the triage seat (objectstack-wide, seat post #6015,
session_01AavokzJ5DndAwitDXvKy4U) to carry the spec half of the maintainer's ruling B on objectstack-ai/objectui#11201, with its clarification 「11201 按此」. ⛔ Not a claim, ⛔ not a dispatch. Graded here:documentation·priority:p3·domain:spec·area:devpath·pm:queue.The ruling this carries
The maintainer ruled B on objectui#11201: the renderer's rule that translates a present label because its text equals the target's machine name is retired.
Asked whether "if there is an i18n translation, use it; otherwise fall back to the metadata label" is right, the triage seat confirmed it is the platform's existing model, and the maintainer agreed (「同意」). Translation is keyed by the entry's identity, never by its text.
The text that caused the question
packages/spec/src/ui/app.zod.ts(read onorigin/main30839063b5),BaseNavItemSchema.label, the JSDoc and the describe at:321–:324: "…a present label renders verbatim and is never overwritten…".translateApp(packages/spec/src/system/i18n-resolver.ts:1153, wired asapp: translateAppat:1053) already does. At the/metaboundary it replaces a node's label withapps.<app>.navigation.<id>.labelfor the active locale chain, keyed by the node's stableid.labelis also anI18nLabelSchema, so an inline locale map is a second identity-keyed route.Direction
One wording change, in the JSDoc and the describe, stating the resolution order once:
id:apps.<app>.navigation.<id>.labelfor the active locale chain (translateApp);translateAppas the one place the bundle step runs. ⛔ No second resolver in the renderer.translateApptranslates a node whose label equals its target's machine name only through the node'sidkey; with no such key, the label comes back unchanged. This locks the "never by text" half at the spec.I18nLabelSchema, optional.Related