From 4d8234c6cafe1f775f3775b6e3f9d13f6db26517 Mon Sep 17 00:00:00 2001 From: GaziYucel Date: Tue, 17 Sep 2024 12:41:43 +0200 Subject: [PATCH 1/6] Ror registry data set cache; update bi-weekly; api lookup feature; migration / install; translations --- api/v1/rors/PKPRorController.php | 146 +++++++++++ classes/facades/Repo.php | 10 +- classes/migration/install/RorsMigration.php | 63 +++++ .../I7135_CreateNewRorRegistryCacheTables.php | 64 +++++ classes/ror/Collector.php | 125 +++++++++ classes/ror/DAO.php | 199 ++++++++++++++ classes/ror/Repository.php | 170 ++++++++++++ classes/ror/Ror.php | 26 ++ classes/ror/maps/Schema.php | 91 +++++++ classes/scheduledTask/PKPScheduler.php | 10 +- classes/services/PKPSchemaService.php | 5 +- classes/task/UpdateRorRegistryDataset.php | 247 ++++++++++++++++++ locale/ar/admin.po | 3 + locale/az/admin.po | 3 + locale/bg/admin.po | 3 + locale/bs/admin.po | 3 + locale/ca/admin.po | 3 + locale/ckb/admin.po | 3 + locale/cnr/admin.po | 3 + locale/cs/admin.po | 3 + locale/da/admin.po | 3 + locale/de/admin.po | 3 + locale/el/admin.po | 3 + locale/en/admin.po | 3 + locale/es/admin.po | 3 + locale/eu/admin.po | 3 + locale/fa/admin.po | 3 + locale/fi/admin.po | 3 + locale/fr_CA/admin.po | 3 + locale/fr_FR/admin.po | 3 + locale/gl/admin.po | 3 + locale/hr/admin.po | 3 + locale/hu/admin.po | 3 + locale/hy/admin.po | 3 + locale/id/admin.po | 3 + locale/is/admin.po | 3 + locale/it/admin.po | 3 + locale/ja/admin.po | 3 + locale/ka/admin.po | 3 + locale/kk/admin.po | 3 + locale/lv/admin.po | 3 + locale/mk/admin.po | 3 + locale/ms/admin.po | 3 + locale/nb/admin.po | 3 + locale/nl/admin.po | 3 + locale/pl/admin.po | 3 + locale/pt_BR/admin.po | 3 + locale/pt_PT/admin.po | 3 + locale/ro/admin.po | 3 + locale/ru/admin.po | 3 + locale/sl/admin.po | 3 + locale/sr@cyrillic/admin.po | 3 + locale/sr@latin/admin.po | 3 + locale/sv/admin.po | 3 + locale/tr/admin.po | 3 + locale/uk/admin.po | 3 + locale/vi/admin.po | 3 + locale/zh_CN/admin.po | 3 + locale/zh_Hant/admin.po | 3 + schemas/ror.json | 49 ++++ 60 files changed, 1341 insertions(+), 5 deletions(-) create mode 100644 api/v1/rors/PKPRorController.php create mode 100644 classes/migration/install/RorsMigration.php create mode 100644 classes/migration/upgrade/v3_4_0/I7135_CreateNewRorRegistryCacheTables.php create mode 100644 classes/ror/Collector.php create mode 100644 classes/ror/DAO.php create mode 100644 classes/ror/Repository.php create mode 100644 classes/ror/Ror.php create mode 100644 classes/ror/maps/Schema.php create mode 100644 classes/task/UpdateRorRegistryDataset.php create mode 100644 schemas/ror.json diff --git a/api/v1/rors/PKPRorController.php b/api/v1/rors/PKPRorController.php new file mode 100644 index 00000000000..76d53456464 --- /dev/null +++ b/api/v1/rors/PKPRorController.php @@ -0,0 +1,146 @@ +get(...)) + ->name('ror.getRor') + ->whereNumber('rorId'); + + Route::get('', $this->getMany(...)) + ->name('ror.getMany'); + } + + /** + * @copydoc \PKP\core\PKPBaseController::authorize() + */ + public function authorize(PKPRequest $request, array &$args, array $roleAssignments): bool + { + $this->addPolicy(new UserRolesRequiredPolicy($request), true); + + $rolePolicy = new PolicySet(PolicySet::COMBINING_PERMIT_OVERRIDES); + + $this->addPolicy(new ContextRequiredPolicy($request)); + + foreach ($roleAssignments as $role => $operations) { + $rolePolicy->addPolicy(new RoleBasedHandlerOperationPolicy($request, $role, $operations)); + } + + $this->addPolicy($rolePolicy); + + return parent::authorize($request, $args, $roleAssignments); + } + + /** + * Get a single ror + */ + public function get(Request $illuminateRequest): JsonResponse + { + if (!Repo::ror()->exists((int) $illuminateRequest->route('rorId'), $this->getRequest()->getContext()->getId())) { + return response()->json([ + 'error' => __('api.rors.404.rorNotFound') + ], Response::HTTP_OK); + } + + $ror = Repo::ror()->get((int) $illuminateRequest->route('rorId')); + + return response()->json(Repo::ror()->getSchemaMap()->map($ror), Response::HTTP_OK); + } + + /** + * Get a collection of rors + * + * @hook API::rors::params [[$collector, $illuminateRequest]] + */ + public function getMany(Request $illuminateRequest): JsonResponse + { + $collector = Repo::ror()->getCollector() + ->limit(self::DEFAULT_COUNT) + ->offset(0); + + foreach ($illuminateRequest->query() as $param => $val) { + switch ($param) { + case 'count': + $collector->limit(min((int) $val, self::MAX_COUNT)); + break; + case 'offset': + $collector->offset((int) $val); + break; + case 'searchPhrase': + $collector->searchPhrase($val); + break; + } + } + + Hook::call('API::rors::params', [$collector, $illuminateRequest]); + + $rors = $collector->getMany(); + + return response()->json([ + 'itemsMax' => $collector->getCount(), + 'items' => Repo::ror()->getSchemaMap()->summarizeMany($rors->values())->values(), + ], Response::HTTP_OK); + } +} diff --git a/classes/facades/Repo.php b/classes/facades/Repo.php index cbfb448f7d1..d4661c18a92 100644 --- a/classes/facades/Repo.php +++ b/classes/facades/Repo.php @@ -3,8 +3,8 @@ /** * @file classes/facades/Repo.php * - * Copyright (c) 2014-2021 Simon Fraser University - * Copyright (c) 2000-2021 John Willinsky + * Copyright (c) 2014-2024 Simon Fraser University + * Copyright (c) 2000-2024 John Willinsky * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. * * @class Repo @@ -39,6 +39,7 @@ use PKP\log\Repository as EmailLogEntryRepository; use PKP\note\Repository as NoteRepository; use PKP\notification\Notification as NotificationRepository; +use PKP\ror\Repository as RorRepository; use PKP\stageAssignment\Repository as StageAssignmentRepository; use PKP\submissionFile\Repository as SubmissionFileRepository; use PKP\userGroup\Repository as UserGroupRepository; @@ -115,6 +116,11 @@ public static function jats(): JatsRepository return app(JatsRepository::class); } + public static function ror(): RorRepository + { + return app(RorRepository::class); + } + public static function stageAssignment(): StageAssignmentRepository { return app(StageAssignmentRepository::class); diff --git a/classes/migration/install/RorsMigration.php b/classes/migration/install/RorsMigration.php new file mode 100644 index 00000000000..3d195861ef4 --- /dev/null +++ b/classes/migration/install/RorsMigration.php @@ -0,0 +1,63 @@ +comment('Ror registry dataset cache'); + $table->bigInteger('ror_id')->autoIncrement(); + $table->string('ror')->nullable(false); + $table->string('display_locale', 28)->default(''); + $table->smallInteger('is_active')->nullable(false)->default(0); + + $table->unique(['ror'], 'rors_unique'); + $table->index(['display_locale'], 'rors_display_locale'); + $table->index(['is_active'], 'rors_is_active'); + }); + + Schema::create('ror_settings', function (Blueprint $table) { + $table->comment('More data about Ror registry dataset cache'); + $table->bigInteger('ror_setting_id')->autoIncrement(); + $table->bigInteger('ror_id'); + $table->string('locale', 28)->default(''); + $table->string('setting_name', 255); + $table->mediumText('setting_value')->nullable(); + + $table->index(['ror_id'], 'ror_settings_ror_id'); + $table->unique(['ror_id', 'locale', 'setting_name'], 'ror_settings_unique'); + $table->foreign('ror_id') + ->references('ror_id')->on('rors')->cascadeOnDelete(); + }); + } + + /** + * Reverse the migration. + */ + public function down(): void + { + Schema::drop('ror_settings'); + Schema::drop('rors'); + } +} diff --git a/classes/migration/upgrade/v3_4_0/I7135_CreateNewRorRegistryCacheTables.php b/classes/migration/upgrade/v3_4_0/I7135_CreateNewRorRegistryCacheTables.php new file mode 100644 index 00000000000..a5f8c0503cb --- /dev/null +++ b/classes/migration/upgrade/v3_4_0/I7135_CreateNewRorRegistryCacheTables.php @@ -0,0 +1,64 @@ +comment('Ror registry dataset cache'); + $table->bigInteger('ror_id')->autoIncrement(); + $table->string('ror')->nullable(false); + $table->string('display_locale', 28)->default(''); + $table->smallInteger('is_active')->nullable(false)->default(0); + + $table->unique(['ror'], 'rors_unique'); + $table->index(['display_locale'], 'rors_display_locale'); + $table->index(['is_active'], 'rors_is_active'); + }); + + Schema::create('ror_settings', function (Blueprint $table) { + $table->comment('More data about Ror registry dataset cache'); + $table->bigInteger('ror_setting_id')->autoIncrement(); + $table->bigInteger('ror_id'); + $table->string('locale', 28)->default(''); + $table->string('setting_name', 255); + $table->mediumText('setting_value')->nullable(); + + $table->index(['ror_id'], 'ror_settings_ror_id'); + $table->unique(['ror_id', 'locale', 'setting_name'], 'ror_settings_unique'); + $table->foreign('ror_id') + ->references('ror_id')->on('rors')->cascadeOnDelete(); + }); + } + + /** + * Reverse the downgrades + * + * @throws DowngradeNotSupportedException + */ + public function down(): void + { + throw new DowngradeNotSupportedException(); + } +} diff --git a/classes/ror/Collector.php b/classes/ror/Collector.php new file mode 100644 index 00000000000..4a91f8965f5 --- /dev/null +++ b/classes/ror/Collector.php @@ -0,0 +1,125 @@ +dao = $dao; + } + + public function getCount(): int + { + return $this->dao->getCount($this); + } + + /** + * @return Collection + */ + public function getIds(): Collection + { + return $this->dao->getIds($this); + } + + /** + * @copydoc DAO::getMany() + * + * @return LazyCollection + */ + public function getMany(): LazyCollection + { + return $this->dao->getMany($this); + } + + /** + * Filter rors by those matching a search query + */ + public function searchPhrase(?string $phrase): self + { + $this->searchPhrase = $phrase; + return $this; + } + + /** + * Limit the number of objects retrieved + */ + public function limit(?int $count): self + { + $this->count = $count; + return $this; + } + + /** + * Offset the number of objects retrieved, for example to + * retrieve the second page of contents + */ + public function offset(?int $offset): self + { + $this->offset = $offset; + return $this; + } + + /** + * @copydoc CollectorInterface::getQueryBuilder() + */ + public function getQueryBuilder(): Builder + { + $qb = DB::table($this->dao->table . ' as r')->select('r.*'); + + if ($this->searchPhrase !== null) { + $words = explode(' ', $this->searchPhrase); + if (count($words)) { + foreach ($words as $word) { + $word = addcslashes($word, '%_'); + $qb->where(function ($qb) use ($word) { + $qb->whereIn('r.ror_id', function ($qb) use ($word) { + $qb->select('rss.ror_id') + ->from($this->dao->settingsTable . ' as rss') + ->where('rss.setting_name', '=', 'name') + ->where(DB::raw('lower(rss.setting_value)'), 'LIKE', DB::raw("lower('%{$word}%')")); + }) + ->orWhere(function ($qb) use ($word) { + $qb->where('r.ror', 'like', '%'. $word . '%'); + }); + }); + } + } + } + + if (!is_null($this->count)) { + $qb->limit($this->count); + } + + if (!is_null($this->offset)) { + $qb->offset($this->offset); + } + + return $qb; + } +} diff --git a/classes/ror/DAO.php b/classes/ror/DAO.php new file mode 100644 index 00000000000..47f98d7a323 --- /dev/null +++ b/classes/ror/DAO.php @@ -0,0 +1,199 @@ + + */ +class DAO extends EntityDAO +{ + use EntityWithParent; + + /** @copydoc EntityDAO::$schema */ + public $schema = PKPSchemaService::SCHEMA_ROR; + + /** @copydoc EntityDAO::$table */ + public $table = 'rors'; + + /** @copydoc EntityDAO::$settingsTable */ + public $settingsTable = 'ror_settings'; + + /** @copydoc EntityDAO::$primaryKeyColumn */ + public $primaryKeyColumn = 'ror_id'; + + /** @copydoc EntityDAO::$primaryTableColumns */ + public $primaryTableColumns = [ + 'id' => 'ror_id', + 'ror' => 'ror', + 'displayLocale' => 'display_locale', + 'isActive' => 'is_active' + ]; + + /** + * Get the parent object ID column name + */ + public function getParentColumn(): string + { + return 'ror_id'; + } + + /** + * Instantiate a new DataObject + */ + public function newDataObject(): Ror + { + return App::make(Ror::class); + } + + /** + * Get the number of RORs matching the configured query + */ + public function getCount(Collector $query): int + { + return $query + ->getQueryBuilder() + ->getCountForPagination(); + } + + /** + * Get a list of ids matching the configured query + * + * @return Collection + */ + public function getIds(Collector $query): Collection + { + return $query + ->getQueryBuilder() + ->select('r.' . $this->primaryKeyColumn) + ->pluck('r.' . $this->primaryKeyColumn); + } + + /** + * Get a collection of rors matching the configured query + * + * @return LazyCollection + */ + public function getMany(Collector $query): LazyCollection + { + $rows = $query + ->getQueryBuilder() + ->get(); + + return LazyCollection::make(function () use ($rows) { + foreach ($rows as $row) { + yield $row->ror_id => $this->fromRow($row); + } + }); + } + + /** + * @copydoc EntityDAO::fromRow() + */ + public function fromRow(object $row): Ror + { + /** @var Ror $ror */ + $ror = parent::fromRow($row); + + return $ror; + } + + /** + * @copydoc EntityDAO::insert() + */ + public function insert(Ror $ror): int + { + return parent::_insert($ror); + } + + /** + * @copydoc EntityDAO::update() + */ + public function update(Ror $ror): void + { + if (empty($ror->getId())) { + $ror->setId($this->getIdByRor($ror->getData('ror'))); + } + + parent::_update($ror); + } + + /** + * @copydoc EntityDAO::delete() + */ + public function delete(Ror $ror): void + { + parent::_delete($ror); + } + + /** + * Get ror_id for given ror. + * + * @param string $ror + * @return int + */ + public function getIdByRor(string $ror): int + { + $row = DB::table($this->table) + ->where('ror', '=', $ror) + ->first($this->primaryKeyColumn); + + if (!empty($row->{$this->primaryKeyColumn})) { + return $row->{$this->primaryKeyColumn}; + } + + return 0; + } + + /** + * Check if ror exists with given ror + * + * @param string $ror + * @return bool + */ + public function existsByRor(string $ror): bool + { + return DB::table($this->table) + ->where('ror', '=', $ror) + ->exists(); + } + + /** + * Insert on duplicate update. + * + * @param Ror $ror + * @return void + */ + public function updateOrInsert(Ror $ror): void + { + if ($this->existsByRor($ror->getData('ror'))) { + $this->update($ror); + } else { + $this->insert($ror); + } + } +} diff --git a/classes/ror/Repository.php b/classes/ror/Repository.php new file mode 100644 index 00000000000..5cee6e4d325 --- /dev/null +++ b/classes/ror/Repository.php @@ -0,0 +1,170 @@ + */ + protected $schemaService; + + public function __construct(DAO $dao, Request $request, PKPSchemaService $schemaService) + { + $this->dao = $dao; + $this->request = $request; + $this->schemaService = $schemaService; + } + + /** @copydoc DAO::newDataObject() */ + public function newDataObject(array $params = []): Ror + { + $object = $this->dao->newDataObject(); + if (!empty($params)) { + $object->setAllData($params); + } + return $object; + } + + /** @copydoc DAO::exists() */ + public function exists(int $id, ?int $contextId = null): bool + { + return $this->dao->exists($id, $contextId); + } + + /** @copydoc DAO::get() */ + public function get(int $id, ?int $contextId = null): ?Ror + { + return $this->dao->get($id, $contextId); + } + + /** @copydoc DAO::getCollector() */ + public function getCollector(): Collector + { + return App::make(Collector::class); + } + + /** + * Get an instance of the map class for mapping + * rors to their schema + */ + public function getSchemaMap(): maps\Schema + { + return app('maps')->withExtensions($this->schemaMap); + } + + /** + * Validate properties for a ror + * + * Perform validation checks on data used to add or edit a ror. + * + * @param Ror|null $object Ror being edited. Pass `null` if creating a new submission + * @param array $props A key/value array with the new data to validate + * @param array $allowedLocales The context's supported locales + * @param string $primaryLocale The context's primary locale + * + * @return array A key/value array with validation errors. Empty if no errors + * + * @hook Ror::validate [[&$errors, $object, $props, $allowedLocales, $primaryLocale]] + */ + public function validate(?Ror $object, array $props, array $allowedLocales, string $primaryLocale): array + { + $errors = []; + + $validator = ValidatorFactory::make( + $props, + $this->schemaService->getValidationRules($this->dao->schema, $allowedLocales) + ); + + // Check required fields if we're adding a ror + ValidatorFactory::required( + $validator, + $object, + $this->schemaService->getRequiredProps($this->dao->schema), + $this->schemaService->getMultilingualProps($this->dao->schema), + $allowedLocales, + $primaryLocale + ); + + // Check for input from disallowed locales + ValidatorFactory::allowedLocales($validator, $this->schemaService->getMultilingualProps($this->dao->schema), $allowedLocales); + + if ($validator->fails()) { + $errors = $this->schemaService->formatValidationErrors($validator->errors()); + } + + Hook::call('Ror::validate', [&$errors, $object, $props, $allowedLocales, $primaryLocale]); + + return $errors; + } + + /** @copydoc DAO::insert() */ + public function add(Ror $ror): int + { + $id = $this->dao->insert($ror); + Hook::call('Ror::add', [$ror]); + return $id; + } + + /** @copydoc DAO::update() */ + public function edit(Ror $ror, array $params): void + { + $newRor = clone $ror; + $newRor->setAllData(array_merge($newRor->_data, $params)); + Hook::call('Ror::edit', [$newRor, $ror, $params]); + $this->dao->update($newRor); + } + + /** @copydoc DAO::delete() */ + public function delete(Ror $ror): void + { + Hook::call('Ror::delete::before', [$ror]); + $this->dao->delete($ror); + Hook::call('Ror::delete', [$ror]); + } + + /** + * Delete a collection of rors + */ + public function deleteMany(Collector $collector): void + { + foreach ($collector->getMany() as $ror) { + $this->delete($ror); + } + } + + /** + * Insert on duplicate update. + * + * @param Ror $ror + * @return void + */ + public function updateOrInsert(Ror $ror): void + { + $this->dao->updateOrInsert($ror); + } +} diff --git a/classes/ror/Ror.php b/classes/ror/Ror.php new file mode 100644 index 00000000000..03506520975 --- /dev/null +++ b/classes/ror/Ror.php @@ -0,0 +1,26 @@ +mapByProperties($this->getProps(), $item); + } + + /** + * Summarize a ror + * + * Includes properties with the apiSummary flag in the ror schema. + */ + public function summarize(Ror $item): array + { + return $this->mapByProperties($this->getSummaryProps(), $item); + } + + /** + * Map a collection of Rors + * + * @see self::map + */ + public function mapMany(Enumerable $collection): Enumerable + { + $this->collection = $collection; + return $collection->map(function ($item) { + return $this->map($item); + }); + } + + /** + * Summarize a collection of Rors + * + * @see self::summarize + */ + public function summarizeMany(Enumerable $collection): Enumerable + { + $this->collection = $collection; + return $collection->map(function ($item) { + return $this->summarize($item); + }); + } + + /** + * Map schema properties of a Ror to an assoc array + */ + protected function mapByProperties(array $props, Ror $item): array + { + $output = []; + foreach ($props as $prop) { + switch ($prop) { + default: + $output[$prop] = $item->getData($prop); + break; + } + } + $output = $this->schemaService->addMissingMultilingualValues($this->schema, $output, $this->context->getSupportedFormLocales()); + ksort($output); + return $this->withExtensions($output, $item); + } +} diff --git a/classes/scheduledTask/PKPScheduler.php b/classes/scheduledTask/PKPScheduler.php index fd20d3e4b52..14b62bc158b 100644 --- a/classes/scheduledTask/PKPScheduler.php +++ b/classes/scheduledTask/PKPScheduler.php @@ -27,6 +27,7 @@ use PKP\scheduledTask\ScheduleTaskRunner; use PKP\task\RemoveUnvalidatedExpiredUsers; use PKP\plugins\interfaces\HasTaskScheduler; +use PKP\task\UpdateRorRegistryDataset; abstract class PKPScheduler { @@ -107,7 +108,14 @@ public function registerSchedules(): void ->daily() ->name(RemoveExpiredInvitations::class) ->withoutOverlapping(); - + + $this + ->schedule + ->call(fn () => (new UpdateRorRegistryDataset)->execute()) + ->twiceMonthly() + ->name(UpdateRorRegistryDataset::class) + ->withoutOverlapping(); + // We only load all plugins and register their scheduled tasks when running under the CLI // On the web based task runner the scheduled tasks must be registered before it starts running if (PKPContainer::getInstance()->runningInConsole()) { diff --git a/classes/services/PKPSchemaService.php b/classes/services/PKPSchemaService.php index 327715bb284..b6026b697eb 100644 --- a/classes/services/PKPSchemaService.php +++ b/classes/services/PKPSchemaService.php @@ -2,8 +2,8 @@ /** * @file classes/services/PKPSchemaService.php * - * Copyright (c) 2014-2021 Simon Fraser University - * Copyright (c) 2000-2021 John Willinsky + * Copyright (c) 2014-2024 Simon Fraser University + * Copyright (c) 2000-2024 John Willinsky * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. * * @class PKPSchemaService @@ -41,6 +41,7 @@ class PKPSchemaService public const SCHEMA_PUBLICATION = 'publication'; public const SCHEMA_REVIEW_ASSIGNMENT = 'reviewAssignment'; public const SCHEMA_REVIEW_ROUND = 'reviewRound'; + public const SCHEMA_ROR = 'ror'; public const SCHEMA_SECTION = 'section'; public const SCHEMA_SITE = 'site'; public const SCHEMA_SUBMISSION = 'submission'; diff --git a/classes/task/UpdateRorRegistryDataset.php b/classes/task/UpdateRorRegistryDataset.php new file mode 100644 index 00000000000..90704d28714 --- /dev/null +++ b/classes/task/UpdateRorRegistryDataset.php @@ -0,0 +1,247 @@ + 'en', 'setting_name' => 'name', 'setting_value' => 'name'] + * 27 ror_display_lang ror_settings['locale' => '', 'setting_name' => 'default_locale', 'setting_value' => 'en'] + * 29 status ror_settings['locale' => '', 'setting_name' => 'is_active', 'setting_value' => '1'] + * + * | index | ror registry | ojs | + * |-------|-----------------------------------------|--------------| + * | 0 | id | rors.ror | + * | 1 | admin.created.date | | + * | 2 | admin.created.schema_version | | + * | 3 | admin.last_modified.date | | + * | 4 | admin.last_modified.schema_version | | + * | 5 | domains | | + * | 6 | established | | + * | 7 | external_ids.type.fundref.all | | + * | 8 | external_ids.type.fundref.preferred | | + * | 9 | external_ids.type.grid.all | | + * | 10 | external_ids.type.grid.preferred | | + * | 11 | external_ids.type.isni.all | | + * | 12 | external_ids.type.isni.preferred | | + * | 13 | external_ids.type.wikidata.all | | + * | 14 | external_ids.type.wikidata.preferred | | + * | 15 | links.type.website | | + * | 16 | links.type.wikipedia | | + * | 17 | locations.geonames_id | | + * | 18 | locations.geonames_details.country_code | | + * | 19 | locations.geonames_details.country_name | | + * | 20 | locations.geonames_details.lat | | + * | 21 | locations.geonames_details.lng | | + * | 22 | locations.geonames_details.name | | + * | 23 | names.types.acronym | | + * | 24 | names.types.alias | | + * | 25 | names.types.label | ror_settings | + * | 26 | names.types.ror_display | ror_settings | + * | 27 | ror_display_lang | ror_settings | + * | 28 | relationships | | + * | 29 | status | ror_settings | + */ + +namespace PKP\task; + +use APP\core\Application; +use DirectoryIterator; +use Exception; +use GuzzleHttp\Exception\GuzzleException; +use PKP\facades\Repo; +use PKP\file\PrivateFileManager; +use PKP\scheduledTask\ScheduledTask; +use PKP\scheduledTask\ScheduledTaskHelper; +use ZipArchive; + +class UpdateRorRegistryDataset extends ScheduledTask +{ + /** @var PrivateFileManager */ + private PrivateFileManager $fileManager; + + /** @var string API Url of the data dump versions. */ + private string $urlVersions = 'https://zenodo.org/api/communities/ror-data/records?q=&sort=newest'; + + /** @var string The file contains the following text in the name. */ + private string $csvNameContains = 'ror-data_schema_v2.csv'; + + /** @var string The prefix used for the temporary zip file and the extracted directory. */ + private string $prefix = 'TemporaryRorRegistryCache'; + + /** @var array|int[] Mappings database vs CSV */ + private array $dataMapping = [ + 'ror' => 0, + 'displayLocale' => 27, + 'isActive' => 29, + 'names' => 25 + ]; + + /** @var array|string[] Mapping of locales between registry and ojs */ + private array $localeMapping = [ + ['no_lang_code'], + ['en'] + ]; + + /** @copydoc ScheduledTask::getName() */ + public function getName(): string + { + return __('admin.scheduledTask.UpdateRorRegistryDataset'); + } + + /** @copydoc ScheduledTask::executeActions() */ + public function executeActions(): bool + { + $this->fileManager = new PrivateFileManager(); + $pathZipFile = $this->fileManager->getBasePath() . DIRECTORY_SEPARATOR . $this->prefix . '.zip'; + $pathZipDir = $this->fileManager->getBasePath() . DIRECTORY_SEPARATOR . $this->prefix; + $downloadUrl = ''; + $pathCsv = ''; + + try { + // cleanup + $this->cleanup([$pathZipFile, $pathZipDir]); + + $client = Application::get()->getHttpClient(); + + // get url of the latest version + $response = $client->request('GET', $this->urlVersions); + $responseArray = json_decode($response->getBody(), true); + if ($response->getStatusCode() !== 200 || json_last_error() !== JSON_ERROR_NONE || empty($responseArray)) { + return ''; + } + if (!empty($responseArray['hits']['hits'][0]['files'][0]['links']['self'])) { + $downloadUrl = $responseArray['hits']['hits'][0]['files'][0]['links']['self']; + } + if (empty($downloadUrl)) return false; + + // download file + $client->request('GET', $downloadUrl, ['sink' => $pathZipFile]); + if (!$this->fileManager->fileExists($pathZipFile)) return false; + + // extract file + $zip = new ZipArchive(); + if ($zip->open($pathZipFile) === true) { + $zip->extractTo($pathZipDir); + $zip->close(); + } + if (!$this->fileManager->fileExists($pathZipDir, 'dir')) return false; + + // find csv file + $iterator = new DirectoryIterator($pathZipDir); + foreach ($iterator as $fileinfo) { + if (!$fileinfo->isDot()) { + if (str_contains($fileinfo->getFilename(), $this->csvNameContains)) { + $pathCsv = $fileinfo->getPathname(); + break; + } + } + } + if (!$this->fileManager->fileExists($pathCsv)) return false; + + // process csv file + $i = 1; + if (($handle = fopen($pathCsv, 'r')) !== false) { + while (($row = fgetcsv($handle, 0)) !== false) { + if ($i > 1) $this->processRow($row); + $i++; + } + fclose($handle); + } + + // cleanup + $this->cleanup([$pathZipFile, $pathZipDir]); + + return true; + + } catch (GuzzleException|Exception $e) { + $this->addExecutionLogEntry( + $e->getMessage(), + ScheduledTaskHelper::SCHEDULED_TASK_MESSAGE_TYPE_ERROR + ); + + return false; + } + } + + /** + * Process row and update database + * + * @param array $row + */ + private function processRow(array $row): void + { + $params = []; + + // ror < id + $params['ror'] = $row[$this->dataMapping['ror']]; + + // display_locale : ror_display_lang + $params['displayLocale'] = + str_replace( + $this->localeMapping[0], + $this->localeMapping[1], + $row[$this->dataMapping['displayLocale']] + ); + + // is_active < status + $params['isActive'] = 0; + if (strtolower($row[$this->dataMapping['isActive']]) === 'active') { + $params['isActive'] = 1; + } + + // locale, name < names.types.label + // "en: label1; it: label2" => [["name"]["en"] => "label1"],["name"]["it" => "label2"]] + if (!empty($row[$this->dataMapping['names']])) { + $tmp1 = array_map('trim', explode(';', $row[$this->dataMapping['names']])); + for ($i = 0; $i < count($tmp1); $i++) { + $tmp2 = array_map('trim', explode(':', $tmp1[$i])); + if (count($tmp2) === 2) { + $tmp2[0] = + str_replace( + $this->localeMapping[0], + $this->localeMapping[1], + $tmp2[0] + ); + $params['name'][$tmp2[0]] = trim($tmp2[1]); + } + } + } + + Repo::ror()->updateOrInsert(Repo::ror()->newDataObject($params)); + } + + /** + * Cleanup temporary files and directories. + * + * @param array $paths + * @return void + */ + private function cleanup(array $paths = []): void + { + foreach ($paths as $path) { + if ($this->fileManager->fileExists($path, 'dir')) { + foreach (new DirectoryIterator($path) as $fileInfo) { + if (!$fileInfo->isDot()) { + $this->fileManager->deleteByPath($fileInfo->getPathname()); + } + } + $this->fileManager->rmdir($path); + } elseif ($this->fileManager->fileExists($path)) { + $this->fileManager->deleteByPath($path); + } + } + } +} diff --git a/locale/ar/admin.po b/locale/ar/admin.po index a73e571caad..f005668270f 100644 --- a/locale/ar/admin.po +++ b/locale/ar/admin.po @@ -183,6 +183,9 @@ msgstr "" "فشلت إعادة تسمية ملف قاعدة بيانات DB-IP city lite {$sourceFilename} إلى " "{$targetFilename}." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "مهمة تحميل ملف إحصائيات الاستعمال" diff --git a/locale/az/admin.po b/locale/az/admin.po index 181fac19eb2..1fe513a2358 100644 --- a/locale/az/admin.po +++ b/locale/az/admin.po @@ -439,6 +439,9 @@ msgstr "" "Fayl sıxılmırdı. Açılan təyinat GZ-Fayl {$filePath} GZClose ilə bağlana " "bilmədi." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "İstifadə Statistikası Fayl Yükləyicisi vəzifəsi" diff --git a/locale/bg/admin.po b/locale/bg/admin.po index 0efd1eb4d8e..68ba884eef9 100644 --- a/locale/bg/admin.po +++ b/locale/bg/admin.po @@ -213,6 +213,9 @@ msgstr "" "Преименуването на файла с DB-IP city lite база данни {$sourceFilename} на " "{$targetFilename} не бе успешно." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Статистика за ползване на задача за зареждане на файлове" diff --git a/locale/bs/admin.po b/locale/bs/admin.po index ed8fbb667ba..5ef1fbe711d 100644 --- a/locale/bs/admin.po +++ b/locale/bs/admin.po @@ -203,6 +203,9 @@ msgstr "" msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/ca/admin.po b/locale/ca/admin.po index 23034c0f65c..0003fb72239 100644 --- a/locale/ca/admin.po +++ b/locale/ca/admin.po @@ -216,6 +216,9 @@ msgstr "" "El canvi de nom de l'arxiu de la base de dades DB-IP city lite " "{$sourceFilename} per {$targetFilename} ha fallat." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Tasca de càrrega d'arxius d'estadístiques d'ús" diff --git a/locale/ckb/admin.po b/locale/ckb/admin.po index 6c7c4dc921a..1fc2752e461 100644 --- a/locale/ckb/admin.po +++ b/locale/ckb/admin.po @@ -196,6 +196,9 @@ msgstr "" msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/cnr/admin.po b/locale/cnr/admin.po index 560d8246f6d..5472bdcd105 100644 --- a/locale/cnr/admin.po +++ b/locale/cnr/admin.po @@ -400,6 +400,9 @@ msgstr "Proces poslova na čekanju" msgid "admin.scheduledTask.updateGeoDB" msgstr "Ažurirajte DB-IP city lite bazu podataka" +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Zadatak učitavanja fajla statistike korištenja" diff --git a/locale/cs/admin.po b/locale/cs/admin.po index c3a1497c702..d7f20bbe164 100644 --- a/locale/cs/admin.po +++ b/locale/cs/admin.po @@ -207,6 +207,9 @@ msgstr "" "Přejmenování souboru databáze DB-IP city lite {$sourceFilename} na " "{$targetFilename} se nezdařilo." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Úloha nahrání souboru statistik využití" diff --git a/locale/da/admin.po b/locale/da/admin.po index 40738501ede..5d14995133a 100644 --- a/locale/da/admin.po +++ b/locale/da/admin.po @@ -214,6 +214,9 @@ msgstr "" "Omdøbningen af DB-IP city lite database-filen {$sourceFilename} til " "{$targetFilename} mislykkedes." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Brugerstatistik over fil-loader-opgave" diff --git a/locale/de/admin.po b/locale/de/admin.po index b1f2444d80b..a23ddd82678 100644 --- a/locale/de/admin.po +++ b/locale/de/admin.po @@ -217,6 +217,9 @@ msgstr "" "Umbenennung der DB-IP city lite Datenbank-Datei {$sourceFilename} zu " "{$targetFilename} fehlgeschlagen." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Task zum Laden der Nutzungsstatistik-Datei" diff --git a/locale/el/admin.po b/locale/el/admin.po index 47c76a4935d..dc5fa9b5b64 100644 --- a/locale/el/admin.po +++ b/locale/el/admin.po @@ -208,6 +208,9 @@ msgstr "" msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Εργασία φόρτωσης αρχείων στατιστικών χρήσης" diff --git a/locale/en/admin.po b/locale/en/admin.po index 039a4a81888..a7b54e66222 100644 --- a/locale/en/admin.po +++ b/locale/en/admin.po @@ -209,6 +209,9 @@ msgstr "" "Renaming the DB-IP city lite database file {$sourceFilename} to " "{$targetFilename} failed." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "Update Ror registry dataset cache" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Usage statistics file loader task" diff --git a/locale/es/admin.po b/locale/es/admin.po index 89acd057c41..a2edc60e661 100644 --- a/locale/es/admin.po +++ b/locale/es/admin.po @@ -216,6 +216,9 @@ msgstr "" "El cambio de nombre del archivo de la base de datos DB-IP city lite " "{$sourceFilename} por {$targetFilename} ha fallado." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Tarea de carga de archivo de estadísticas de uso" diff --git a/locale/eu/admin.po b/locale/eu/admin.po index b067b270ef9..12048340a63 100644 --- a/locale/eu/admin.po +++ b/locale/eu/admin.po @@ -188,6 +188,9 @@ msgstr "" msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/fa/admin.po b/locale/fa/admin.po index 0477db66faf..1e836f9c4b5 100644 --- a/locale/fa/admin.po +++ b/locale/fa/admin.po @@ -206,6 +206,9 @@ msgstr "" "تغییر نام فایل دیتابیس DB-IP با نام {$sourceFilename} به {$targetFilename} " "با شکست مواجه شد." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "وظیفه بارگزار فایل آمار کارکرد" diff --git a/locale/fi/admin.po b/locale/fi/admin.po index 397c6f6385f..6c8b4d421b9 100644 --- a/locale/fi/admin.po +++ b/locale/fi/admin.po @@ -209,6 +209,9 @@ msgstr "" "DB-IP city lite -tietokantatiedoston {$sourceFilename} uudelleennimeäminen " "muotoon {$targetFilename} epäonnistui." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Kävijätilastotiedostojen ajoitettu tehtävä" diff --git a/locale/fr_CA/admin.po b/locale/fr_CA/admin.po index 6d2a40bb2d2..d6dd8b9cfe7 100644 --- a/locale/fr_CA/admin.po +++ b/locale/fr_CA/admin.po @@ -225,6 +225,9 @@ msgstr "" "Le renommage du fichier de base de données DB-IP city lite {$sourceFilename} " "par {$targetFilename} a échoué." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Tâche de versement du fichier de statistiques d'utilisation" diff --git a/locale/fr_FR/admin.po b/locale/fr_FR/admin.po index 6baaea76789..02986d2dd64 100644 --- a/locale/fr_FR/admin.po +++ b/locale/fr_FR/admin.po @@ -220,6 +220,9 @@ msgstr "" "L'opération de renommage du fichier de la base de données DB-IP city lite " "{$sourceFilename} en {$targetFilename} a échoué." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Tâche de chargement du fichier de statistiques d'utilisation" diff --git a/locale/gl/admin.po b/locale/gl/admin.po index 6d1de9635e3..ddaae2c5966 100644 --- a/locale/gl/admin.po +++ b/locale/gl/admin.po @@ -197,6 +197,9 @@ msgstr "" msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/hr/admin.po b/locale/hr/admin.po index 121126ebdf1..4e1369151fe 100644 --- a/locale/hr/admin.po +++ b/locale/hr/admin.po @@ -216,6 +216,9 @@ msgstr "" "Promjena imena datoteke baze podataka DB-IP city lite {$sourceFilename} u " "{$targetFilename} nije uspjela." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Zadatak učitavanja datoteke statistike korištenja" diff --git a/locale/hu/admin.po b/locale/hu/admin.po index 934bdebf4cc..8c0b4281c21 100644 --- a/locale/hu/admin.po +++ b/locale/hu/admin.po @@ -216,6 +216,9 @@ msgstr "" "A DB-IP city lite adatbázis fájljának átnevezése erről {$sourceFilename} " "erre {$targetFilename} nem sikerült." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Használati statisztika file töltési feladata" diff --git a/locale/hy/admin.po b/locale/hy/admin.po index 512b68bc52d..6050f2fb3f7 100644 --- a/locale/hy/admin.po +++ b/locale/hy/admin.po @@ -202,6 +202,9 @@ msgstr "" "Չհաջողվեց վերանվանել DB-IP city lite տվյալների բազայի ֆայլը " "{$sourceFilename} դեպի {$targetFilename}:" +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Օգտագործման վիճակագրության ֆայլերի բեռնիչի առաջադրանք" diff --git a/locale/id/admin.po b/locale/id/admin.po index 32172901750..a5ab1d6147e 100644 --- a/locale/id/admin.po +++ b/locale/id/admin.po @@ -197,6 +197,9 @@ msgstr "" msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Beban loader file statistik pemakaian" diff --git a/locale/is/admin.po b/locale/is/admin.po index 83b20f62f74..e7189ac8bf8 100644 --- a/locale/is/admin.po +++ b/locale/is/admin.po @@ -195,6 +195,9 @@ msgstr "" msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/it/admin.po b/locale/it/admin.po index 50e243f2888..d99538ad788 100644 --- a/locale/it/admin.po +++ b/locale/it/admin.po @@ -212,6 +212,9 @@ msgstr "" "La ridenominazione del file del database DB-IP city lite {$sourceFilename} " "in {$targetFilename} non è riuscita." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Nome del task per il carico delle statistiche d'uso" diff --git a/locale/ja/admin.po b/locale/ja/admin.po index f0c6e921dee..e1f4b3c2d42 100644 --- a/locale/ja/admin.po +++ b/locale/ja/admin.po @@ -193,6 +193,9 @@ msgstr "" msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/ka/admin.po b/locale/ka/admin.po index c3d3a7b6e84..61b5c041e1e 100644 --- a/locale/ka/admin.po +++ b/locale/ka/admin.po @@ -201,6 +201,9 @@ msgstr "" msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/kk/admin.po b/locale/kk/admin.po index db4da8d5ede..4573d03d518 100644 --- a/locale/kk/admin.po +++ b/locale/kk/admin.po @@ -203,6 +203,9 @@ msgstr "" msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/lv/admin.po b/locale/lv/admin.po index 6e3d1027e17..01c7c1b6bb7 100644 --- a/locale/lv/admin.po +++ b/locale/lv/admin.po @@ -207,6 +207,9 @@ msgstr "" "DB-IP city lite datubāzes datnes {$sourceFilename} pārdēvēšana uz " "{$targetFilename} neizdevās." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Lietošanas statistikas datņu ielādes darbuzdevums" diff --git a/locale/mk/admin.po b/locale/mk/admin.po index ac6ed50b2d0..d7a8ea4bdef 100644 --- a/locale/mk/admin.po +++ b/locale/mk/admin.po @@ -211,6 +211,9 @@ msgstr "" "Преименувањето на датотеката со базата на податоци на DB-IP city lite " "{$sourceFilename} во {$targetFilename} не успеа." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Користи постапка за фајл од корисничка статистика" diff --git a/locale/ms/admin.po b/locale/ms/admin.po index c791c526e0d..fec76b9efec 100644 --- a/locale/ms/admin.po +++ b/locale/ms/admin.po @@ -209,6 +209,9 @@ msgstr "" "Gagal menamakan semula fail pangkalan data DB-IP city lite {$sourceFilename} " "kepada {$targetFilename}." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Tugasan pemuat fail statistik penggunaan" diff --git a/locale/nb/admin.po b/locale/nb/admin.po index 8e4de4987cf..3655e7457ef 100644 --- a/locale/nb/admin.po +++ b/locale/nb/admin.po @@ -211,6 +211,9 @@ msgstr "" "Endring av navn på databasefilen DB-IP city lite fra {$sourceFilename} til " "{$targetFilename} mislyktes." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Oppgave for lasting av filer til bruksstatistikk" diff --git a/locale/nl/admin.po b/locale/nl/admin.po index 4a1a05c691f..ffac020752d 100644 --- a/locale/nl/admin.po +++ b/locale/nl/admin.po @@ -192,6 +192,9 @@ msgstr "" msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/pl/admin.po b/locale/pl/admin.po index f51a49fd6fc..22737484f45 100644 --- a/locale/pl/admin.po +++ b/locale/pl/admin.po @@ -210,6 +210,9 @@ msgstr "" "Zmiana nazwy pliku bazy danych DB-IP City Lite {$sourceFilename} na " "{$targetFilename} nie powiodła się." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Zadanie ładowarki pliku statystyk użycia" diff --git a/locale/pt_BR/admin.po b/locale/pt_BR/admin.po index f8388241be2..e346b28ecec 100644 --- a/locale/pt_BR/admin.po +++ b/locale/pt_BR/admin.po @@ -213,6 +213,9 @@ msgstr "" "Falha ao renomear o arquivo de banco de dados DB-IP city lite " "{$sourceFilename} para {$targetFilename}." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Tarefa do carregador de arquivo de estatísticas de uso" diff --git a/locale/pt_PT/admin.po b/locale/pt_PT/admin.po index faa7a0abe33..3e1861c71a9 100644 --- a/locale/pt_PT/admin.po +++ b/locale/pt_PT/admin.po @@ -213,6 +213,9 @@ msgstr "" "Falha ao renomear o ficheiro da base de dados DB-IP city lite " "{$sourceFilename} para {$targetFilename}." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Tarefa carregador de ficheiros de estatísticas de utilização" diff --git a/locale/ro/admin.po b/locale/ro/admin.po index 88ff7cef91c..8177990fa31 100644 --- a/locale/ro/admin.po +++ b/locale/ro/admin.po @@ -198,6 +198,9 @@ msgstr "" msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/ru/admin.po b/locale/ru/admin.po index 52da84b6f57..77281c266e6 100644 --- a/locale/ru/admin.po +++ b/locale/ru/admin.po @@ -216,6 +216,9 @@ msgstr "" "Переименование файла базы данных DB-IP city lite {$sourceFilename} в " "{$targetFilename} не удалось." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Задача загрузчика файлов статистики использования" diff --git a/locale/sl/admin.po b/locale/sl/admin.po index 5ffbc65a7ce..b9124db6610 100644 --- a/locale/sl/admin.po +++ b/locale/sl/admin.po @@ -208,6 +208,9 @@ msgstr "" "Preimenovanje datoteke DB-IP city lite baze podatkov {$sourceFilename} v " "{$targetFilename} ni uspelo." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Opravilo nalagalnika datoteke s statistikami" diff --git a/locale/sr@cyrillic/admin.po b/locale/sr@cyrillic/admin.po index 50aab32c2f6..2c67459e963 100644 --- a/locale/sr@cyrillic/admin.po +++ b/locale/sr@cyrillic/admin.po @@ -202,6 +202,9 @@ msgstr "" msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/sr@latin/admin.po b/locale/sr@latin/admin.po index 9f907745f23..82a8547e7eb 100644 --- a/locale/sr@latin/admin.po +++ b/locale/sr@latin/admin.po @@ -203,6 +203,9 @@ msgstr "" msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/sv/admin.po b/locale/sv/admin.po index 921807de9a6..6a053fbbc7e 100644 --- a/locale/sv/admin.po +++ b/locale/sv/admin.po @@ -204,6 +204,9 @@ msgstr "" msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Filladdningsuppgift för användningsstatistik" diff --git a/locale/tr/admin.po b/locale/tr/admin.po index 183cda87c80..284ddc96071 100644 --- a/locale/tr/admin.po +++ b/locale/tr/admin.po @@ -209,6 +209,9 @@ msgstr "" "DB-IP city lite veritabanı dosyasının {$sourceFilename} olarak " "{$targetFilename} olarak yeniden adlandırılması başarısız oldu." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Kullanım istatistikleri dosya yükleyici görevi" diff --git a/locale/uk/admin.po b/locale/uk/admin.po index 6afae9bb614..4051a9c73d8 100644 --- a/locale/uk/admin.po +++ b/locale/uk/admin.po @@ -214,6 +214,9 @@ msgstr "" "Не вдалося перейменувати файл бази даних DB-IP city lite {$sourceFilename} " "на {$targetFilename}." +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Завдання завантажувача файлів статистики використання" diff --git a/locale/vi/admin.po b/locale/vi/admin.po index 5bfe9e8c26f..c736cbdaff9 100644 --- a/locale/vi/admin.po +++ b/locale/vi/admin.po @@ -196,6 +196,9 @@ msgstr "" msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "Tác vụ trình tải tệp thống kê sử dụng" diff --git a/locale/zh_CN/admin.po b/locale/zh_CN/admin.po index 6d36580b1f1..54d7d5f67e1 100644 --- a/locale/zh_CN/admin.po +++ b/locale/zh_CN/admin.po @@ -189,6 +189,9 @@ msgstr "" msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/zh_Hant/admin.po b/locale/zh_Hant/admin.po index 577391e6793..a85a265e042 100644 --- a/locale/zh_Hant/admin.po +++ b/locale/zh_Hant/admin.po @@ -174,6 +174,9 @@ msgstr "" msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" +msgid "admin.scheduledTask.UpdateRorRegistryDataset" +msgstr "" + msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/schemas/ror.json b/schemas/ror.json new file mode 100644 index 00000000000..c5814ec5b86 --- /dev/null +++ b/schemas/ror.json @@ -0,0 +1,49 @@ +{ + "title": "Ror", + "description": "Ror is an institution on ror.org, this table is a cache of the data dump.", + "required": [ + "ror", + "displayLocale", + "isActive", + "name" + ], + "properties": { + "id": { + "type": "integer", + "description": "The unique id of ror in the database.", + "readOnly": true, + "apiSummary": true + }, + "ror": { + "type": "string", + "description": "The [ROR](https://ror.org/) id of this institution.", + "apiSummary": true, + "validation": [ + "nullable", + "regex:#https://ror.org/0[^ILOU]{6}\\d{2}#" + ] + }, + "displayLocale": { + "type": "string", + "description": "The display language on ror.org of this institution.", + "apiSummary": true, + "validation": [ + "regex:/^([A-Za-z]{2,4})(?[_-]([A-Za-z]{4,5}|[0-9]{4}))?([_-]([A-Za-z]{2}|[0-9]{3}))?(@[a-z]{2,30}(?&sc)?)?$/" + ] + }, + "isActive": { + "type": "boolean", + "description": "Whether this organisation is active or inactive.", + "apiSummary": true + }, + "name": { + "type": "string", + "description": "The name of this institution.", + "multilingual": true, + "apiSummary": true, + "validation": [ + "nullable" + ] + } + } +} From 9aa5fe96ccf9982808cb3975e3fa4a368e9c6fbc Mon Sep 17 00:00:00 2001 From: GaziYucel <84437883+GaziYucel@users.noreply.github.com> Date: Tue, 24 Sep 2024 12:29:21 +0200 Subject: [PATCH 2/6] use PKP\ror\Repository as RorRepository; --- classes/facades/Repo.php | 1 - 1 file changed, 1 deletion(-) diff --git a/classes/facades/Repo.php b/classes/facades/Repo.php index d4661c18a92..08108cc981f 100644 --- a/classes/facades/Repo.php +++ b/classes/facades/Repo.php @@ -39,7 +39,6 @@ use PKP\log\Repository as EmailLogEntryRepository; use PKP\note\Repository as NoteRepository; use PKP\notification\Notification as NotificationRepository; -use PKP\ror\Repository as RorRepository; use PKP\stageAssignment\Repository as StageAssignmentRepository; use PKP\submissionFile\Repository as SubmissionFileRepository; use PKP\userGroup\Repository as UserGroupRepository; From 473c87a3903ff96c6dd461c662d701a7e6742321 Mon Sep 17 00:00:00 2001 From: GaziYucel <84437883+GaziYucel@users.noreply.github.com> Date: Tue, 24 Sep 2024 12:30:26 +0200 Subject: [PATCH 3/6] use PKP\ror\Repository as RorRepository; --- classes/facades/Repo.php | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/facades/Repo.php b/classes/facades/Repo.php index a43f56883cf..99bb2b5f86e 100644 --- a/classes/facades/Repo.php +++ b/classes/facades/Repo.php @@ -40,6 +40,7 @@ use PKP\note\Repository as NoteRepository; use PKP\notification\Repository as NotificationRepository; use PKP\query\Repository as QueryRepository; +use PKP\ror\Repository as RorRepository; use PKP\stageAssignment\Repository as StageAssignmentRepository; use PKP\submissionFile\Repository as SubmissionFileRepository; use PKP\userGroup\Repository as UserGroupRepository; From 2282e940eac2c2e692674e8c7ac38caa156f11d9 Mon Sep 17 00:00:00 2001 From: GaziYucel Date: Sun, 29 Sep 2024 16:46:59 +0200 Subject: [PATCH 4/6] Typo --- classes/task/UpdateRorRegistryDataset.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/task/UpdateRorRegistryDataset.php b/classes/task/UpdateRorRegistryDataset.php index 90704d28714..1ac442ab216 100644 --- a/classes/task/UpdateRorRegistryDataset.php +++ b/classes/task/UpdateRorRegistryDataset.php @@ -203,7 +203,7 @@ private function processRow(array $row): void } // locale, name < names.types.label - // "en: label1; it: label2" => [["name"]["en"] => "label1"],["name"]["it" => "label2"]] + // [["name"]["en"] => "label1"],["name"]["it"] => "label2"]] < "en: label1; it: label2" if (!empty($row[$this->dataMapping['names']])) { $tmp1 = array_map('trim', explode(';', $row[$this->dataMapping['names']])); for ($i = 0; $i < count($tmp1); $i++) { From 55618636752fb23cb0954685f7c34f4ec248064c Mon Sep 17 00:00:00 2001 From: GaziYucel Date: Sun, 29 Sep 2024 16:47:27 +0200 Subject: [PATCH 5/6] No locale in registry refactoring --- classes/task/UpdateRorRegistryDataset.php | 38 ++++++++++------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/classes/task/UpdateRorRegistryDataset.php b/classes/task/UpdateRorRegistryDataset.php index 1ac442ab216..2933ba40d4d 100644 --- a/classes/task/UpdateRorRegistryDataset.php +++ b/classes/task/UpdateRorRegistryDataset.php @@ -89,11 +89,11 @@ class UpdateRorRegistryDataset extends ScheduledTask 'names' => 25 ]; - /** @var array|string[] Mapping of locales between registry and ojs */ - private array $localeMapping = [ - ['no_lang_code'], - ['en'] - ]; + /** @var string No language code available key in registry */ + private string $noLocale = 'no_lang_code'; + + /** @var string Mapping OJS for no language code available in registry */ + private string $noLocaleMapping = 'en'; /** @copydoc ScheduledTask::getName() */ public function getName(): string @@ -189,12 +189,11 @@ private function processRow(array $row): void $params['ror'] = $row[$this->dataMapping['ror']]; // display_locale : ror_display_lang - $params['displayLocale'] = - str_replace( - $this->localeMapping[0], - $this->localeMapping[1], - $row[$this->dataMapping['displayLocale']] - ); + $params['displayLocale'] = str_replace( + $this->noLocale, + $this->noLocaleMapping, + $row[$this->dataMapping['displayLocale']] + ); // is_active < status $params['isActive'] = 0; @@ -205,17 +204,12 @@ private function processRow(array $row): void // locale, name < names.types.label // [["name"]["en"] => "label1"],["name"]["it"] => "label2"]] < "en: label1; it: label2" if (!empty($row[$this->dataMapping['names']])) { - $tmp1 = array_map('trim', explode(';', $row[$this->dataMapping['names']])); - for ($i = 0; $i < count($tmp1); $i++) { - $tmp2 = array_map('trim', explode(':', $tmp1[$i])); - if (count($tmp2) === 2) { - $tmp2[0] = - str_replace( - $this->localeMapping[0], - $this->localeMapping[1], - $tmp2[0] - ); - $params['name'][$tmp2[0]] = trim($tmp2[1]); + $names = array_map('trim', explode(';', $row[$this->dataMapping['names']])); + for ($i = 0; $i < count($names); $i++) { + $name = array_map('trim', explode(':', $names[$i])); + if (count($name) === 2) { + $name[0] = str_replace($this->noLocale, $this->noLocaleMapping, $name[0]); + $params['name'][$name[0]] = trim($name[1]); } } } From 4e4f7190aba288c5841b3595528e3c74211d92cb Mon Sep 17 00:00:00 2001 From: GaziYucel Date: Fri, 4 Oct 2024 11:46:50 +0200 Subject: [PATCH 6/6] Locale add admin.scheduledTask.UpdateRorRegistryDataset --- locale/ar/admin.po | 2 +- locale/az/admin.po | 2 +- locale/bg/admin.po | 2 +- locale/bs/admin.po | 2 +- locale/ca/admin.po | 2 +- locale/ckb/admin.po | 2 +- locale/cnr/admin.po | 2 +- locale/cs/admin.po | 2 +- locale/da/admin.po | 2 +- locale/de/admin.po | 2 +- locale/el/admin.po | 2 +- locale/es/admin.po | 2 +- locale/eu/admin.po | 2 +- locale/fa/admin.po | 2 +- locale/fi/admin.po | 2 +- locale/fr_CA/admin.po | 2 +- locale/fr_FR/admin.po | 2 +- locale/gl/admin.po | 2 +- locale/hr/admin.po | 2 +- locale/hu/admin.po | 2 +- locale/hy/admin.po | 2 +- locale/id/admin.po | 2 +- locale/is/admin.po | 2 +- locale/it/admin.po | 2 +- locale/ja/admin.po | 2 +- locale/ka/admin.po | 2 +- locale/kk/admin.po | 2 +- locale/lv/admin.po | 2 +- locale/mk/admin.po | 2 +- locale/ms/admin.po | 2 +- locale/nb/admin.po | 2 +- locale/nl/admin.po | 2 +- locale/pl/admin.po | 2 +- locale/pt_BR/admin.po | 2 +- locale/pt_PT/admin.po | 2 +- locale/ro/admin.po | 2 +- locale/ru/admin.po | 2 +- locale/sl/admin.po | 2 +- locale/sr@cyrillic/admin.po | 2 +- locale/sr@latin/admin.po | 2 +- locale/sv/admin.po | 2 +- locale/tr/admin.po | 2 +- locale/uk/admin.po | 2 +- locale/vi/admin.po | 2 +- locale/zh_CN/admin.po | 2 +- locale/zh_Hant/admin.po | 2 +- 46 files changed, 46 insertions(+), 46 deletions(-) diff --git a/locale/ar/admin.po b/locale/ar/admin.po index f005668270f..a2bb4910bb1 100644 --- a/locale/ar/admin.po +++ b/locale/ar/admin.po @@ -184,7 +184,7 @@ msgstr "" "{$targetFilename}." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "مهمة تحميل ملف إحصائيات الاستعمال" diff --git a/locale/az/admin.po b/locale/az/admin.po index 1fe513a2358..26fc3e5fe04 100644 --- a/locale/az/admin.po +++ b/locale/az/admin.po @@ -440,7 +440,7 @@ msgstr "" "bilmədi." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "İstifadə Statistikası Fayl Yükləyicisi vəzifəsi" diff --git a/locale/bg/admin.po b/locale/bg/admin.po index 68ba884eef9..1c8576e703b 100644 --- a/locale/bg/admin.po +++ b/locale/bg/admin.po @@ -214,7 +214,7 @@ msgstr "" "{$targetFilename} не бе успешно." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Статистика за ползване на задача за зареждане на файлове" diff --git a/locale/bs/admin.po b/locale/bs/admin.po index 5ef1fbe711d..e66fb10cff4 100644 --- a/locale/bs/admin.po +++ b/locale/bs/admin.po @@ -204,7 +204,7 @@ msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/ca/admin.po b/locale/ca/admin.po index 0003fb72239..f28ef2136dc 100644 --- a/locale/ca/admin.po +++ b/locale/ca/admin.po @@ -217,7 +217,7 @@ msgstr "" "{$sourceFilename} per {$targetFilename} ha fallat." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Tasca de càrrega d'arxius d'estadístiques d'ús" diff --git a/locale/ckb/admin.po b/locale/ckb/admin.po index 1fc2752e461..252ab2b3443 100644 --- a/locale/ckb/admin.po +++ b/locale/ckb/admin.po @@ -197,7 +197,7 @@ msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/cnr/admin.po b/locale/cnr/admin.po index 5472bdcd105..74efd213ea1 100644 --- a/locale/cnr/admin.po +++ b/locale/cnr/admin.po @@ -401,7 +401,7 @@ msgid "admin.scheduledTask.updateGeoDB" msgstr "Ažurirajte DB-IP city lite bazu podataka" msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Zadatak učitavanja fajla statistike korištenja" diff --git a/locale/cs/admin.po b/locale/cs/admin.po index d7f20bbe164..24815bb69c5 100644 --- a/locale/cs/admin.po +++ b/locale/cs/admin.po @@ -208,7 +208,7 @@ msgstr "" "{$targetFilename} se nezdařilo." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Úloha nahrání souboru statistik využití" diff --git a/locale/da/admin.po b/locale/da/admin.po index 5d14995133a..e37e2f61553 100644 --- a/locale/da/admin.po +++ b/locale/da/admin.po @@ -215,7 +215,7 @@ msgstr "" "{$targetFilename} mislykkedes." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Brugerstatistik over fil-loader-opgave" diff --git a/locale/de/admin.po b/locale/de/admin.po index a23ddd82678..ab603cacf25 100644 --- a/locale/de/admin.po +++ b/locale/de/admin.po @@ -218,7 +218,7 @@ msgstr "" "{$targetFilename} fehlgeschlagen." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Task zum Laden der Nutzungsstatistik-Datei" diff --git a/locale/el/admin.po b/locale/el/admin.po index dc5fa9b5b64..6657bdfe189 100644 --- a/locale/el/admin.po +++ b/locale/el/admin.po @@ -209,7 +209,7 @@ msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Εργασία φόρτωσης αρχείων στατιστικών χρήσης" diff --git a/locale/es/admin.po b/locale/es/admin.po index a2edc60e661..37348ed8a96 100644 --- a/locale/es/admin.po +++ b/locale/es/admin.po @@ -217,7 +217,7 @@ msgstr "" "{$sourceFilename} por {$targetFilename} ha fallado." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Tarea de carga de archivo de estadísticas de uso" diff --git a/locale/eu/admin.po b/locale/eu/admin.po index 12048340a63..27929f35513 100644 --- a/locale/eu/admin.po +++ b/locale/eu/admin.po @@ -189,7 +189,7 @@ msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/fa/admin.po b/locale/fa/admin.po index 1e836f9c4b5..b76c774226c 100644 --- a/locale/fa/admin.po +++ b/locale/fa/admin.po @@ -207,7 +207,7 @@ msgstr "" "با شکست مواجه شد." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "وظیفه بارگزار فایل آمار کارکرد" diff --git a/locale/fi/admin.po b/locale/fi/admin.po index 6c8b4d421b9..7632932aee7 100644 --- a/locale/fi/admin.po +++ b/locale/fi/admin.po @@ -210,7 +210,7 @@ msgstr "" "muotoon {$targetFilename} epäonnistui." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Kävijätilastotiedostojen ajoitettu tehtävä" diff --git a/locale/fr_CA/admin.po b/locale/fr_CA/admin.po index d6dd8b9cfe7..b1adc14657a 100644 --- a/locale/fr_CA/admin.po +++ b/locale/fr_CA/admin.po @@ -226,7 +226,7 @@ msgstr "" "par {$targetFilename} a échoué." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Tâche de versement du fichier de statistiques d'utilisation" diff --git a/locale/fr_FR/admin.po b/locale/fr_FR/admin.po index 02986d2dd64..bc3e1d4e4eb 100644 --- a/locale/fr_FR/admin.po +++ b/locale/fr_FR/admin.po @@ -221,7 +221,7 @@ msgstr "" "{$sourceFilename} en {$targetFilename} a échoué." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Tâche de chargement du fichier de statistiques d'utilisation" diff --git a/locale/gl/admin.po b/locale/gl/admin.po index ddaae2c5966..602c632d7bc 100644 --- a/locale/gl/admin.po +++ b/locale/gl/admin.po @@ -198,7 +198,7 @@ msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/hr/admin.po b/locale/hr/admin.po index 4e1369151fe..652834a452c 100644 --- a/locale/hr/admin.po +++ b/locale/hr/admin.po @@ -217,7 +217,7 @@ msgstr "" "{$targetFilename} nije uspjela." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Zadatak učitavanja datoteke statistike korištenja" diff --git a/locale/hu/admin.po b/locale/hu/admin.po index 8c0b4281c21..c3d267cb663 100644 --- a/locale/hu/admin.po +++ b/locale/hu/admin.po @@ -217,7 +217,7 @@ msgstr "" "erre {$targetFilename} nem sikerült." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Használati statisztika file töltési feladata" diff --git a/locale/hy/admin.po b/locale/hy/admin.po index 6050f2fb3f7..8ceb35507b4 100644 --- a/locale/hy/admin.po +++ b/locale/hy/admin.po @@ -203,7 +203,7 @@ msgstr "" "{$sourceFilename} դեպի {$targetFilename}:" msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Օգտագործման վիճակագրության ֆայլերի բեռնիչի առաջադրանք" diff --git a/locale/id/admin.po b/locale/id/admin.po index a5ab1d6147e..85a13e5b447 100644 --- a/locale/id/admin.po +++ b/locale/id/admin.po @@ -198,7 +198,7 @@ msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Beban loader file statistik pemakaian" diff --git a/locale/is/admin.po b/locale/is/admin.po index e7189ac8bf8..a30409db292 100644 --- a/locale/is/admin.po +++ b/locale/is/admin.po @@ -196,7 +196,7 @@ msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/it/admin.po b/locale/it/admin.po index d99538ad788..14f938e20c1 100644 --- a/locale/it/admin.po +++ b/locale/it/admin.po @@ -213,7 +213,7 @@ msgstr "" "in {$targetFilename} non è riuscita." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Nome del task per il carico delle statistiche d'uso" diff --git a/locale/ja/admin.po b/locale/ja/admin.po index e1f4b3c2d42..afd84b803ab 100644 --- a/locale/ja/admin.po +++ b/locale/ja/admin.po @@ -194,7 +194,7 @@ msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/ka/admin.po b/locale/ka/admin.po index 61b5c041e1e..151a8ae5c6f 100644 --- a/locale/ka/admin.po +++ b/locale/ka/admin.po @@ -202,7 +202,7 @@ msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/kk/admin.po b/locale/kk/admin.po index 4573d03d518..8672b019778 100644 --- a/locale/kk/admin.po +++ b/locale/kk/admin.po @@ -204,7 +204,7 @@ msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/lv/admin.po b/locale/lv/admin.po index 01c7c1b6bb7..b6dc1db103a 100644 --- a/locale/lv/admin.po +++ b/locale/lv/admin.po @@ -208,7 +208,7 @@ msgstr "" "{$targetFilename} neizdevās." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Lietošanas statistikas datņu ielādes darbuzdevums" diff --git a/locale/mk/admin.po b/locale/mk/admin.po index d7a8ea4bdef..9c12acfbdbb 100644 --- a/locale/mk/admin.po +++ b/locale/mk/admin.po @@ -212,7 +212,7 @@ msgstr "" "{$sourceFilename} во {$targetFilename} не успеа." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Користи постапка за фајл од корисничка статистика" diff --git a/locale/ms/admin.po b/locale/ms/admin.po index fec76b9efec..8b6c9dc00ef 100644 --- a/locale/ms/admin.po +++ b/locale/ms/admin.po @@ -210,7 +210,7 @@ msgstr "" "kepada {$targetFilename}." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Tugasan pemuat fail statistik penggunaan" diff --git a/locale/nb/admin.po b/locale/nb/admin.po index 3655e7457ef..dceec6f2083 100644 --- a/locale/nb/admin.po +++ b/locale/nb/admin.po @@ -212,7 +212,7 @@ msgstr "" "{$targetFilename} mislyktes." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Oppgave for lasting av filer til bruksstatistikk" diff --git a/locale/nl/admin.po b/locale/nl/admin.po index ffac020752d..26b552cfe72 100644 --- a/locale/nl/admin.po +++ b/locale/nl/admin.po @@ -193,7 +193,7 @@ msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/pl/admin.po b/locale/pl/admin.po index 22737484f45..ee4e216afc9 100644 --- a/locale/pl/admin.po +++ b/locale/pl/admin.po @@ -211,7 +211,7 @@ msgstr "" "{$targetFilename} nie powiodła się." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Zadanie ładowarki pliku statystyk użycia" diff --git a/locale/pt_BR/admin.po b/locale/pt_BR/admin.po index e346b28ecec..d73c65db3e9 100644 --- a/locale/pt_BR/admin.po +++ b/locale/pt_BR/admin.po @@ -214,7 +214,7 @@ msgstr "" "{$sourceFilename} para {$targetFilename}." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Tarefa do carregador de arquivo de estatísticas de uso" diff --git a/locale/pt_PT/admin.po b/locale/pt_PT/admin.po index 3e1861c71a9..18b1be053d7 100644 --- a/locale/pt_PT/admin.po +++ b/locale/pt_PT/admin.po @@ -214,7 +214,7 @@ msgstr "" "{$sourceFilename} para {$targetFilename}." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Tarefa carregador de ficheiros de estatísticas de utilização" diff --git a/locale/ro/admin.po b/locale/ro/admin.po index 8177990fa31..fe9460b8c17 100644 --- a/locale/ro/admin.po +++ b/locale/ro/admin.po @@ -199,7 +199,7 @@ msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/ru/admin.po b/locale/ru/admin.po index 77281c266e6..6d80813b5ee 100644 --- a/locale/ru/admin.po +++ b/locale/ru/admin.po @@ -217,7 +217,7 @@ msgstr "" "{$targetFilename} не удалось." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Задача загрузчика файлов статистики использования" diff --git a/locale/sl/admin.po b/locale/sl/admin.po index b9124db6610..4c7dbdb2fd0 100644 --- a/locale/sl/admin.po +++ b/locale/sl/admin.po @@ -209,7 +209,7 @@ msgstr "" "{$targetFilename} ni uspelo." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Opravilo nalagalnika datoteke s statistikami" diff --git a/locale/sr@cyrillic/admin.po b/locale/sr@cyrillic/admin.po index 2c67459e963..2b6b24300fd 100644 --- a/locale/sr@cyrillic/admin.po +++ b/locale/sr@cyrillic/admin.po @@ -203,7 +203,7 @@ msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/sr@latin/admin.po b/locale/sr@latin/admin.po index 82a8547e7eb..1b0547a3413 100644 --- a/locale/sr@latin/admin.po +++ b/locale/sr@latin/admin.po @@ -204,7 +204,7 @@ msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/sv/admin.po b/locale/sv/admin.po index 6a053fbbc7e..ef1c5639088 100644 --- a/locale/sv/admin.po +++ b/locale/sv/admin.po @@ -205,7 +205,7 @@ msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Filladdningsuppgift för användningsstatistik" diff --git a/locale/tr/admin.po b/locale/tr/admin.po index 284ddc96071..d2235b62d64 100644 --- a/locale/tr/admin.po +++ b/locale/tr/admin.po @@ -210,7 +210,7 @@ msgstr "" "{$targetFilename} olarak yeniden adlandırılması başarısız oldu." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Kullanım istatistikleri dosya yükleyici görevi" diff --git a/locale/uk/admin.po b/locale/uk/admin.po index 4051a9c73d8..4a3154918d9 100644 --- a/locale/uk/admin.po +++ b/locale/uk/admin.po @@ -215,7 +215,7 @@ msgstr "" "на {$targetFilename}." msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Завдання завантажувача файлів статистики використання" diff --git a/locale/vi/admin.po b/locale/vi/admin.po index c736cbdaff9..0b162b1bfab 100644 --- a/locale/vi/admin.po +++ b/locale/vi/admin.po @@ -197,7 +197,7 @@ msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "Tác vụ trình tải tệp thống kê sử dụng" diff --git a/locale/zh_CN/admin.po b/locale/zh_CN/admin.po index 54d7d5f67e1..18e0039418c 100644 --- a/locale/zh_CN/admin.po +++ b/locale/zh_CN/admin.po @@ -190,7 +190,7 @@ msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr "" diff --git a/locale/zh_Hant/admin.po b/locale/zh_Hant/admin.po index a85a265e042..cd74d3780f6 100644 --- a/locale/zh_Hant/admin.po +++ b/locale/zh_Hant/admin.po @@ -175,7 +175,7 @@ msgid "admin.scheduledTask.updateGeoDB.fileRename.error" msgstr "" msgid "admin.scheduledTask.UpdateRorRegistryDataset" -msgstr "" +msgstr "Update Ror registry dataset cache" msgid "admin.scheduledTask.usageStatsLoader" msgstr ""