Skip to content

[finding] objectui: QuickFilterBar JSDoc comments carry Chinese copy — Commandment #-1 applies to comments too #5446

Description

@yinlianghui

发现于实现 objectstack#5427(objectui PR #3386)时,与该 issue 的缺陷相邻但不同,故单独记录、未在该 PR 顺手改(scope = issue)。

现象

packages/plugin-gantt/src/QuickFilterBar.tsx 第 41 / 43 行的 JSDoc 注释里写着中文文案:

/** "全部" / "All" — the select-all toggle and empty-selection trigger text. */
all?: string;
/** "清除筛选" / "Clear" — clears every dimension. */
clear?: string;

AGENTS.md 诫条 #-1 的措辞覆盖注释,不止用户可见文案:"All user-facing text (component labels, buttons, titles, errors), code comments, docs …, and console/log messages MUST be English."

为什么是 observation-class 而不是缺陷

建议

改成纯英文,并顺带指向新的词条键,例如:

/** Select-all toggle and empty-selection trigger text. Host: `gantt.quickFilter.all`. */

同文件第 40-49 行的 QuickFilterLabels 其余成员注释一并扫一遍即可。packages/plugin-gantt/src/QuickFilterBar.test.tsx:40 也用中文字面量做 label 夹具 —— 那是测试数据(正在验证 label 透传),不属于本条,是否统一按英文夹具改写由维护者定。

严重度交 PM triage,不自行判定。


Generated by Claude Code

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