Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

AI false-positive summary is not translatable and doubles punctuation

Đã đóng
#1,504 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Một pull request liên quan đã được merge.

  • #1505 của @ekamran — đã merge

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
PHP
Star
366
Fork
128
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
22

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của WordPress/plugin-check

Tất cả issue của WordPress/plugin-check

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.