Skip to content

objectui: ObjectGantt hardcodes Chinese quick-filter labels — English-only-codebase violation, and the gantt toolbar is Chinese in every locale #5427

Description

@yinlianghui

Found while measuring objectstack#5407's item 2 (Clear in list/toolbar chrome). It is not that bug — it is its mirror image — so it is filed separately.

packages/plugin-gantt/src/ObjectGantt.tsx (around line 1384) renders QuickFilterBar with the labels hardcoded in Chinese:

labels={{
  all: '...',            // 全部
  clear: '...',          // 清除筛选
  empty: '...',          // 无可选项
  resultSummary: (shown, total) => `... ${shown} / ${total} ...`,  // 显示 N / M 项任务
}}

QuickFilterBar itself is correct — it is presentational and falls back to English (labels?.clear ?? 'Clear'). The host is what pins the copy.

Two defects in one

  1. AGENTS.md Commandment #-1 — "All user-facing text ... MUST be English. No Chinese or other non-English in those." This is the objectui codebase, not the instruction file, so the rule applies literally.
  2. It is untranslatable. These are not bundle keys, so the gantt quick-filter bar reads Chinese under an en, ja, es, ar … session. The rest of the gantt toolbar localizes fine, which makes the mismatch conspicuous the same way objectstack#5407's item 3 describes for dashboards.

Note for whoever picks this up: resultSummary uses SINGLE-brace interpolation on purpose (the call site does a literal string replace, not i18next), which all-locales-key-parity's placeholder check already knows about — see its SINGLE regex. Any bundle keys added here must keep that spelling or the parity guard will flag them.

Suggested fix

Move all four into the gantt namespace of packages/i18n/src/locales/*.ts (all ten packs — full parity is enforced) and read them through useSafeTranslate, the way DashboardFilterBar already does for dashboard.filters.*.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions