AI false-positive summary is not translatable and doubles punctuation
维护者通常 1 天内回复
已经有一个关联 PR 被合并了。
- #1505 来自 @ekamran —— 已合并
评估
- 难度
- 3/5
- 预计耗时
- 半天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript, php, wordpress
调研方向
Start with the message assembly in assets/js/plugin-check-admin.js, where the AI summary is built from hard-coded English and a . is appended unless the text ends in ., ! or ?. Then check includes/CLI/Plugin_Check_Command.php, where ' AI detected %1$d %2$s' is appended to "Checks complete. No errors found." and the count sits outside the _n() plural string. Done when each part is a translatable sentence with its own punctuation and plural forms follow locale rules. A pull request (#1505) is already open against this issue, so check it before starting.
由索引模型根据 Issue 内容生成。
描述
Description
When AI analysis runs, the summary of possible false positives cannot be translated correctly, and it can end up with doubled punctuation.
Admin screen. assets/js/plugin-check-admin.js builds the AI part of the results message from hard-coded English ("AI detected … possible false positives", "Input tokens:", "Output tokens:", "Tokens spent:", "Model:"), so it stays in English on a translated site. It then adds . after the localized message unless that message ends in ., ! or ?. A Hindi message ending in । therefore gets a second stop: कोई त्रुटि नहीं मिली।. AI detected 5 possible false positives. …
WP-CLI. When a run with --ai has no errors or warnings left to show (for example with --ignore-errors), includes/CLI/Plugin_Check_Command.php appends . plus ' AI detected %1$d %2$s' to "Checks complete. No errors found.", so the line reads:
Success: Checks complete. No errors found.. AI detected 3 possible false positives (Tokens spent: 1,234)
The number also sits outside the plural string (' AI detected %1$d %2$s' with a separate _n( 'possible false positive', 'possible false positives', … )), which cannot be translated correctly in languages where the whole phrase changes with the count.
The CLI string was flagged by polyglots lint (https://github.com/emreerkan/polyglots) as plural-without-count.
Expected
Each part of the summary is a complete translatable sentence with its own punctuation, plural forms follow the locale's plural rules, and the parts are joined with a space.
AI Assisted: Claude Code helped find and reproduce this.
- 主要语言
- PHP
- 星标
- 365
- 派生
- 131
- 平均合并
- 21 小时 11 分钟
- 30 天内合并 PR
- 19
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
WordPress/plugin-check 的其他 Issue
-
难度 5/5 一周以上 新手友好度 35/100
WordPress/plugin-check#1509 · 1 条评论 ·
维护者通常 1 天内回复
-
False positive: native auto_update_plugins option triggers update_modification_detected可能已有人在做 @KhushalSainS 于 15 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 68/100
WordPress/plugin-check#1506 ·
维护者通常 1 天内回复
-
Accept PolyFills可能已有人在做 @sanketio 于 22 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 45/100
WordPress/plugin-check#1496 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
WordPress/plugin-check#1474 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 52/100
WordPress/plugin-check#1445 · 2 条评论 ·
维护者通常 1 天内回复
查看 WordPress/plugin-check 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
Icinga/icingaweb2-module-director#3188 ·
维护者通常 4 天内回复
-
bug ui
难度 2/5 1-3 小时 新手友好度 62/100
hashtopolis/server#2614 ·
维护者通常 1 天内回复
-
sync-en
难度 1/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
sync-en
难度 1/5 1 小时以内 新手友好度 76/100
维护者通常 1 天内回复
-
Перевод устарел
难度 1/5 1 小时以内 新手友好度 62/100