Skip to content

Commit 150df00

Browse files
committed
docs+changeset: an extension's rename takes the stale plural off
Claude-Session: https://claude.ai/code/session_01Utp6CYaDMYnWxbm95qon7G Co-authored-by: Claude <noreply@anthropic.com>
1 parent bbc870c commit 150df00

3 files changed

Lines changed: 25 additions & 2 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@objectstack/objectql': minor
3+
'@objectstack/rest': minor
4+
---
5+
6+
fix(objectql,rest)!: an object extension that renames `label` and sets no `pluralLabel` is served without the base's plural, so list titles stop showing the old name (#30391)
7+
8+
Clause-②: no (narrowing) — `/meta/object` (item and list reads, both transports) and every registry read of an object (`SchemaRegistry.getObject`, the fold) stop serving `pluralLabel` for an object an extension renames without a plural of its own, where they served the base's plural (and, in a translated locale, the base's translation of it). The shipped showcase's `showcase_account` is one: its extension renames it `Account (Success Overlay)` and declares no plural. Nothing an author writes is refused.
9+
Metadata-protocol: semantic
10+
Skills-docs: follow-up — `skills/objectstack-data/SKILL.md` "Object Extension Model" says an extension "can add but never remove"; a renaming `label` now takes the base's `pluralLabel` off. The sentence wants that exception (outside this change's surface).
11+
12+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped: an object extension declares `label` and `pluralLabel` exactly as before. What moves is the plural an object is served with when an extension renames it without one, and nothing at rest records that answer, so there is nothing for a migration to rewrite. -->
13+
14+
**BREAKING** served-value narrowing for an object an extension renames.
15+
16+
- **Before.** An `objectExtensions` entry or a `.custom` `object_extension` item that set `label` and no `pluralLabel` was folded with the new label and the base's `pluralLabel`. A translated read served the base package's translation of that plural (`objects.NAME.pluralLabel`), so a list title, read plural first, kept the old name in every locale.
17+
- **Now.** `pluralLabel` is the plural of `label`: such an extension is served as an object that declares no `pluralLabel`, in every locale, so a list titles it by its label. Where the owning package's `.custom` pair saves its own translation of `objects.NAME.pluralLabel`, that translation is served (ruling record 6631250894: a translation in the pair, then the override's own text, then the base's translation).
18+
- **Unchanged.** An extension that sets `pluralLabel` is served with it. One that sets no `label`, or repeats the label it extends, keeps the base's plural and its translation. A plural the tenant set stays, and a tenant's own rename yields as before (ADR-0029 D9.2a). An object no extension renames is served as before. The packaged base the translators compare against keeps its plural.
19+
20+
**FROM → TO.** `defineObjectExtension({ extend: 'crm_task', label: 'Work Item' })` → add `pluralLabel: 'Work Items'` to serve a plural for the new name; a `.custom` pair can also save `objects.crm_task.pluralLabel` in its own `translation` item for a translated locale.

‎content/docs/data-modeling/object-extensions.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ check that spelling first.
6666
| `fieldPatches` | **Applied, field by field.** Changes the *display* of one of the target's own fields — never one an extension adds — without replacing it — [below](#relabelling-a-vendor-field). |
6767
| `validations` | **Concatenated.** Your rules run alongside the owner's; neither replaces the other. |
6868
| `indexes` | **Concatenated**, same as validations. |
69-
| `label` | Replaces the target's label — with one exception, [below](#extensions-and-tenant-customization). |
69+
| `label` | Replaces the target's label — with one exception, [below](#extensions-and-tenant-customization). A new `label` with no `pluralLabel` beside it also takes the target's plural off, since that plural names the old label: the object is served as one that declares no plural, and lists title it by its label. Set `pluralLabel` too to serve one. A plural the tenant set stays. |
7070
| `pluralLabel` | Same as `label`. |
7171
| `description` | Same as `label`. |
7272
| `priority` | Not merged — it *orders* the merge. `0`–`999`, default `200`. |

‎content/docs/ui/translations.mdx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,10 @@ in no package. `GET /meta/:type/:name`, `GET /meta/:type` and the book tree
235235
Objects follow the same rule for their `label`, `pluralLabel` and
236236
`description`: a value that differs from the owning package's declaration (a
237237
label an [object extension](/docs/data-modeling/object-extensions) contributes,
238-
for one) is served as written.
238+
for one) is served as written. An extension that renames the object and sets
239+
no `pluralLabel` is served with no plural in every locale, since the catalog's
240+
`pluralLabel` translates the old name, unless the owning package's `.custom`
241+
pair saves a translation of `objects.<name>.pluralLabel`: that one is served.
239242

240243
An object's validation rule messages follow it too, on both places a reader
241244
sees them: the error a rejected write returns, and the rule served with the

0 commit comments

Comments
 (0)