Skip to content

Commit 51babcf

Browse files
os-litantclaude
andauthored
docs(rest): drop the hand-written translatable-type list from meta-plural-i18n's header (#16461)
The file header restated `METADATA_DOCUMENT_TRANSLATORS`' keys by hand as `view` / `action` / `object` / `app` / `dashboard` / `page` — six, where the table has seven since `translateDataset` registered (#14253). It is the header of the test that pins the translatable-type predicate, so it is the first thing a reader consults before touching that predicate, and it understated the set. The enumeration is deleted rather than corrected: a corrected restatement rots again on the next registration, which is the whole finding. The sentence's point is that the keys are SINGULAR, which needs no list to make, and the two clauses above already name both `TRANSLATABLE_METADATA_TYPES` and `METADATA_DOCUMENT_TRANSLATORS` — where a reader should be sent. The table's own doc comment states the rule: "Derived from the dispatch table — never restate it." Same disposition #15863 took on the identical defect class in `rest-server.ts`. Re-derived rather than inherited: the dispatch table's keys, read out of `packages/spec/src/system/i18n-resolver.ts` with the TypeScript AST rather than by eye, are count=7 ["view","action","object","app","dashboard","dataset", "page"]. The extractor's positive control is a scratch copy with the `dataset` row deleted, on which the same extractor reports 6 — so the 7 is a measurement, not a constant printed back. Comment-only: every changed line is inside the file's leading block comment, so the token stream is unchanged. Claude-Session: https://claude.ai/code/session_01D47qPfEWVPmhguWgBZCi5N Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7bdc833 commit 51babcf

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

packages/rest/src/meta-plural-i18n.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
* `translateMetaItem` / `translateMetaItems` decide "does this type translate"
88
* by asking `isTranslatableMetaType`, which reads
99
* `TRANSLATABLE_METADATA_TYPES` — a set DERIVED (#3786) from
10-
* `METADATA_DOCUMENT_TRANSLATORS`' keys, and those keys are singular-only:
11-
* `view` / `action` / `object` / `app` / `dashboard` / `page`. The `/meta`
12-
* handlers were handing those helpers the RAW `:type` path segment, while
13-
* Prime Directive #3 makes PLURAL the canonical REST spelling
10+
* `METADATA_DOCUMENT_TRANSLATORS`' keys, and those keys are singular-only. The
11+
* `/meta` handlers were handing those helpers the RAW `:type` path segment,
12+
* while Prime Directive #3 makes PLURAL the canonical REST spelling
1413
* (`/api/v1/meta/apps`). So the documented spelling missed the set, the
1514
* predicate answered `false`, and the entire localization was skipped: the
1615
* same route, the same document, the same `Accept-Language`, two answers.

0 commit comments

Comments
 (0)