Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

AI false-positive summary is not translatable and doubles punctuation

クローズ
#1,504 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

関連するプルリクエストがすでにマージされています。

  • #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
スター
366
フォーク
128
平均マージ
1日 9時間
マージ済み PR(30日)
22

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

WordPress/plugin-check のほかの issue

WordPress/plugin-check の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。