diff --git a/plugins/importexport/onix30/filter/MonographONIX30XmlFilter.php b/plugins/importexport/onix30/filter/MonographONIX30XmlFilter.php index 32f86cb9072..7f5dec50b0a 100644 --- a/plugins/importexport/onix30/filter/MonographONIX30XmlFilter.php +++ b/plugins/importexport/onix30/filter/MonographONIX30XmlFilter.php @@ -323,9 +323,10 @@ public function createProductNode($doc, $submission, $publicationFormat) $userGroup = Repo::userGroup()->get($author->getUserGroupId()); - $userGroupOnixMap = ['AU' => 'A01', 'VE' => 'B01', 'CA' => 'A01', 'Trans' => 'B06', 'PE' => 'B21']; // From List17, ContributorRole types. + $userGroupOnixMap = ['default.groups.name.author' => 'A01', 'default.groups.name.volumeEditor' => 'B01', 'default.groups.name.chapterAuthor' => 'A01', 'default.groups.name.translator' => 'B06', 'default.groups.name.editor' => 'B21']; // From List17, ContributorRole types. - $role = array_key_exists($userGroup->getLocalizedAbbrev(), $userGroupOnixMap) ? $userGroupOnixMap[$userGroup->getLocalizedAbbrev()] : 'Z99'; // Z99 - unknown contributor type. + $nameKey = $userGroup->getData('nameLocaleKey'); + $role = array_key_exists($nameKey, $userGroupOnixMap) ? $userGroupOnixMap[$nameKey] : 'Z99'; // Z99 - unknown contributor type. $contributorNode->appendChild($this->_buildTextNode($doc, 'ContributorRole', $role)); $contributorNode->appendChild($this->_buildTextNode($doc, 'PersonName', $author->getFullName(false)));