Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

detail.editFieldsInline renders two different labels depending on whether an I18nProvider is mounted — the defaults map says "Edit fields inline", the en pack says "Edit fields" #4401

Closed

Description

@yinlianghui

Found while implementing #4396 (adding six missing rows to the same maps). Not fixed there: #4396's scope is adding rows, and this is an existing row whose value disagrees with the pack.

The measurement

DETAIL_DEFAULT_TRANSLATIONS (packages/plugin-detail/src/useDetailTranslation.ts) is the value createSafeTranslation's fallback serves when no provider is mounted; the en pack is what i18next serves when one is. For one key they disagree:

key defaults map en pack
detail.editFieldsInline Edit fields inline Edit fields

So the same control is labelled "Edit fields inline" on a provider-less host (standalone embedding, the preview gallery, this package's own unit tests) and "Edit fields" in the console. Each path looks correct on its own, which is why no test catches it.

Scope — this is the only one

Scanned all three maps that #4396 touched, source rows against the evaluated pack:

plugin-detail  DETAIL_DEFAULT_TRANSLATIONS    rows 148  drifted 1  key-absent-from-pack 0
plugin-list    LIST_DEFAULT_TRANSLATIONS      rows  59  drifted 0  key-absent-from-pack 0
plugin-designer DESIGNER_DEFAULT_TRANSLATIONS rows 165  drifted 0  key-absent-from-pack 0

One drifted row in 372. The maps are in much better shape than the absence of a gate would suggest — which is the argument for pinning it now rather than letting it grow.

Why nothing catches it

Each map's docblock states the byte-identity contract; for these three nothing enforces it.

Two things to decide, hence no PR attached

  1. Which side is right. "Edit fields inline" (map) vs "Edit fields" (pack) is a copy decision, not a mechanical one — and if the pack wins, nine other locale packs already carry translations of "Edit fields" and stay as they are.
  2. Whether to generalize the gate. Extending the [i18n] PresenceAvatars 三处硬编码英文(控制台头部与记录详情实际在渲染) #3440 test's shape to these three maps is cheap now that the measured drift is 1. It would have to allow the deliberate exceptions the maps already carry (borrowed common.* rows, and plugin-detail's showEmptyRelated suffixed rows kept to mirror the packs' key set — see the comment at useDetailTranslation.ts), so it is a per-key comparison over the intersection, not a whole-map toEqual.

Related: #4396 (the six missing rows, same maps), #3440 (byte-identity precedent, collaboration only), #4294 (pinned list.sortRelationalHint byte-for-byte by hand for exactly this reason), #3865 / PR #4372 (the census that surfaced the family).


Generated by Claude Code

Activity

  1. self-assigned this
    on Aug 12, 2026
  2. yinlianghui commented on Aug 12, 2026

    @yinlianghui
    ContributorAuthor

    CLAIM + RULING — PM seat session_017Qqyix2QcnpUC9XeYVDzx3, branch claude/issue-4401-map-pack-mirror, one dev agent, one PR, Fixes #4401. Both open decisions ruled (delegated authority, veto window open):

    1. The pack wins. The map row becomes Edit fields — three reasons in descending weight: the pack is what every provider-mounted user actually sees (the console, i.e. essentially all production traffic); nine other locale packs already translated the pack's copy, so the map is outvoted 10-to-1 on what this key means; and each map's own docblock states the mirror contract in the map→pack direction. The provider-less label shortening by one word is a cosmetic cost consistency pays gladly.
    2. Generalize the gate now — the measured drift of 1-in-372 is the cheapest moment it will ever be. Shape per the card's own analysis: per-key comparison over the map∩pack intersection (NOT whole-map toEqual), with the deliberate exceptions graded explicitly in the test (borrowed common.* rows compare against their own pack keys; plugin-detail's showEmptyRelated suffixed rows handled per their mirror rationale; any row whose key the pack lacks is itself a finding, not an exception). Model: the [i18n] PresenceAvatars 三处硬编码英文(控制台头部与记录详情实际在渲染) #3440 collaboration test's shape, one suite covering all three maps. Guard-class → The report config panel is titled "Title" and the empty state says "Object Not Found" — call sites asking for a key whose value is not the copy for that slot #4118 pre-fix red against the unfixed editFieldsInline row required.

    Dispatch gate: branch only after PR #4402 (which added six rows to these same maps) is in origin/main — poll.


    Generated by Claude Code

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