diff --git a/classes/orcid/OrcidReview.php b/classes/orcid/OrcidReview.php index d79eb0c2337..5f0e79f373c 100644 --- a/classes/orcid/OrcidReview.php +++ b/classes/orcid/OrcidReview.php @@ -102,9 +102,15 @@ private function build(): array $orcidReview['subject-url'] = ['value' => $publicationUrl]; $orcidReview['review-url'] = ['value' => $publicationUrl]; $orcidReview['subject-type'] = 'journal-article'; - $orcidReview['subject-name'] = [ - 'title' => ['value' => $this->submission->getCurrentPublication()->getLocalizedTitle($submissionLocale) ?? ''] - ]; + + $allTitles = $currentPublication->getData('title'); + foreach ($allTitles as $locale => $title) { + if ($locale === $submissionLocale) { + $orcidReview['subject-name']['title'] = ['value' => $title]; + } else { + $orcidReview['subject-name']['translated-title'] = ['value' => $title, 'language-code' => LocaleConversion::getIso1FromLocale($locale)]; + } + } if (!empty($currentPublication->getDoi())) { /** @var Doi $doiObject */ @@ -122,15 +128,6 @@ private function build(): array } } - $allTitles = $currentPublication->getData('title'); - foreach ($allTitles as $locale => $title) { - if ($locale !== $submissionLocale) { - $iso1Locale = LocaleConversion::getIso1FromLocale($locale); - if ($iso1Locale) { - $orcidReview['subject-name']['translated-title'] = ['value' => $title, 'language-code' => $iso1Locale]; - } - } - } return $orcidReview; }