Skip to content

Analytics surfaces resolve select-option labels but never apply the i18n bundle — reports and dashboards show English while lists and forms show the translation #4030

Description

@os-zhuang

Migrated from objectstack-ai/objectstack#5076 under the file-at-destination ruling (objectstack-ai/objectstack#7167, maintainer 2026-08-10). Originally filed 2026-08-04T02:20:50Z. The full prior thread — including triage rulings and hold/restart conditions — remains on the source issue and MUST be read before acting on this card.


Summary

Report blocks and dashboard widgets render a select field's option label from the object's hardcoded label, ignoring the locale bundle. The same field on a list view or a form renders the translated label correctly. The result is one screen showing a value two different ways.

Evidence

stored value analytics surface shows object label zh-CN bundle
sales_channel domestic Domestic 'Domestic' '国内'
competitor_name cabot Cabot 'Cabot' '卡博特'
competitor_name orion Orion Engineered Carbons 'Orion Engineered Carbons' '欧励隆'

The decisive row is orion: the rendered string Orion Engineered Carbons bears no resemblance to the stored value orion, but matches the object's English label verbatim. So the analytics path does resolve the option label — it simply does not run it through the i18n bundle before display. (domestic → Domestic differs only in case, which is why this was initially and wrongly diagnosed as "the report groups by stored value".)

Same page, same records: the related list renders 卡博特 / 欧励隆 while the chart legend renders Cabot / Orion Engineered Carbons. The dashboard's global filter control also renders Sales Channel: untranslated.

Reproduce

  1. Declare a select field with English option labels and provide zh-CN translations for those options.
  2. Put the field on a list view and as a dimension in a report block or dashboard widget.
  3. Load the console with browser locale zh-CN. The list shows Chinese; the report/dashboard shows the object's English labels.

No authoring knob exists

DatasetDimension is exactly { name, label, field, type, dateGranularity }, and type is string | number | boolean | date | lookup — there is no select. The report config carries nothing for this either. So an app cannot opt into translated option labels on these surfaces.

Downstream impact

The only app-side fix is to write the option labels in Chinese in the object, which then renders Chinese for every locale — including the ones where the list side currently resolves correctly. That is a real loss, not a no-op, and it is the workaround we have been forced to take.

Environment

@objectstack/* protocol ^17.0.0-rc.1, console from @objectstack/console, driver-sql on SQLite, browser locale zh-CN.

Filed from a downstream app (hotcrm-heimao), tracked there as issue #55. Likely related to the view/report/dataset label translation gap we filed separately.

Activity

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

    @yinlianghui
    Collaborator

    CLAIM — session session_017Qqyix2QcnpUC9XeYVDzx3(objectui whole-repo PM seat),dispatching now。Branch: claude/issue-4030-analytics-option-i18n。

    按源线程(objectstack#5076)分诊裁决执行:analytics 面已能解析 option label(orion 行为证),缺的是解析结果过 i18n bundle——修复在 objectui analytics 渲染路径。派单要点:

    1. 唯一解析通道令:list/form 面已经正确渲染 卡博特/欧励隆——先找到那条既有的 option-label 翻译通道(fix(fields): lookup「浏览全部记录」记录选择器 select 列按 schema options 解析 label(#3333) #3347 的 fieldsMeta 解析路径为同族参考,Action confirm dialog ignores the bundle's translated confirmText — label from the SAME entry is applied, confirmText is not #4265 刚落的 useObjectLabel 家族为键约定参考),analytics 面复用它,不得为图表再造一条 per-locale 方言。dashboard 全局过滤控件的字段名("Sales Channel:")同 PR 核查,同通道。
    2. 地形注意:本周落的 fix(analytics): resolve a dotted dimension's select options against the relationship target #4261(resolveDimensionFieldOptions)/fix(dashboard): resolve a dotted dimension's labels on table and pivot dataset widgets #4273(relabelDimensions)/fix(plugin-dashboard): draw an authored combo as a combo on the dataset path (#4229) #4298(mergeAuthoredPresentation)构成了 analytics 标签网——i18n 应用应搭在这张网的出口上,其既有 pin 必须原样绿。
    3. contract 停车条件(源线程原文):若闭环必须给 spec DatasetDimension 增加 select 类型,停下报 needs_decision 做 contract-first 拆分,不许在本卡顺手改 spec。

    Surface:packages/plugin-dashboard / packages/plugin-report / packages/core chart-series 标签网出口 + 测试;均无在飞持有者。互斥:不碰 #4281 持有的 components action renderers、#4235 持有的 app-shell home 面、#4040-t2 持有的 plugin-grid/plugin-form/i18n。


    Generated by Claude Code

  3. yinlianghui commented on Aug 11, 2026

    @yinlianghui
    Collaborator

    ACCEPT(partial,残差分别立卡) — PM review of record (session session_017Qqyix2QcnpUC9XeYVDzx3)。

    PR #4324 验收要点:

    残差处置(代决):

    1. table/pivot 上的 LOCAL select 维度仍英文(server 已解析、Analytics: the dataset widget's client-side dimension-label resolution is disabled for table / pivot / metric widgets, so a dotted dimension there still renders raw stored values #4263 的落地 pin 明令该路径零元数据读)——裁:值得有意修订该边界,单独立卡(见下条链接),把 local select 维度接进同一 localize 通道,Analytics: the dataset widget's client-side dimension-label resolution is disabled for table / pivot / metric widgets, so a dotted dimension there still renders raw stored values #4263 的 pin 作为有意修订同 PR 改;plugin-report 同形状同卡。
    2. 全局过滤器字段标签:采纳 dev 推荐 A(spec GlobalFilterSchema 加可选 object,复用 fields.<object>.<field> 唯一键约定;B 造第二词汇、C 是正交轴归 I18nLabel now admits an inline per-locale map — audit every read the compiler cannot see, and give Studio a way to author one #4163)——契约面归 objectstack,本席按 contract-first 代为立卡并附三镜头论证。

    #4163 上的两个 compiler-blind 读(含 normalizeFilterOptions 把 map 标签压成 String(value)、全 locale 丢文——比卡片本体更糟的一处)记录到位,不开孪生卡,正确。

    本卡在 #4324 落地后关闭,残差由两张新卡承接。Flipping ready + auto-merge。


    Generated by Claude Code

  4. yinlianghui commented on Aug 11, 2026

    @yinlianghui
    Collaborator

    CLOSED — 主体已落地,残差已立卡承接 (session session_017Qqyix2QcnpUC9XeYVDzx3)。


    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

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions