Skip to content

Commit 544a688

Browse files
committed
docs: regenerate translation reference and document the pages namespace
`content/docs/references/system/translation.mdx` is generated from the spec schemas, so adding `pages` to `TranslationDataSchema` left it out of date (caught by `@objectstack/spec check:docs`). Regenerated via `gen:schema && gen:docs`. `content/docs/ui/translations.mdx` is hand-written and enumerated the translatable surfaces and the per-request metadata types — both stale as of this branch. Added the `pages` row and `page` to the resolved-types list, plus a note on why header copy is keyed by page name. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TubWYdWquVkS9dj733sDmC
1 parent 9e6767a commit 544a688

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

content/docs/references/system/translation.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ Translation data for objects, apps, and UI messages
197197
| **validationMessages** | `Record<string, string>` | optional | Translatable validation error messages keyed by rule name (e.g., `{"discount_limit": "折扣不能超过40%"}`) |
198198
| **globalActions** | `Record<string, { label?: string; confirmText?: string; successMessage?: string; params?: Record<string, { label?: string; helpText?: string; placeholder?: string; options?: Record<string, string> }>; … }>` | optional | Global action translations keyed by action name |
199199
| **dashboards** | `Record<string, { label?: string; description?: string; actions?: Record<string, { label?: string }>; widgets?: Record<string, { title?: string; description?: string }> }>` | optional | Dashboard translations keyed by dashboard name |
200+
| **pages** | `Record<string, { label?: string; description?: string; title?: string; subtitle?: string }>` | optional | Page translations keyed by page name |
200201
| **settings** | `Record<string, { title?: string; description?: string; groups?: Record<string, { title?: string; description?: string }>; keys?: Record<string, { label?: string; help?: string; placeholder?: string; options?: Record<string, string> }>; … }>` | optional | Settings manifest translations keyed by namespace |
201202
| **metadataForms** | `Record<string, { label?: string; description?: string; sections?: Record<string, { label?: string; description?: string }>; fields?: Record<string, { label?: string; helpText?: string; placeholder?: string }> }>` | optional | Translations for metadata-type configuration forms keyed by metadata type |
202203
| **settingsCommon** | `{ sourceLabels?: object }` | optional | Cross-namespace Settings UI strings |

content/docs/ui/translations.mdx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,21 @@ export default defineStack({
7373
| Form sections | `objects.<name>._sections.<section>` |
7474
| App navigation | `apps.<app>.navigation.<id>.label` |
7575
| Dashboards and widgets | `dashboards.<name>` |
76+
| Page labels and `page:header` copy | `pages.<name>.label` / `description` / `title` / `subtitle` |
7677
| Global actions, settings, messages | `globalActions`, `settings`, `messages` |
7778

78-
The metadata types resolved per request are **object, view, action, app, and
79-
dashboard** — a field's labels are translated as part of its object document.
79+
The metadata types resolved per request are **object, view, action, app,
80+
dashboard, and page** — a field's labels are translated as part of its object
81+
document.
82+
83+
<Callout type="info">
84+
**Page headers are keyed by page name (#3589).** A page's `page:header`
85+
component has no stable id, so its `properties.title` / `properties.subtitle`
86+
are addressed through the page itself: `pages.<name>.title` / `subtitle`.
87+
`title` falls back to `pages.<name>.label`, so a page whose header title
88+
matches its nav label needs only `label`. Every `page:header` in the page's
89+
regions receives the same copy.
90+
</Callout>
8091

8192
<Callout type="info">
8293
**One-shot result dialogs are translatable (#3347).** The post-success

0 commit comments

Comments
 (0)