Skip to content

Commit af05937

Browse files
committed
docs(i18n): re-measure the extractor-config note now that the walk reaches under slots; declare the platform-objects bundle rows
The platform-objects extract config explained its missing `pages` key by the shared walk rooting at `regions[].components[]` only. The walk now also roots at `slots.<slot>`, so the reason moved: it reaches every component on the three shipped record pages, and none of them carries an `id`, so the extractor still offers the page label alone. The changeset gains `@objectstack/platform-objects` — its shipped Setup bundles carry the new `dashboards.system_overview.globalFilters.created_at.label` row. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016N6xmWt5hYm94ffVEwGH8x
1 parent 718bff0 commit af05937

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

.changeset/i18n-slotted-pages-and-global-filters.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
"@objectstack/spec": minor
33
"@objectstack/cli": patch
4+
"@objectstack/platform-objects": patch
45
---
56

67
Two surfaces the console renders that no translation bundle could address — a `kind: 'slotted'` page's components and a dashboard's global-filter bar — are now addressable (#16772).
@@ -13,3 +14,5 @@ Two surfaces the console renders that no translation bundle could address — a
1314
**`dashboards.<name>.globalFilters.<key>` is a new bundle group.** A dashboard's filter bar draws directly above the widget titles the bundle has always translated, and neither a filter's label nor its static option labels had a key. The group is keyed by the filter's `name` (`GlobalFilterSchema.name`, declared as defaulting to `field` — a filter that authors no `name` is keyed by its `field`) and carries `label` and an `options.<value>` map keyed by the option `value` spelled as a string. `translateDashboard` overlays it on the served document, which is what objectui's filter bar already reads; the exported `globalFilterKey()` is the one key derivation both the resolver and the extractor use. `optionsFrom` options are fetched rows and are deliberately not addressable.
1415

1516
**`@objectstack/cli`:** `os i18n extract` offers `dashboards.<name>.globalFilters.<key>.label` / `.options.<value>` for every static filter, and `pages.<name>.title` / `.subtitle` for a `page:header` at any root (a slotted page's `slots.header` included) — the component keys under `slots` and tab panels follow from the shared walk with no extractor change.
17+
18+
**`@objectstack/platform-objects`:** the shipped Setup bundles (`en`, `zh-CN`, `ja-JP`, `es-ES`) carry the new `dashboards.<name>.globalFilters.created_at.label` entry for the system-overview dashboard's date-range filter, which authors no `name` and is therefore keyed by its `field`.

packages/platform-objects/scripts/i18n-extract.config.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,15 @@
7676
* the part worth writing down: measured through the real
7777
* `collectExpectedEntries`, the three offer exactly THREE keys between
7878
* them (one page-level `label` each). All three author `regions: []` and
79-
* put every component under `slots.*`, and the shared walk
79+
* put every component under `slots.*`. Since #16772 the shared walk
8080
* (`walkAddressedPageComponents`, `@objectstack/spec/system`) roots at
81-
* `regions[].components[]` -- so 45 further authored copy sites, every one
82-
* an inline `{ en, 'zh-CN', ... }` locale map, have no bundle face to be
83-
* counted against. A config-only change would declare pages the walk still
84-
* cannot see: it would look like a fix and measure nothing.
81+
* `slots.<slot>` as well as `regions[].components[]`, so it now REACHES
82+
* every one of those components -- and not one of them carries an `id`,
83+
* so none is addressable by `pages.<name>.components.<id>`: the 45
84+
* further authored copy sites, every one an inline `{ en, 'zh-CN', ... }`
85+
* locale map, still have no bundle face to be counted against. A
86+
* config-only change would declare pages that offer nothing beyond their
87+
* label: it would look like a fix and measure nothing.
8588
*
8689
* Their gate is `packages/cli/test/platform-page-i18n-parity.test.ts`,
8790
* which owns both halves from the other side -- a `pages.*` bundle entry

0 commit comments

Comments
 (0)