From 14fda3cd6e8a31b39fd92fd3ca9951d8c285111a 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 6d44a6c4a8f6f..79368b2248c91 100644 --- a/core/BackgroundJobs/CheckCodeIntegrityJob.php +++ b/core/BackgroundJobs/CheckCodeIntegrityJob.php @@ -151,7 +151,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 1851f8e0f1ca0..133508133cd74 100644 --- a/tests/Core/BackgroundJobs/CheckCodeIntegrityJobTest.php +++ b/tests/Core/BackgroundJobs/CheckCodeIntegrityJobTest.php @@ -283,7 +283,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' => [[], []], ];