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 #5076

Description

@yinlianghui

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. os-zhuang commented on Aug 5, 2026

    @os-zhuang
    Contributor

    分诊:入队 pm:queue(已挂 repo:objectui)。

    • 落点判断:analytics 渲染面已能解析 option label(orion → 'Orion Engineered Carbons' 为证),缺的是把解析结果过一遍 i18n bundle——修复主落点在 objectui 的 analytics 渲染路径。同族参考:objectui#3347(record picker 列 option label 走 schema fieldsMeta 解析)已落地,解析路径可复用。
    • 契约面提示:若实施中发现必须给 spec 的 DatasetDimension 增加 select 维度类型才能闭环,请停下回报分诊座位做 contract-first 拆分(spec 子单先行),不要在 objectui 单里顺手改 spec。
    • 查重:三仓无影子单。

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


    Generated by Claude Code

  2. os-zhuang commented on Aug 10, 2026

    @os-zhuang
    Contributor

    Migrated to objectstack-ai/objectui#4030 under #7167 (file-at-destination ruling, maintainer 2026-08-10). Native GitHub issue transfer is not available to this session's credential, so the card was recreated at the destination; this thread stays as the authoritative history and is linked from the new card. Closing as not planned here — moved, not rejected.


    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

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions