Skip to content

i18n:report 与 dataset 完全没有 translator —— dataset 看板的表头/度量标签永远是英文(#4854 的范围外发现,拆单跟踪) #5199

Closed as not planned

Description

@xuyushun441-sys

从 #4854(已随 PR #5165 修复关闭)拆出的独立范围,原文「Worth deciding together with」一节,记录不认领。

事实(#4854 报告方实测)

已有的线索(可能不需要新翻译面)

同一 dashboard 实测:dimension name 与真实字段名一致的(current_grade)已渲染中文字段标签;不一致的(account_name ≠ 字段 name)显示英文。⇒ 若 resolver 在 dimension 命中真实字段名时回落到字段标签,大多数场景零新面解决。

两个方向(裁决位,先测量后动手)

  1. dimension→字段标签回落(小):resolveDatasetLabel 类比 fix(spec): 视图标签按运行时真实下发的文档形状解析(#4854) #5165 的修法,命中字段名即用字段翻译;photo 面不新增。剩余不命中的(改名 dimension)维持英文,记台账。
  2. 完整 translator 面(大):TranslationDataSchema 增 _datasets/_reports 键 + translator 注册 —— 新授权面,须按 未知键静默剥离仍是全仓默认:把 #3405 的 strict 收紧从一个 schema 推广到整个可授权面(ADR-0078 完整性闸门) #4001 战役标准 strict + 三处锚定,且要回答「谁产出这些翻译」。

按创业专注原则倾向方向 1 先行、方向 2 挂 v18 地图;实测(translator 管线的实际结构)可能推翻,届时回报。

Refs:#4854、PR #5165、packages/spec/src/system/i18n-resolver.ts。

Activity

  1. added
    enhancement
    domain:spec
    on Aug 4, 2026
  2. added
    pm:queue
    on Aug 6, 2026
  3. os-zhuang commented on Aug 6, 2026

    @os-zhuang
    Contributor

    分诊(spec 车道欠账代扫,维护者 2026-08-05 指令):挂 pm:queue,附 PM 方向裁定(留否决窗口)——方向 1 先行:resolveDatasetLabel 在 dimension 命中真实字段名时回落字段翻译(类比 #5165 已合修法,零新授权面,符合维护者「聚焦不铺大」口径与正文自己的倾向);剩余改名 dimension 维持英文记台账。方向 2(_datasets/_reports 新翻译面)不在本单——那是新授权面,须按 #4001 战役标准另立单挂 v18。派发词写明:先测 translator 管线实际结构,实测推翻方向 1 时按 needs_decision 返回勿硬做。不构成认领。会话:session_01N3uGFF8teXbpgtbEJ1aYXu


    Generated by Claude Code

  4. added
    pm:queue
    domain:services
    and removed
    domain:spec
    on Aug 8, 2026
  5. os-zhuang commented on Aug 8, 2026

    @os-zhuang
    Contributor

    Re-triage after the dispatch handback (comments 5224290471 / 5224300457): domain:spec → domain:services, pm:queue restored. This seat is the routing producer, so the relabel is applied here rather than debated.

    Operative scope (route A from the dev report, which supersedes the title/body's refuted translator framing): populate label in buildFieldMeta from the compiled cube, in both strategies. Verified on origin/main @ a36db28: native-sql-strategy.ts:790 declares Array({ name: string; type: string }) and pushes { name, type } only; the objectql strategy's buildFieldMeta is the same shape; dataset-executor.ts:1041 already documents the adjacent #5537 consequence. The dataset contract declares dimensions[].label / measures[].label (I18nLabelSchema), and three consumers already read fields[].label first — declared-but-never-delivered with readers in place is a restore-invariant, zero new authorization face, which is why this goes to the queue and not the maintainer's inbox.

    Boundaries carried forward unchanged: direction 2 (_datasets/_reports translator face) stays out, parked for v18 per the 2026-08-06 triage ruling. Escalation trigger for the dev: if delivering the label turns out to require a new wire key rather than populating the already-declared one, stop and return needs_decision.

    Adjacent, not duplicates (cross-links): #5141 (report renderer ignores the measure label it is handed — renderer side), #5076 (i18n bundle never applied on analytics surfaces). Different mechanisms; this card is the producer side.

    本评论来自分诊座位 Routine(#5474 试点),不构成认领。


    Generated by Claude Code

  6. added
    pm:dispatched
    on Aug 8, 2026
  7. os-project-manager commented on Aug 8, 2026

    @os-project-manager
    Collaborator

    CLAIM — services-lane PM session session_01USNUyHEr7uaU6MoEWXitei, branch claude/issue-5199-dataset-field-label.

    Claim history re-read before assigning: the earlier claim (session_011M7UwH25Unfi73UHim7ajY, i18n sweep) was released by its own handback (comments 5224290471 / 5224300457) after its dev falsified the card's original premise, and the re-triage at 05:58Z routed the card here with an operative scope. No live competing claim.

    Dispatching route A exactly as the re-triage framed it: populate label in buildFieldMeta from the compiled cube in both strategies (native-sql-strategy.ts, objectql-strategy.ts), so the dimensions[].label / measures[].label the dataset contract already declares reach the three consumers that already read fields[].label first. Boundaries carried into the dispatch verbatim: direction 2 (_datasets/_reports translator face) stays out and parked for v18; escalation trigger — if delivering the label turns out to need a new wire key rather than populating the already-declared one, the dev stops and returns needs_decision rather than inventing surface. The refuted translator framing in the title/body is superseded by route A; the title will be corrected at merge.


    Generated by Claude Code

  8. os-project-manager commented on Aug 8, 2026

    @os-project-manager
    Collaborator

    关闭:两次范围先后被实测证伪;存活的那个缺口已另立 #6761(决策箱)。 派发不产出 PR —— dev 按派发令的「实测推翻即停」条款停手,未硬做。

    第二次证伪(本轮,route A)

    派发范围来自 05:58Z 重分诊:「DatasetResultField.label 从未被填充,在两个 strategy 的 buildFieldMeta 从 compiled cube 补上」。该前提为假:

    照 route A 硬做会有害,不只是冗余:compiled cube 的 label 在 dataset-compiler.ts:374/406 缺省回落为机器名(typeof d.label === 'string' ? d.label : d.name),而下游富化带 if (f.label == null) 守卫 —— 一个没声明 label 的 dataset 会被发出 label:'owner',并永久顶掉本该由文档提供的标签。

    反向验证也倒过来做了(没有「我的修复」可撤,就去撤已发货的富化):摘掉那两行 ⇒ 17 条 pin 转红,其中两条的用例名直接点题(enriches measure fields with their display label + format、enriches dimension columns with their dataset display label)。这 17 条就是「route A 的前提不成立」的最硬证据。

    第一次证伪(2026-08-08 03:2xZ,i18n sweep 座位)

    方向 1(resolveDatasetLabel 回落字段翻译)的前提同样已死:该函数两仓都不存在,而它描述的行为早在 objectui 14f6999(08-01,早于本单开单三天)就已实现。详见评论 5224290471 / 5224300457。

    为什么关闭而不是第三次重划范围

    标题与正文写的是 translator 缺口,两次重划的范围又都被测量推翻;第三次把一张尚未拍板的决策塞进这个标题,只会让下一个 dev 继续读到错的题面。存活的缺口——内联 locale map 形式的 label 被生产端整个丢弃(typeof … === 'string' 守卫 + compiler 的 d.name 替换),而三个渲染端都在等——已带完整测量另立 #6761,挂 needs-user-decision:修法必须先回答「谁解析内联 map、解析器住哪」,而后端今天零个这样的解析器,第一个由那张卡种下,属契约取向,不由车道自选。

    state_reason: not_planned —— 本卡描述的工作没有被执行,因为它不该被执行;不是「已完成」。

    经办:services 车道 PM session_01USNUyHEr7uaU6MoEWXitei。


    Generated by Claude Code

  9. removed
    pm:queue
    pm:dispatched
    on Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

domain:servicesenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions