From 5800e0f056a417bd3cde5db3ed89f0848fc3dbc9 Mon Sep 17 00:00:00 2001 From: Bozana Bokan Date: Wed, 4 Sep 2024 15:08:16 +0200 Subject: [PATCH 1/3] rename locales --- locale/{fr_FR => fr}/locale.po | 0 locale/{nb => nb_NO}/locale.po | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename locale/{fr_FR => fr}/locale.po (100%) rename locale/{nb => nb_NO}/locale.po (100%) diff --git a/locale/fr_FR/locale.po b/locale/fr/locale.po similarity index 100% rename from locale/fr_FR/locale.po rename to locale/fr/locale.po diff --git a/locale/nb/locale.po b/locale/nb_NO/locale.po similarity index 100% rename from locale/nb/locale.po rename to locale/nb_NO/locale.po From de7dc809f3408aa17a3a4cdce71fe225cb447e35 Mon Sep 17 00:00:00 2001 From: Bozana Bokan Date: Tue, 29 Oct 2024 13:39:44 +0100 Subject: [PATCH 2/3] use getIso1FromLocale, us weblate locales for ui --- GoogleScholarPlugin.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/GoogleScholarPlugin.php b/GoogleScholarPlugin.php index 344c497..ca4bcc8 100644 --- a/GoogleScholarPlugin.php +++ b/GoogleScholarPlugin.php @@ -24,6 +24,7 @@ use PKP\citation\CitationDAO; use PKP\core\PKPApplication; use PKP\db\DAORegistry; +use PKP\i18n\LocaleConversion; use PKP\plugins\GenericPlugin; use PKP\plugins\Hook; @@ -180,7 +181,7 @@ public function submissionView($hookName, $args) if ($subjects = $publication->getData('subjects')) { foreach ($subjects as $locale => $localeSubjects) { foreach ($localeSubjects as $i => $subject) { - $templateMgr->addHeader('googleScholarSubject' . $i++, ''); + $templateMgr->addHeader('googleScholarSubject' . $i++, ''); } } } @@ -189,7 +190,7 @@ public function submissionView($hookName, $args) if ($keywords = $publication->getData('keywords')) { foreach ($keywords as $locale => $localeKeywords) { foreach ($localeKeywords as $i => $keyword) { - $templateMgr->addHeader('googleScholarKeyword' . $i++, ''); + $templateMgr->addHeader('googleScholarKeyword' . $i++, ''); } } } From 9687852926dce46f49c6c2eeeebf136d4ddf425a Mon Sep 17 00:00:00 2001 From: Bozana Bokan Date: Tue, 3 Dec 2024 14:49:14 +0100 Subject: [PATCH 3/3] adapt language distribution --- GoogleScholarPlugin.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GoogleScholarPlugin.php b/GoogleScholarPlugin.php index ca4bcc8..b4e1629 100644 --- a/GoogleScholarPlugin.php +++ b/GoogleScholarPlugin.php @@ -124,7 +124,7 @@ public function submissionView($hookName, $args) // Submission title $templateMgr->addHeader('googleScholarTitle', ''); - $templateMgr->addHeader('googleScholarLanguage', ''); + $templateMgr->addHeader('googleScholarLanguage', ''); // Submission publish date and issue information if ($applicationName == 'ojs2') { @@ -174,14 +174,14 @@ public function submissionView($hookName, $args) // Abstract if ($abstract = $publication->getLocalizedData('abstract', $publicationLocale)) { - $templateMgr->addHeader('googleScholarAbstract', ''); + $templateMgr->addHeader('googleScholarAbstract', ''); } // Subjects if ($subjects = $publication->getData('subjects')) { foreach ($subjects as $locale => $localeSubjects) { foreach ($localeSubjects as $i => $subject) { - $templateMgr->addHeader('googleScholarSubject' . $i++, ''); + $templateMgr->addHeader('googleScholarSubject' . $i++, ''); } } } @@ -190,7 +190,7 @@ public function submissionView($hookName, $args) if ($keywords = $publication->getData('keywords')) { foreach ($keywords as $locale => $localeKeywords) { foreach ($localeKeywords as $i => $keyword) { - $templateMgr->addHeader('googleScholarKeyword' . $i++, ''); + $templateMgr->addHeader('googleScholarKeyword' . $i++, ''); } } }