From 1fa2dc5597427e548bdac5d43d3c59daf4fdb89c Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 7 Sep 2026 01:59:02 +0000 Subject: [PATCH] docs(rest): drop the hand-written translatable-type list from meta-plural-i18n's header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01D47qPfEWVPmhguWgBZCi5N --- packages/rest/src/meta-plural-i18n.test.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/rest/src/meta-plural-i18n.test.ts b/packages/rest/src/meta-plural-i18n.test.ts index 27fa1ee82b..ae703aa17f 100644 --- a/packages/rest/src/meta-plural-i18n.test.ts +++ b/packages/rest/src/meta-plural-i18n.test.ts @@ -7,10 +7,9 @@ * `translateMetaItem` / `translateMetaItems` decide "does this type translate" * by asking `isTranslatableMetaType`, which reads * `TRANSLATABLE_METADATA_TYPES` — a set DERIVED (#3786) from - * `METADATA_DOCUMENT_TRANSLATORS`' keys, and those keys are singular-only: - * `view` / `action` / `object` / `app` / `dashboard` / `page`. The `/meta` - * handlers were handing those helpers the RAW `:type` path segment, while - * Prime Directive #3 makes PLURAL the canonical REST spelling + * `METADATA_DOCUMENT_TRANSLATORS`' keys, and those keys are singular-only. The + * `/meta` handlers were handing those helpers the RAW `:type` path segment, + * while Prime Directive #3 makes PLURAL the canonical REST spelling * (`/api/v1/meta/apps`). So the documented spelling missed the set, the * predicate answered `false`, and the entire localization was skipped: the * same route, the same document, the same `Accept-Language`, two answers.