Skip to content

Commit f3e92ee

Browse files
committed
wip(i18n): regenerate spec artifacts; re-measure the platform-page boundary pin
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016N6xmWt5hYm94ffVEwGH8x
1 parent d535eaf commit f3e92ee

5 files changed

Lines changed: 40 additions & 28 deletions

File tree

content/docs/references/api/protocol.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1575,7 +1575,7 @@ The published metadata item body, opaque by ruling (1C). Shape is the item's own
15751575
| **apps** | `Record<string, { label: string; description?: string; navigation?: Record<string, object> }>` | optional | App translations keyed by app name |
15761576
| **messages** | `Record<string, string>` | optional | UI message translations keyed by message ID |
15771577
| **globalActions** | `Record<string, { label?: string; description?: string; confirmText?: string; successMessage?: string; … }>` | optional | Global action translations keyed by action name |
1578-
| **dashboards** | `Record<string, { label?: string; description?: string; actions?: Record<string, object>; widgets?: Record<string, object> }>` | optional | Dashboard translations keyed by dashboard name |
1578+
| **dashboards** | `Record<string, { label?: string; description?: string; actions?: Record<string, object>; widgets?: Record<string, object>; … }>` | optional | Dashboard translations keyed by dashboard name |
15791579
| **datasets** | `Record<string, { label?: string; description?: string; dimensions?: Record<string, object>; measures?: Record<string, object> }>` | optional | Analytics dataset translations keyed by dataset name |
15801580
| **pages** | `Record<string, { label?: string; description?: string; title?: string; subtitle?: string; … }>` | optional | Page translations keyed by page name |
15811581
| **flows** | `Record<string, { label?: string; screens?: Record<string, object> }>` | optional | Screen-flow translations keyed by flow name |

content/docs/references/system/translation.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ Translation data for objects, apps, and UI messages
232232
| **apps** | `Record<string, { label: string; description?: string; navigation?: Record<string, object> }>` | optional | App translations keyed by app name |
233233
| **messages** | `Record<string, string>` | optional | UI message translations keyed by message ID |
234234
| **globalActions** | `Record<string, { label?: string; description?: string; confirmText?: string; successMessage?: string; … }>` | optional | Global action translations keyed by action name |
235-
| **dashboards** | `Record<string, { label?: string; description?: string; actions?: Record<string, object>; widgets?: Record<string, object> }>` | optional | Dashboard translations keyed by dashboard name |
235+
| **dashboards** | `Record<string, { label?: string; description?: string; actions?: Record<string, object>; widgets?: Record<string, object>; … }>` | optional | Dashboard translations keyed by dashboard name |
236236
| **datasets** | `Record<string, { label?: string; description?: string; dimensions?: Record<string, object>; measures?: Record<string, object> }>` | optional | Analytics dataset translations keyed by dataset name |
237237
| **pages** | `Record<string, { label?: string; description?: string; title?: string; subtitle?: string; … }>` | optional | Page translations keyed by page name |
238238
| **flows** | `Record<string, { label?: string; screens?: Record<string, object> }>` | optional | Screen-flow translations keyed by flow name |
@@ -283,6 +283,7 @@ Translation data for a single object
283283
| **description** | `string` | optional | Translated dashboard description |
284284
| **actions** | `Record<string, { label?: string }>` | optional | Header action label translations keyed by action url/key |
285285
| **widgets** | `Record<string, { title?: string; description?: string; subCaption?: string }>` | optional | Widget translations keyed by widget id |
286+
| **globalFilters** | `Record<string, { label?: string; options?: Record<string, string> }>` | optional | Global-filter translations keyed by the filter `name` (a filter that authors no `name` is keyed by its `field`) |
286287

287288
### Nested Shape: `TranslationData.datasets[string]`
288289

