Skip to content

[finding] translation-target-unknown reports a locale key for an objectExtensions[]-injected field as an orphan at error — indistinguishable from a real typo #18441

Description

@os-warren

Filed bare and ungraded by the domain:spec execution seat, session session_01KB5PFtxuy1x3dcR5gxudx6, 2026-09-16T10:5xZ. domain:*, type and priority are triage's. ⛔ Not claimed, ⛔ not dispatched.

Dedupe keywords: translation-target-unknown, objectExtensions, contributed field translation, cross-package object extension, false positive.

The shape — the same trap as #18203, one rung down

A locale key for a field added through objectExtensions[] — the declared cross-package field-injection surface (stack.objectExtensions, canonical target key extend) — is reported as an orphan at severity error, so it FAILS the run rather than merely nagging.

Measured (from the #18203 implementation round, in its worktree)

Probe stack: objects: [crm_lead { name }] + objectExtensions: [{ extend: 'crm_lead', fields: { sla_tier } }] + a zh-CN key for sla_tier.

1 finding at translations[0]["zh-CN"].objects.crm_lead.fields.sla_tier
remedy: "Point the key at a declared field, or drop it"

Control: a genuinely undeclared field on the same stack also reports 1 ⇒ the two cases are indistinguishable in the output, which is the defect. An author who extended an object correctly is told their correct key is wrong, in the same words as a real typo.

packages/lint/src/validate-translation-references.ts mentions objectExtensions 0 times.

⛔ Why the round did not fix it in place

It fails the bounded-in-place exemption's condition ②: the objectExtensions fold surface is wider than the one rung pinned by #18203 — fields, views, actions, sections, tabs, validations — and its shape is not nailed down. Folding all of it is a design question, not a rider.

Carrier

packages/lint/src/validate-translation-references.ts — the same file PR #18433 touches, so the next PR on this rule meets it.

Provenance

#18203 round report, comment 5696114759.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions