Skip to content

Commit

Permalink
#9453 Localize the data on the front end
Browse files Browse the repository at this point in the history
  • Loading branch information
nibou230 committed Feb 16, 2024
1 parent d67c512 commit 12ced09
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions api/v1/reviews/PKPReviewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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();
Expand Down

0 comments on commit 12ced09

Please sign in to comment.