From e7771ca8992835d22926bc735581cea21d11ea37 Mon Sep 17 00:00:00 2001 From: Alejandro Borrego <210245044+abp002@users.noreply.github.com> Date: Sun, 25 Oct 2026 19:31:31 +0100 Subject: [PATCH] fix(core): use %n in the integrity check plural to avoid a crash in L10N Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Alejandro Borrego <210245044+abp002@users.noreply.github.com> --- core/BackgroundJobs/CheckCodeIntegrityJob.php | 2 +- tests/Core/BackgroundJobs/CheckCodeIntegrityJobTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/BackgroundJobs/CheckCodeIntegrityJob.php b/core/BackgroundJobs/CheckCodeIntegrityJob.php index edfe25dd11a58..fbe8b375e9fa0 100644 --- a/core/BackgroundJobs/CheckCodeIntegrityJob.php +++ b/core/BackgroundJobs/CheckCodeIntegrityJob.php @@ -152,7 +152,7 @@ public static function formatSummary(IL10N $l, array $summary): array { if ($unverified !== []) { $sentences[] = $l->n( 'The signature of %s is missing or invalid, so it could not be verified.', - 'The signatures of %s are missing or invalid, so they could not be verified.', + 'The %n signatures of %s are missing or invalid, so they could not be verified.', count($unverified), [implode(', ', $unverified)], ); diff --git a/tests/Core/BackgroundJobs/CheckCodeIntegrityJobTest.php b/tests/Core/BackgroundJobs/CheckCodeIntegrityJobTest.php index ac15823e7890d..b49ec1a6d7c75 100644 --- a/tests/Core/BackgroundJobs/CheckCodeIntegrityJobTest.php +++ b/tests/Core/BackgroundJobs/CheckCodeIntegrityJobTest.php @@ -311,7 +311,7 @@ public static function dataFormatSummary(): array { 'unverified only' => [['files' => 0, 'unverified' => ['core']], ['The signature of core is missing or invalid, so it could not be verified.']], 'both' => [['files' => 1, 'unverified' => ['core', 'files']], [ '1 file does not match the signed release. It may have been modified or added without authorization.', - 'The signatures of core, files are missing or invalid, so they could not be verified.', + 'The 2 signatures of core, files are missing or invalid, so they could not be verified.', ]], 'missing parameters' => [[], []], ];