@@ -382,7 +383,7 @@ One locale of translations — the `translation` metadata type
382383
| **apps** | `Record<string, { label: string; description?: string; navigation?: Record<string, object> }>` | optional | App translations keyed by app name |
383384
| **messages** | `Record<string, string>` | optional | UI message translations keyed by message ID |
384385
| **globalActions** | `Record<string, { label?: string; description?: string; confirmText?: string; successMessage?: string; … }>` | optional | Global action translations keyed by action name |
385-
| **dashboards** | `Record<string, { label?: string; description?: string; actions?: Record<string, object>; widgets?: Record<string, object> }>` | optional | Dashboard translations keyed by dashboard name |
386+
| **dashboards** | `Record<string, { label?: string; description?: string; actions?: Record<string, object>; widgets?: Record<string, object>; … }>` | optional | Dashboard translations keyed by dashboard name |
386387
| **datasets** | `Record<string, { label?: string; description?: string; dimensions?: Record<string, object>; measures?: Record<string, object> }>` | optional | Analytics dataset translations keyed by dataset name |
387388
| **pages** | `Record<string, { label?: string; description?: string; title?: string; subtitle?: string; … }>` | optional | Page translations keyed by page name |
388389
| **flows** | `Record<string, { label?: string; screens?: Record<string, object> }>` | optional | Screen-flow translations keyed by flow name |
@@ -443,6 +444,7 @@ Translation data for a single object
443444
| **description** | `string` | optional | Translated dashboard description |
444445
| **actions** | `Record<string, { label?: string }>` | optional | Header action label translations keyed by action url/key |
445446
| **widgets** | `Record<string, { title?: string; description?: string; subCaption?: string }>` | optional | Widget translations keyed by widget id |
447+
| **globalFilters** | `Record<string, { label?: string; options?: Record<string, string> }>` | optional | Global-filter translations keyed by the filter `name` (a filter that authors no `name` is keyed by its `field`) |
446448

447449
### Nested Shape: `TranslationItem.datasets[string]`
448450

