Repository navigation
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
Activity
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 渲染路径。派单要点:
- 唯一解析通道令: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 核查,同通道。
- 地形注意:本周落的 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
comboas a combo on the dataset path (#4229) #4298(mergeAuthoredPresentation)构成了 analytics 标签网——i18n 应用应搭在这张网的出口上,其既有 pin 必须原样绿。 - contract 停车条件(源线程原文):若闭环必须给 spec
DatasetDimension增加select类型,停下报 needs_decision 做 contract-first 拆分,不许在本卡顺手改 spec。
Surface:
packages/plugin-dashboard/packages/plugin-report/packages/corechart-series 标签网出口 + 测试;均无在飞持有者。互斥:不碰 #4281 持有的 components action renderers、#4235 持有的 app-shell home 面、#4040-t2 持有的 plugin-grid/plugin-form/i18n。
Generated by Claude Code
ACCEPT(partial,残差分别立卡) — PM review of record (session
session_017Qqyix2QcnpUC9XeYVDzx3)。PR #4324 验收要点:
- 通道测量决定性:
fieldOptionLabel/translateOptions(spec 文档自点名 objectui 为读者、三个既有面在用、plugin-charts 遗留路径同签名)——复用为唯一OptionLabelTranslator,零图表侧方言。应用点在标签网出口(chart-series),axis/legend/series、dotted table/pivot 单元格、CSV、色彩映射、类目顺序全部免费搭车。 - 两个设计事实都对:英文标签第二映射键是承重的(ADR-0021 下 server 已解析的行按英文标签键控,正是报告的那块屏);
resolveDimensionFieldMeta保留终端字段属主对象(bundle 键点名的是 crm_account 不是数据集基对象),fix(analytics): resolve a dotted dimension's select options against the relationship target #4261 的关系行走早知道这一点只是丢掉了。语言切换原地重标注不等 refetch。 - plugin-charts 越派单范围有理:同一出口的第三消费者、卡片决定性证据就是 chart legend、无持有者——不带上它就是 dashboard 翻了、standalone/report 图表还是英文。接受。
- 停车条件未触发的论证成立:运行时经元数据文档读 options,
DatasetDimension.type从未被咨询——"无 authoring knob"在作者侧真、在运行时侧 moot。 - 反向验证复现卡片症状原文;fix(analytics): resolve a dotted dimension's select options against the relationship target #4261/fix(dashboard): resolve a dotted dimension's labels on table and pivot dataset widgets #4273/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/fix(plugin-dashboard): draw an authored
comboas a combo on the dataset path (#4229) #4298 全部原样绿;CI 一次收敛零失败。
残差处置(代决):
- 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 同形状同卡。
- 全局过滤器字段标签:采纳 dev 推荐 A(spec
GlobalFilterSchema加可选object,复用fields.<object>.<field>唯一键约定;B 造第二词汇、C 是正交轴归I18nLabelnow 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
- 通道测量决定性:
CLOSED — 主体已落地,残差已立卡承接 (session
session_017Qqyix2QcnpUC9XeYVDzx3)。- 主体修复:PR fix(core,plugin-dashboard,plugin-charts): run resolved select-option labels through the i18n bundle on analytics surfaces (#4030) #4324 已合入 main(
5900ac56f)——报告者的决定性证据面(图表 legend/series、dotted table/pivot 单元格、CSV、色彩与类目顺序)在 zh-CN 下渲染 bundle 翻译。 - 残差 1(table/pivot 的 local select 维度仍英文,server 已解析路径无元数据读):Analytics: LOCAL select dimensions on table/pivot (and the dataset report block) still render English option labels — the server-resolved path never meets the localize seam #4330 承接,带 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 有意修订的裁决。
- 残差 2(dashboard 全局过滤器的字段标签无 bundle 键可解):objectstack#7804 承接(spec
GlobalFilterSchema.object提案,推荐 A 案)。 - 相邻发现(inline
I18nLabel被压成[object Object]/String(value))已记录在I18nLabelnow admits an inline per-locale map — audit every read the compiler cannot see, and give Studio a way to author one #4163。
Generated by Claude Code
- 主体修复:PR fix(core,plugin-dashboard,plugin-charts): run resolved select-option labels through the i18n bundle on analytics surfaces (#4030) #4324 已合入 main(
- added a commit that references this issue
on Aug 17, 2026
Summary
Report blocks and dashboard widgets render a
selectfield's option label from the object's hardcodedlabel, 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
labelsales_channeldomesticDomestic'Domestic''国内'competitor_namecabotCabot'Cabot''卡博特'competitor_nameorionOrion Engineered Carbons'Orion Engineered Carbons''欧励隆'The decisive row is
orion: the rendered stringOrion Engineered Carbonsbears no resemblance to the stored valueorion, but matches the object's Englishlabelverbatim. So the analytics path does resolve the option label — it simply does not run it through the i18n bundle before display. (domestic→Domesticdiffers 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 rendersSales Channel:untranslated.Reproduce
selectfield with English option labels and provide zh-CN translations for those options.zh-CN. The list shows Chinese; the report/dashboard shows the object's English labels.No authoring knob exists
DatasetDimensionis exactly{ name, label, field, type, dateGranularity }, andtypeisstring | number | boolean | date | lookup— there is noselect. 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 localezh-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.