From 46f73414eae577cf3b023b2daecbbdd962158ec0 Mon Sep 17 00:00:00 2001 From: Nicolas Boulay Date: Fri, 16 Feb 2024 15:41:33 -0500 Subject: [PATCH] pkp/pkp-lib#9453 Localize the data on the front end --- api/v1/reviews/PKPReviewController.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/api/v1/reviews/PKPReviewController.php b/api/v1/reviews/PKPReviewController.php index 3e9649fac20..0b664545e6d 100644 --- a/api/v1/reviews/PKPReviewController.php +++ b/api/v1/reviews/PKPReviewController.php @@ -118,12 +118,13 @@ public function getHistory(Request $illuminateRequest): JsonResponse $submission = Repo::submission()->get($submissionId, $contextId); $publication = $submission->getCurrentPublication(); - $publicationTitle = $publication->getLocalizedTitle(); + //$publicationTitlePrefix = $publication->getData('prefix'); + $publicationTitle = $publication->getData('title'); $section = Repo::section()->get($submission->getSectionId()); - $publicationType = $section->getLocalizedData('title'); - $publicationAbstract = $publication->getLocalizedData('abstract'); - $publicationKeywords = implode(', ', $publication->getLocalizedData('keywords')); + $publicationType = $section->getData('title'); + $publicationAbstract = $publication->getData('abstract'); + $publicationKeywords = $publication->getData('keywords'); $declineEmail = null; if ($reviewAssignment->getDeclined()) { @@ -144,6 +145,7 @@ public function getHistory(Request $illuminateRequest): JsonResponse } $reviewAssignmentProps = Repo::reviewAssignment()->getSchemaMap()->map($reviewAssignment); + // It doesn't seem we can translate the recommendation inside the vue page as it's a dynamic label key. $recommendation = $reviewAssignment->getLocalizedRecommendation(); $reviewAssignmentId = $reviewAssignment->getId();