Skip to content

[repo:objectui] Line-items sub-grid hard-codes Add line / Total as English literals — a zh-CN console shows them untranslated #14884

Description

@baozhoutao

Summary

The line-items sub-grid (the inline child table rendered inside a record form, data-testid="line-items-add") hard-codes its chrome strings in English. On a zh-CN console every other button on the page is Chinese, while the sub-grid shows Add line under the table and Total in its footer row. The related-list column picker on record pages likewise showed Columns in the same session (not traced to source).

Minimal reproduction

Platform 17.2.0 console, workspace i18n.defaultLocale: 'zh-CN'.

  1. Any form view with a child line-items table (here: 到人分工 form with its 个人承接项 lines; also the indicator form's 阶梯区间 lines).
  2. Open "新建" → scroll to the child table.

Observed: footer cell Total, button + Add line; the surrounding dialog (新建到人分工, 取消, 保存, field labels) is Chinese.

Where

ui-components chunk — literals, not dictionary keys:

// footer
children: `Total`
// add button
children: [ <PlusIcon/>, d.add_label || `Add line` ]

add_label is a per-view override, so an app can paper over the button, but there is no override for Total, and neither string goes through the console's i18n dictionary (which already has zh-CN entries for everything else on the page).

Expected

  • Route both through the dictionary (lineItems.addLine, lineItems.total or similar) with zh-CN entries (新增行 / 合计), so the platform default is localized and add_label remains an optional per-view override.
  • Sweep the same component for other literals (empty-state text, remove-row tooltip) while there.
  • If Columns on the related-list toolbar is a separate component, same treatment.

Environment

@objectstack/console 17.2.0 · objectstack dev · Chrome. App: objectstack-ai/kpi.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions