Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

AI false-positive summary is not translatable and doubles punctuation

Chiusa
#1,504 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #1505 di @ekamran — integrata

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, php, wordpress

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
PHP
Stelle
366
Fork
128
Merge medio
1g 9h
PR unite (30g)
22

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di WordPress/plugin-check

Tutte le issue di WordPress/plugin-check

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.