From cd86ab6d58208cefab4cb8c609d944b1d27843c4 Mon Sep 17 00:00:00 2001 From: Bozana Bokan Date: Tue, 10 Dec 2024 14:00:48 +0100 Subject: [PATCH] use submission locales instead of metadata locales for galley locale --- controllers/grid/articleGalleys/form/ArticleGalleyForm.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/grid/articleGalleys/form/ArticleGalleyForm.php b/controllers/grid/articleGalleys/form/ArticleGalleyForm.php index a66ef7b4eba..ade999041f6 100644 --- a/controllers/grid/articleGalleys/form/ArticleGalleyForm.php +++ b/controllers/grid/articleGalleys/form/ArticleGalleyForm.php @@ -62,7 +62,7 @@ public function __construct($request, $submission, $publication, $articleGalley $this->addCheck(new \PKP\form\validation\FormValidatorCSRF($this)); // Ensure a locale is provided and valid - $locales = $submission->getPublicationLanguages($request->getJournal()->getSupportedSubmissionMetadataLocales(), $articleGalley?->getLanguages()); + $locales = $submission->getPublicationLanguages($request->getJournal()->getSupportedSubmissionLocales(), $articleGalley?->getLanguages()); $this->addCheck( new \PKP\form\validation\FormValidatorCustom( $this, @@ -92,7 +92,7 @@ public function fetch($request, $template = null, $display = false) ]); } - $supportedLocales = $request->getContext()->getSupportedSubmissionMetadataLocaleNames() + $this->_submission->getPublicationLanguageNames() + ($this->_articleGalley?->getLanguageNames() ?? []); + $supportedLocales = $request->getContext()->getSupportedSubmissionLocaleNames() + $this->_submission->getPublicationLanguageNames() + ($this->_articleGalley?->getLanguageNames() ?? []); ksort($supportedLocales); $templateMgr->assign([