From bf485b418ef99e27d15407cf7b648698b66b532c Mon Sep 17 00:00:00 2001 From: Ioannis Igoumenos Date: Wed, 25 Jun 2025 17:22:29 +0300 Subject: [PATCH] Review changes (#318) --- .../OrcidSource/resources/locales/en_US/orcid_source.po | 2 +- .../src/Controller/OrcidSourceCollectorsController.php | 2 +- .../src/Model/Table/OrcidSourceCollectorsTable.php | 5 ++--- app/resources/locales/en_US/field.po | 3 --- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/plugins/OrcidSource/resources/locales/en_US/orcid_source.po b/app/plugins/OrcidSource/resources/locales/en_US/orcid_source.po index 1c629a2ca..a670369b1 100644 --- a/app/plugins/OrcidSource/resources/locales/en_US/orcid_source.po +++ b/app/plugins/OrcidSource/resources/locales/en_US/orcid_source.po @@ -55,7 +55,7 @@ msgstr "Access token not configured (try resaving configuration)" msgid "error.param.notfound" msgstr "{0} was not found" -msgid "error.orcid_source.no_orcid" +msgid "error.response.no_orcid" msgstr "ORCID identifier missing from response." msgid "field.OrcidSources.api_type" diff --git a/app/plugins/OrcidSource/src/Controller/OrcidSourceCollectorsController.php b/app/plugins/OrcidSource/src/Controller/OrcidSourceCollectorsController.php index 6fcf1339c..b01ae0ed5 100644 --- a/app/plugins/OrcidSource/src/Controller/OrcidSourceCollectorsController.php +++ b/app/plugins/OrcidSource/src/Controller/OrcidSourceCollectorsController.php @@ -138,7 +138,7 @@ public function dispatch(string $id) { // Use the response and save the data to petitions table if(empty($response->orcid)) { - throw new \RuntimeException(__d('orcid_source', 'error.orcid_source.no_orcid')); + throw new \RuntimeException(__d('orcid_source', 'error.response.no_orcid')); } $this->set('vv_orcid', $response->orcid); $this->set('vv_token', $response); diff --git a/app/plugins/OrcidSource/src/Model/Table/OrcidSourceCollectorsTable.php b/app/plugins/OrcidSource/src/Model/Table/OrcidSourceCollectorsTable.php index 3ea6700c8..5f1efacbd 100644 --- a/app/plugins/OrcidSource/src/Model/Table/OrcidSourceCollectorsTable.php +++ b/app/plugins/OrcidSource/src/Model/Table/OrcidSourceCollectorsTable.php @@ -91,9 +91,8 @@ public function initialize(array $config): void { $this->setAutoViewVars([ 'externalIdentitySources' => [ - 'type' => 'select', - 'model' => 'ExternalIdentitySources', - 'where' => ['plugin' => 'OrcidSource.OrcidSources'] + 'type' => 'plugin', + 'model' => 'OrcidSource.OrcidSources', ] ]); diff --git a/app/resources/locales/en_US/field.po b/app/resources/locales/en_US/field.po index 8350a7254..95a8849a7 100644 --- a/app/resources/locales/en_US/field.po +++ b/app/resources/locales/en_US/field.po @@ -210,9 +210,6 @@ msgstr "Order" msgid "organization" msgstr "Organization" -msgid "other.value" -msgstr "Other Value" - msgid "parameters" msgstr "Parameters"