packages/cli/test/platform-page-i18n-parity.test.ts

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import {
2929
import { CONNECT_AGENT_UI_BUNDLE } from '@objectstack/mcp';
3030
import { SetupAppTranslations } from '@objectstack/platform-objects';
3131
import * as PlatformPages from '@objectstack/platform-objects/pages';
32-
import { PAGE_COMPONENT_COPY_KEYS, translatePage } from '@objectstack/spec/system';
32+
import { PAGE_COMPONENT_COPY_KEYS, translatePage, walkAddressedPageComponents } from '@objectstack/spec/system';
3333
import { collectExpectedEntries } from '../src/utils/i18n-extract.js';
3434

3535
/** The pages exactly as the plugins register them with the kernel. */
@@ -791,31 +791,35 @@ describe('shipped platform record pages -- i18n ownership (#14817)', () => {
791791
expect(SHIPPED_LOCALES.length).toBeGreaterThan(1);
792792
});
793793

794-
it('records that the extractor now reaches under `slots` — and that every site it reaches there is an inline locale map with no seed', () => {
795-
// A BOUNDARY PIN, not an endorsement — moved, not removed. Until #16772
796-
// this pinned `offered: ['label']`: the shared walk rooted at
797-
// `regions[].components[]`, these pages author `regions: []`, and the 45
798-
// inline sites under `slots.*` had no bundle face. #16772 widened the
799-
// walk to the `slots.<slot>` roots and to `items[].children`, so the
800-
// notice the old pin promised has fired, and this is the answer to it:
801-
// these pages' copy is authored as inline locale maps (the ruled route for
802-
// page copy, judged complete by the next case), so what the extractor
803-
// offers for them is a set of `inlineLocales` rows — authored-with-no-
804-
// seed, never a string to translate. The bundle surface they gained
805-
// therefore needs NO entries, and their coverage home stays this file.
806-
// What this pin holds: the reach is real (more than the label alone), and
807-
// it exposes no seeded string for a translator to be asked for.
794+
it('records that the walk now reaches under `slots`, that these pages author no component id there, and so the extractor still offers the label alone', () => {
795+
// A BOUNDARY PIN, not an endorsement — re-measured, and the reason moved.
796+
// Until #16772 `offered: ['label']` held because the shared walk rooted at
797+
// `regions[].components[]` and these pages author `regions: []`: the 45
798+
// inline sites under `slots.*` were UNREACHABLE. #16772 widened the walk
799+
// to the `slots.<slot>` roots and to `items[].children`, and the notice the
800+
// old pin promised fired — so this is the answer to it, measured off the
801+
// documents: the walk now VISITS every component under `slots` (`reached`
802+
// below), and not one of them carries an `id`, so nothing is addressable
803+
// by `pages.<name>.components.<id>` and the extractor still offers the
804+
// page label alone. These pages gained no bundle surface, need no entries,
805+
// and their coverage home stays this file (the inline-map case below).
806+
// Both halves are held so the next change is told precisely: `reached`
807+
// reds if the roots narrow again; `offered` grows the day one of these
808+
// components takes an id, and that component then needs a bundle entry.
808809
for (const page of RECORD_PAGES) {
809-
const entries = collectExpectedEntries({ pages: [page] } as any)
810-
.filter((e) => e.path[0] === 'pages' && e.path[1] === page.name);
811-
const offered = entries.map((e) => e.path.slice(2).join('.')).sort();
812-
expect(page.regions).toEqual([]);
813-
expect(offered).toContain('label');
814-
expect(offered.filter((k) => k.startsWith('components.')).length).toBeGreaterThan(0);
815-
const seeded = entries
816-
.filter((e) => e.path[2] === 'components' && e.inline !== undefined)
817-
.map((e) => e.path.slice(2).join('.'));
818-
expect({ page: page.name, seededUnderSlots: seeded }).toEqual({ page: page.name, seededUnderSlots: [] });
810+
let visited = 0;
811+
let addressed = 0;
812+
walkAddressedPageComponents(page as any, (component, ctx) => {
813+
visited += 1;
814+
if (ctx.addressed) addressed += 1;
815+
return component;
816+
});
817+
const offered = collectExpectedEntries({ pages: [page] } as any)
818+
.filter((e) => e.path[0] === 'pages' && e.path[1] === page.name)
819+
.map((e) => e.path.slice(2).join('.'))
820+
.sort();
821+
expect({ page: page.name, regions: page.regions, reached: visited > 0, addressed, offered })
822+
.toEqual({ page: page.name, regions: [], reached: true, addressed: 0, offered: ['label'] });
819823
}
820824
});
821825

packages/spec/api-surface/system.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"ActionResultDialogTranslationSchema (const)",
1313
"AddFieldOperation (const)",
1414
"AddressedPageComponentContext (interface)",
15+
"AddressedPageRoots (type)",
1516
"AdvancedAuthConfig (type)",
1617
"AdvancedAuthConfigSchema (const)",
1718
"AnalyzerConfig (type)",
@@ -266,6 +267,7 @@
266267
"FlowScreenLike (interface)",
267268
"GCounter (type)",
268269
"GCounterSchema (const)",
270+
"GlobalFilterLike (interface)",
269271
"HistogramBucketConfig (type)",
270272
"HistogramBucketConfigSchema (const)",
271273
"HttpDestinationConfig (type)",
@@ -778,6 +780,7 @@
778780
"docAudienceAllows (function)",
779781
"emailTemplateForm (const)",
780782
"gcsStorageExample (const)",
783+
"globalFilterKey (function)",
781784
"hasObservedDeviation (function)",
782785
"hasPlatformObjectPrefix (function)",
783786
"inProcessServiceMessage (function)",

packages/spec/export-origins/system.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"ActionResultDialogTranslationSchema": "src/system/translation.zod.ts#ActionResultDialogTranslationSchema (const)",
1313
"AddFieldOperation": "src/system/migration.zod.ts#AddFieldOperation (const)",
1414
"AddressedPageComponentContext": "src/system/i18n-resolver.ts#AddressedPageComponentContext (interface)",
15+
"AddressedPageRoots": "src/system/i18n-resolver.ts#AddressedPageRoots (type)",
1516
"AdvancedAuthConfig": "src/system/auth-config.zod.ts#AdvancedAuthConfig (type)",
1617
"AdvancedAuthConfigSchema": "src/system/auth-config.zod.ts#AdvancedAuthConfigSchema (const)",
1718
"AnalyzerConfig": "src/system/search-engine.zod.ts#AnalyzerConfig (type)",
@@ -258,6 +259,7 @@
258259
"FlowScreenLike": "src/system/i18n-resolver.ts#FlowScreenLike (interface)",
259260
"GCounter": "src/system/collaboration.zod.ts#GCounter (type)",
260261
"GCounterSchema": "src/system/collaboration.zod.ts#GCounterSchema (const)",
262+
"GlobalFilterLike": "src/system/i18n-resolver.ts#GlobalFilterLike (interface)",
261263
"HistogramBucketConfig": "src/system/metrics.zod.ts#HistogramBucketConfig (type)",
262264
"HistogramBucketConfigSchema": "src/system/metrics.zod.ts#HistogramBucketConfigSchema (const)",
263265
"HttpDestinationConfig": "src/system/logging.zod.ts#HttpDestinationConfig (type)",
@@ -739,6 +741,7 @@
739741
"docAudienceAllows": "src/system/book.zod.ts#docAudienceAllows (function)",
740742
"emailTemplateForm": "src/system/email-template.form.ts#emailTemplateForm (const)",
741743
"gcsStorageExample": "src/system/object-storage.zod.ts#gcsStorageExample (const)",
744+
"globalFilterKey": "src/system/i18n-resolver.ts#globalFilterKey (function)",
742745
"hasObservedDeviation": "src/system/migration.zod.ts#hasObservedDeviation (function)",
743746
"hasPlatformObjectPrefix": "src/system/constants/platform-object-names.ts#hasPlatformObjectPrefix (function)",
744747
"inProcessServiceMessage": "src/system/core-services.zod.ts#inProcessServiceMessage (function)",

0 commit comments

Comments
 (0)