From 3b0a69999c707b540753ea1a42d239578848e63c Mon Sep 17 00:00:00 2001
From: Larry Garfield <larry@garfieldtech.com>
Date: Thu, 21 Apr 2022 11:06:31 -0500
Subject: [PATCH] [BUGFIX] Use the correct pluralized key in search results
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The "page" and "pages" translation keys are backwards.
This patch makes them forwards.

Resolves: #96795
Releases: main, 11.5
Change-Id: I3dde22d5a6f9ae7c62fe8c60156d6131f676a11c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74833
Tested-by: core-ci <typo3@b13.com>
Tested-by: Simon Schaufelberger <simonschaufi+typo3@gmail.com>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Simon Schaufelberger <simonschaufi+typo3@gmail.com>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
---
 .../indexed_search/Classes/Controller/SearchController.php    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/typo3/sysext/indexed_search/Classes/Controller/SearchController.php b/typo3/sysext/indexed_search/Classes/Controller/SearchController.php
index 0b3d9a04f5bd..28f3c9dd7141 100644
--- a/typo3/sysext/indexed_search/Classes/Controller/SearchController.php
+++ b/typo3/sysext/indexed_search/Classes/Controller/SearchController.php
@@ -478,9 +478,9 @@ class SearchController extends ActionController
             $dat = json_decode($row['static_page_arguments'], true);
             $pp = explode('-', $dat['key']);
             if ($pp[0] != $pp[1]) {
-                $resultData['titleaddition'] = ', ' . LocalizationUtility::translate('result.page', 'IndexedSearch') . ' ' . $dat['key'];
+                $resultData['titleaddition'] = ', ' . LocalizationUtility::translate('result.pages', 'IndexedSearch') . ' ' . $dat['key'];
             } else {
-                $resultData['titleaddition'] = ', ' . LocalizationUtility::translate('result.pages', 'IndexedSearch') . ' ' . $pp[0];
+                $resultData['titleaddition'] = ', ' . LocalizationUtility::translate('result.page', 'IndexedSearch') . ' ' . $pp[0];
             }
         }
         $title = $resultData['item_title'] . $resultData['titleaddition'];
-- 
GitLab