Skip to content

Commit

Permalink
Merge pull request #4057 from jyhein/f5000
Browse files Browse the repository at this point in the history
Remove separate Dublin Core Language metadata field and only use Submission Locale to define the language
  • Loading branch information
bozana authored Nov 28, 2023
2 parents 0027b66 + c7ebbc8 commit eac92c2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 26 deletions.
6 changes: 0 additions & 6 deletions cypress/tests/integration/SubmissionWizard.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ describe('Submission Wizard', function() {
metadata: {
autosuggest: {
disciplines: 'Faucibus',
languages: 'Ornare',
subjects: 'Suspendisse',
supportingAgencies: 'Porttitor',
},
Expand Down Expand Up @@ -301,7 +300,6 @@ describe('Submission Wizard', function() {
'Coverage',
'Data Availability Statement',
'Disciplines',
'Languages',
'Rights',
'Source',
'Subjects',
Expand All @@ -326,7 +324,6 @@ describe('Submission Wizard', function() {
dataAvailability: 'require',
disciplines: 'require',
keywords: 'require',
languages: 'require',
rights: 'require',
source: 'require',
subjects: 'require',
Expand Down Expand Up @@ -463,7 +460,6 @@ describe('Submission Wizard', function() {
dataAvailability: 'request',
disciplines: 'request',
keywords: 'require',
languages: 'request',
rights: 'request',
source: 'request',
subjects: 'require',
Expand Down Expand Up @@ -531,7 +527,6 @@ describe('Submission Wizard', function() {
const metadata = {
subjects: "Subjects",
disciplines: "Disciplines",
languages: "Languages",
supportingAgencies: "Supporting Agencies",
coverage: "Coverage",
rights: "Rights",
Expand Down Expand Up @@ -629,7 +624,6 @@ describe('Submission Wizard', function() {
dataAvailability: '0',
disciplines: '0',
keywords: 'request',
languages: '0',
rights: '0',
source: '0',
subjects: '0',
Expand Down
2 changes: 1 addition & 1 deletion lib/pkp
Submodule pkp updated 79 files
+0 −11 api/v1/vocabs/PKPVocabController.php
+0 −13 classes/components/forms/context/PKPMetadataSettingsForm.php
+0 −12 classes/components/forms/publication/PKPMetadataForm.php
+10 −0 classes/components/forms/site/PKPSiteConfigForm.php
+0 −1 classes/context/Context.php
+0 −3 classes/core/PKPApplication.php
+0 −1 classes/install/Installer.php
+0 −12 classes/publication/DAO.php
+2 −0 classes/submission/SubmissionLanguage.php
+2 −0 classes/submission/SubmissionLanguageDAO.php
+2 −0 classes/submission/SubmissionLanguageEntryDAO.php
+5 −1 classes/user/Collector.php
+0 −3 controllers/modals/submission/ViewSubmissionMetadataHandler.php
+0 −17 locale/ar/manager.po
+0 −20 locale/az/manager.po
+0 −15 locale/be@cyrillic/manager.po
+0 −23 locale/bg/manager.po
+0 −15 locale/bs/manager.po
+0 −22 locale/ca/manager.po
+0 −15 locale/ckb/manager.po
+0 −17 locale/cs/manager.po
+0 −19 locale/da/manager.po
+0 −18 locale/de/manager.po
+0 −22 locale/el/manager.po
+11 −0 locale/en/admin.po
+0 −21 locale/en/manager.po
+0 −20 locale/es/manager.po
+0 −15 locale/eu/manager.po
+0 −15 locale/fa/manager.po
+0 −17 locale/fi/manager.po
+12 −0 locale/fr_CA/admin.po
+0 −23 locale/fr_CA/manager.po
+0 −23 locale/fr_FR/manager.po
+0 −15 locale/gd/manager.po
+0 −18 locale/gl/manager.po
+0 −15 locale/he/manager.po
+0 −15 locale/hi/manager.po
+0 −17 locale/hr/manager.po
+0 −21 locale/hu/manager.po
+0 −18 locale/hy/manager.po
+0 −23 locale/id/manager.po
+0 −20 locale/is/manager.po
+0 −23 locale/it/manager.po
+0 −17 locale/ja/manager.po
+0 −18 locale/ka/manager.po
+0 −19 locale/kk/manager.po
+0 −15 locale/ko/manager.po
+0 −15 locale/lt/manager.po
+0 −15 locale/lv/manager.po
+0 −22 locale/mk/manager.po
+0 −15 locale/mn/manager.po
+0 −19 locale/ms/manager.po
+0 −18 locale/nb/manager.po
+0 −23 locale/nl/manager.po
+0 −19 locale/pl/manager.po
+0 −20 locale/pt_BR/manager.po
+0 −20 locale/pt_PT/manager.po
+0 −23 locale/ro/manager.po
+0 −19 locale/ru/manager.po
+0 −15 locale/sk/manager.po
+0 −19 locale/sl/manager.po
+0 −15 locale/sr@cyrillic/manager.po
+0 −15 locale/sr@latin/manager.po
+0 −17 locale/sv/manager.po
+0 −19 locale/tr/manager.po
+0 −18 locale/uk/manager.po
+0 −15 locale/uz@cyrillic/manager.po
+0 −15 locale/uz@latin/manager.po
+0 −18 locale/vi/manager.po
+0 −15 locale/zh_CN/manager.po
+0 −15 locale/zh_Hant/manager.po
+0 −1 plugins/importexport/native/filter/NativeXmlPKPPublicationFilter.php
+0 −1 plugins/importexport/native/filter/PKPPublicationNativeXmlFilter.php
+0 −8 schemas/context.json
+0 −11 schemas/publication.json
+5 −0 schemas/site.json
+7 −7 templates/controllers/grid/users/reviewer/readReview.tpl
+0 −3 templates/submission/review-editors.tpl
+0 −2 tests/classes/publication/PublicationTest.php
2 changes: 1 addition & 1 deletion plugins/generic/citationStyleLanguage
23 changes: 6 additions & 17 deletions plugins/metadata/dc11/filter/Dc11SchemaArticleAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
use APP\submission\Submission;
use PKP\db\DAORegistry;
use PKP\facades\Locale;
use PKP\i18n\LocaleConversion;
use PKP\metadata\MetadataDataObjectAdapter;
use PKP\metadata\MetadataDescription;
use PKP\plugins\Hook;
Expand Down Expand Up @@ -184,22 +183,12 @@ public function &extractMetadataFromDataObject(&$article)
}

// Language
$locales = [];
if ($article instanceof Submission) {
foreach ($galleys as $galley) {
$locale = $galley->getLocale();
if (!is_null($locale) && !in_array($locale, $locales)) {
$locales[] = $locale;
$dc11Description->addStatement('dc:language', LocaleConversion::getIso3FromLocale($locale));
}
}
}
$articleLanguages = $article->getLanguage();
if (empty($locales) && isset($articleLanguages[$article->getLocale()])) {
foreach ($articleLanguages[$article->getLocale()] as $language) {
$dc11Description->addStatement('dc:language', $language);
}
}
collect($galleys)
->map(fn ($g) => $g->getData('locale'))
->push($publication->getData('locale'))
->filter()
->unique()
->each(fn ($l) => $dc11Description->addStatement('dc:language', $l));

// Relation
// full text URLs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ public function testToXml()
$publication->setData('abstract', 'article-abstract', 'en');
$publication->setData('sponsor', 'article-sponsor', 'en');
$publication->setData('doiObject', $publicationDoiObject);
$publication->setData('languages', ['en' => ['en']]);
$publication->setData('copyrightHolder', 'article-copyright');
$publication->setData('copyrightYear', 'year');
$publication->setData('authors', collect([$author]));
Expand Down Expand Up @@ -153,6 +152,7 @@ public function testToXml()
->will($this->returnValue(98));
$galley->setId(98);
$galley->setData('doiObject', $galleyDoiObject);
$galley->setData('locale', 'en');

$galleys = [$galley];

Expand Down

0 comments on commit eac92c2

Please sign in to comment.