Skip to content

Commit 4abffa0

Browse files
committed
chore(changeset): spec patch for form view section translation
Claude-Session: https://claude.ai/code/session_01HjR8RUwTPQ3TgbfKihmxp9 Co-authored-by: Claude <noreply@anthropic.com>
1 parent cdbe1c0 commit 4abffa0

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
fix(spec): `translateView` localizes a form view's `sections` through `objects.OBJECT._sections.NAME` (#23632)
6+
7+
A served form view (`viewKind: 'form'`) carries its sections at `config.sections`. `translateView`, and `translateMetadataDocument('view', …)` that dispatches to it, translated the view's `label`, `description` and `config.bulkActionDefs`, and never a section. So a reader that translates on the caller's behalf served every section heading as authored, beside translated field labels. The anonymous public form is one: its visitor cannot load the translation bundle.
8+
9+
Each named section's `label` and `description` now resolve through `objects.OBJECT._sections.NAME.label` / `.description`, the key `TranslationDataSchema` already declares and `os i18n extract` already scaffolds. They use the same locale chain as every other resolver here (requested locale, then the declared `fallbackChain`, never walked for the `defaultLocale`):
10+
11+
- A missing key keeps the authored text.
12+
- A section with no `name` has no key and is served exactly as authored.
13+
- Only authored copy is translated. A section that authors no `label` or no `description` gains neither from the bundle.
14+
- The form's own `data.object` binding decides the object, before the view's, as the extractor and the translation linter already bind it.
15+
- An explicit override beats the catalog, by the rule the view's other strings follow (ADR-0029 D9.2a). Given `packagedBase`, a section whose string diverged from the packaged section of the same `name` keeps its string. A section the base does not carry keeps its strings.
16+
17+
No export, parameter or type changes. Every caller of `translateView` / `translateMetadataDocument('view', …)` now receives a form view's section copy in the requested locale.
18+
19+
Clause-②: no

0 commit comments

Comments
 (0)