From 9f8aae3a1845a0dea16baa3e4b0037d3e0cd85c8 Mon Sep 17 00:00:00 2001 From: amercader Date: Mon, 1 Jun 2015 17:54:22 +0100 Subject: [PATCH 01/17] Append site id to queue name This allows multiple CKAN sites to share the same RabbitMQ exchange (For the Redis backend this is handled via different Redis databases) --- ckanext/harvest/queue.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/ckanext/harvest/queue.py b/ckanext/harvest/queue.py index b8c4131..bb1d63c 100644 --- a/ckanext/harvest/queue.py +++ b/ckanext/harvest/queue.py @@ -64,14 +64,25 @@ def get_connection_redis(): port=int(config.get('ckan.harvest.mq.port', REDIS_PORT)), db=int(config.get('ckan.harvest.mq.redis_db', REDIS_DB))) + +def get_gather_queue_name(): + return 'ckan.harvest.{0}.gather'.format(config.get('ckan.site_id', + 'default')) + + +def get_fetch_queue_name(): + return 'ckan.harvest.{0}.fetch'.format(config.get('ckan.site_id', + 'default')) + + def purge_queues(): backend = config.get('ckan.harvest.mq.type', MQ_TYPE) connection = get_connection() if backend in ('amqp', 'ampq'): channel = connection.channel() - channel.queue_purge(queue='ckan.harvest.gather') - channel.queue_purge(queue='ckan.harvest.fetch') + channel.queue_purge(queue=get_gather_queue_name()) + channel.queue_purge(queue=get_fetch_queue_name()) return if backend == 'redis': connection.flushall() @@ -334,12 +345,12 @@ def fetch_and_import_stages(harvester, obj): obj.save() def get_gather_consumer(): - consumer = get_consumer('ckan.harvest.gather','harvest_job_id') + consumer = get_consumer(get_gather_queue_name(), 'harvest_job_id') log.debug('Gather queue consumer registered') return consumer def get_fetch_consumer(): - consumer = get_consumer('ckan.harvest.fetch','harvest_object_id') + consumer = get_consumer(get_fetch_queue_name(), 'harvest_object_id') log.debug('Fetch queue consumer registered') return consumer From fd93a69da9cad71896e21f82cbb21024f7629c34 Mon Sep 17 00:00:00 2001 From: amercader Date: Mon, 1 Jun 2015 17:55:37 +0100 Subject: [PATCH 02/17] Document extra connection parameters --- README.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.rst b/README.rst index 09d97b6..2456375 100644 --- a/README.rst +++ b/README.rst @@ -66,6 +66,23 @@ Installation ckan.harvest.mq.type = redis +There are a number of configuration options available for the backends. These don't need to +be modified at all if you are using the default Redis or RabbitMQ install (step 1). The list +below shows the available options and their default values: + + * Redis: + - ``ckan.harvest.mq.hostname`` (localhost) + - ``ckan.harvest.mq.port`` (6379) + - ``ckan.harvest.mq.redis_db`` (0) + + * RabbitMQ: + - ``ckan.harvest.mq.user_id`` (guest) + - ``ckan.harvest.mq.password`` (guest) + - ``ckan.harvest.mq.hostname`` (localhost) + - ``ckan.harvest.mq.port`` (5672) + - ``ckan.harvest.mq.virtual_host`` (/) + + Configuration ============= From 56e3ef4b793eb6558eff0310b175f1987483d6b9 Mon Sep 17 00:00:00 2001 From: joetsoi Date: Wed, 10 Jun 2015 09:55:36 +0100 Subject: [PATCH 03/17] i18n setup files --- i18n/ckanext-harvest.pot | 554 ++++++++++++++++++++++++ i18n/sv/LC_MESSAGES/ckanext-harvest.mo | Bin 0 -> 434 bytes i18n/sv/LC_MESSAGES/ckanext-harvest.po | 558 +++++++++++++++++++++++++ setup.cfg | 22 + setup.py | 9 + 5 files changed, 1143 insertions(+) create mode 100644 i18n/ckanext-harvest.pot create mode 100644 i18n/sv/LC_MESSAGES/ckanext-harvest.mo create mode 100644 i18n/sv/LC_MESSAGES/ckanext-harvest.po diff --git a/i18n/ckanext-harvest.pot b/i18n/ckanext-harvest.pot new file mode 100644 index 0000000..bfdef1c --- /dev/null +++ b/i18n/ckanext-harvest.pot @@ -0,0 +1,554 @@ +# Translations template for ckanext-harvest. +# Copyright (C) 2015 ORGANIZATION +# This file is distributed under the same license as the ckanext-harvest +# project. +# FIRST AUTHOR , 2015. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: ckanext-harvest 0.2\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2015-06-10 09:47+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 0.9.6\n" + +#: ckanext/harvest/helpers.py:70 +msgid "title" +msgstr "" + +#: ckanext/harvest/controllers/organization.py:41 +msgid "Group not found" +msgstr "" + +#: ckanext/harvest/controllers/organization.py:43 +#, python-format +msgid "Unauthorized to read group %s" +msgstr "" + +#: ckanext/harvest/controllers/organization.py:69 +msgid "Cannot render description" +msgstr "" + +#: ckanext/harvest/controllers/organization.py:151 +msgid "Groups" +msgstr "" + +#: ckanext/harvest/controllers/organization.py:152 +msgid "Tags" +msgstr "" + +#: ckanext/harvest/controllers/organization.py:153 +msgid "Formats" +msgstr "" + +#: ckanext/harvest/controllers/organization.py:154 +msgid "Licence" +msgstr "" + +#: ckanext/harvest/controllers/view.py:27 +msgid "Not authorized to see this page" +msgstr "" + +#: ckanext/harvest/controllers/view.py:44 +msgid "Harvesting source successfully cleared" +msgstr "" + +#: ckanext/harvest/controllers/view.py:46 +msgid "Harvesting source successfully inactivated" +msgstr "" + +#: ckanext/harvest/controllers/view.py:50 ckanext/harvest/controllers/view.py:61 +#: ckanext/harvest/controllers/view.py:82 ckanext/harvest/controllers/view.py:143 +#: ckanext/harvest/controllers/view.py:181 ckanext/harvest/controllers/view.py:192 +#: ckanext/harvest/controllers/view.py:218 ckanext/harvest/logic/auth/create.py:34 +#: ckanext/harvest/logic/auth/delete.py:18 ckanext/harvest/logic/auth/get.py:33 +#: ckanext/harvest/logic/auth/update.py:19 +msgid "Harvest source not found" +msgstr "" + +#: ckanext/harvest/controllers/view.py:59 +msgid "Refresh requested, harvesting will take place within 15 minutes." +msgstr "" + +#: ckanext/harvest/controllers/view.py:66 +msgid "" +"Cannot create new harvest jobs on inactive sources. First, please change the " +"source status to 'active'." +msgstr "" + +#: ckanext/harvest/controllers/view.py:69 +msgid "A harvest job has already been scheduled for this source" +msgstr "" + +#: ckanext/harvest/controllers/view.py:80 +msgid "Harvest source cleared" +msgstr "" + +#: ckanext/harvest/controllers/view.py:108 +msgid "No content found" +msgstr "" + +#: ckanext/harvest/controllers/view.py:168 +msgid "Harvest job not found" +msgstr "" + +#: ckanext/harvest/controllers/view.py:201 +#: ckanext/harvest/templates_new/source/admin.html:15 +#: ckanext/harvest/templates_new/source/job/list.html:13 +msgid "No jobs yet for this source" +msgstr "" + +#: ckanext/harvest/logic/auth/create.py:19 +msgid "User {0} not authorized to create harvest sources" +msgstr "" + +#: ckanext/harvest/logic/auth/create.py:42 +msgid "User not authorized to create a job for source {0}" +msgstr "" + +#: ckanext/harvest/logic/auth/create.py:52 +msgid "Only sysadmins can create harvest jobs for all sources" +msgstr "" + +#: ckanext/harvest/logic/auth/create.py:63 +msgid "Only the sysadmins can create harvest objects" +msgstr "" + +#: ckanext/harvest/logic/auth/delete.py:27 +msgid "User {0} not authorized to delete harvest source {1}" +msgstr "" + +#: ckanext/harvest/logic/auth/get.py:42 +msgid "User {0} not authorized to read harvest source {1}" +msgstr "" + +#: ckanext/harvest/logic/auth/get.py:82 +msgid "User {0} not authorized to see jobs from source {1}" +msgstr "" + +#: ckanext/harvest/logic/auth/get.py:104 +msgid "User {0} not authorized to list jobs for source {1}" +msgstr "" + +#: ckanext/harvest/logic/auth/update.py:28 +msgid "User {0} not authorized to update harvest source {1}" +msgstr "" + +#: ckanext/harvest/logic/auth/update.py:45 +msgid "Only sysadmins can reimport all harvest objects" +msgstr "" + +#: ckanext/harvest/logic/auth/update.py:57 +msgid "Only sysadmins can run the pending harvest jobs" +msgstr "" + +#: ckanext/harvest/logic/auth/update.py:68 +msgid "Only sysadmins can reindex all harvest sources" +msgstr "" + +#: ckanext/harvest/templates_new/index.html:3 +msgid "Harvesting Sources" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/add_source_button.html:6 +#: ckanext/harvest/templates_new/source/org_source_list.html:11 +msgid "Add Harvest Source" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/job_details.html:26 +#: ckanext/harvest/templates_new/source/job/list.html:38 +msgid "errors" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/job_details.html:41 +msgid "Details" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/job_details.html:48 +msgid "Id" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/job_details.html:52 +msgid "Created" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/job_details.html:56 +msgid "Started" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/job_details.html:60 +msgid "Finished" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/job_details.html:64 +msgid "Status" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/job_error_summary.html:18 +msgid "Count" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/job_error_summary.html:19 +msgid "Message" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/search_result_text.html:4 +msgid "{number} harvest source found for \"{query}\"" +msgid_plural "{number} harvest sources found for \"{query}\"" +msgstr[0] "" +msgstr[1] "" + +#: ckanext/harvest/templates_new/snippets/search_result_text.html:5 +#: ckanext/harvest/templates_new/source/org_source_list.html:17 +#: ckanext/harvest/templates_new/source/search_2.0.html:27 +msgid "Sorry no harvest sources found for \"{query}\"" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/search_result_text.html:6 +msgid "{number} harvest source found" +msgid_plural "{number} harvest sources found" +msgstr[0] "" +msgstr[1] "" + +#: ckanext/harvest/templates_new/snippets/search_result_text.html:7 +#: ckanext/harvest/templates_new/source/org_source_list.html:25 +msgid "Sorry no harvest sources found" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/source_item.html:28 +msgid "Draft" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/source_item.html:30 +#: ckanext/harvest/templates_new/source/new_source_form.html:83 +msgid "Deleted" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/source_item.html:37 +#: ckanext/harvest/templates_new/source/about.html:9 +#: ckanext/harvest/templates_new/source/read_base.html:25 +msgid "There is no description for this harvest source" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/source_item.html:42 +#: ckanext/harvest/templates_new/source/read_base.html:30 +#: ckanext/harvest/templates_new/source/read_base.html:53 +msgid "Datasets" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/source_item.html:45 +#: ckanext/harvest/templates_new/source/new_source_form.html:63 +msgid "Organization" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin.html:11 +msgid "View full job report" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:7 +#: ckanext/harvest/templates_new/source/read_base.html:4 +msgid "Admin" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:15 +msgid "" +"This will re-run the harvesting for this source. Any updates at the source " +"will overwrite the local datasets. Sources with a large number of datasets " +"may take a significant amount of time to finish harvesting. Please confirm " +"you would like us to start reharvesting." +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:18 +msgid "Start a new harvesting job for this harvest source now" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:20 +msgid "Reharvest" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:24 +msgid "" +"Warning: This will remove all datasets for this source, as well as all " +"previous job reports. Are you sure you want to continue?" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:27 +msgid "Delete all harvest jobs and existing datasets from this source" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:28 +msgid "Clear" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:32 +msgid "View harvest source" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:48 +msgid "Dashboard" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:49 +msgid "Jobs" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:50 +msgid "Edit" +msgstr "" + +#: ckanext/harvest/templates_new/source/base.html:17 +msgid "Organizations" +msgstr "" + +#: ckanext/harvest/templates_new/source/base.html:19 +#: ckanext/harvest/templates_new/source/base.html:22 +#: ckanext/harvest/templates_new/source/new.html:4 +#: ckanext/harvest/templates_new/source/org_source_list.html:3 +#: ckanext/harvest/templates_new/source/org_source_list.html:7 +#: ckanext/harvest/templates_new/source/org_source_list.html:19 +#: ckanext/harvest/templates_new/source/search.html:7 +msgid "Harvest Sources" +msgstr "" + +#: ckanext/harvest/templates_new/source/edit.html:3 +msgid "Edit harvest source" +msgstr "" + +#: ckanext/harvest/templates_new/source/new.html:5 +msgid "Create Harvest Source" +msgstr "" + +#: ckanext/harvest/templates_new/source/new.html:11 +msgid "Create harvest source" +msgstr "" + +#: ckanext/harvest/templates_new/source/new.html:23 +#: ckanext/harvest/templates_new/source/search.html:3 +msgid "Harvest sources" +msgstr "" + +#: ckanext/harvest/templates_new/source/new.html:26 +msgid "" +" Harvest sources allow importing remote metadata into this catalog. Remote " +"sources can be other catalogs such as other CKAN instances, CSW servers or " +"Web Accessible Folders (WAF) (depending on the actual harvesters enabled for " +"this instance). " +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:8 +msgid "URL" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:10 +msgid "This should include the http:// part of the URL" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:14 +msgid "Title" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:14 +msgid "eg. A descriptive title" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:21 +msgid "Name" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:21 +msgid "eg. my-dataset" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:23 +msgid "Description" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:43 +msgid "Update frequency" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:46 +msgid "Configuration" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:66 +msgid "No organization" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:79 +msgid "State" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:82 +msgid "Active" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:92 +msgid "" +"This will flag the source as deleted but keep all its datasets and previous " +"jobs. Are you sure you want to delete this harvest source?" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:93 +msgid "" +"Warning: Apart from deleting this source, this command will remove all its " +"datasets, as well as all previous job reports. Are you sure you want to " +"continue?" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:96 +msgid "Delete" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:102 +msgid "Delete source" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:107 +msgid "Delete and clear source" +msgstr "" + +#: ckanext/harvest/templates_new/source/org_source_list.html:15 +#: ckanext/harvest/templates_new/source/search_2.0.html:25 +msgid " found for \"{query}\"" +msgstr "" + +#: ckanext/harvest/templates_new/source/org_source_list.html:31 +msgid "Search sources..." +msgstr "" + +#: ckanext/harvest/templates_new/source/org_source_list.html:32 +#: ckanext/harvest/templates_new/source/search_2.0.html:8 +msgid "Search" +msgstr "" + +#: ckanext/harvest/templates_new/source/read_base.html:22 +msgid "read more" +msgstr "" + +#: ckanext/harvest/templates_new/source/read_base.html:54 +msgid "About" +msgstr "" + +#: ckanext/harvest/templates_new/source/search.html:44 +msgid "Relevance" +msgstr "" + +#: ckanext/harvest/templates_new/source/search.html:45 +msgid "Name Ascending" +msgstr "" + +#: ckanext/harvest/templates_new/source/search.html:46 +msgid "Name Descending" +msgstr "" + +#: ckanext/harvest/templates_new/source/search.html:47 +msgid "Last Modified" +msgstr "" + +#: ckanext/harvest/templates_new/source/search.html:48 +msgid "Popular" +msgstr "" + +#: ckanext/harvest/templates_new/source/search.html:50 +msgid "Search harvest sources..." +msgstr "" + +#: ckanext/harvest/templates_new/source/search_2.0.html:7 +msgid "Search..." +msgstr "" + +#: ckanext/harvest/templates_new/source/search_2.0.html:29 +msgid "All harvest sources" +msgstr "" + +#: ckanext/harvest/templates_new/source/search_2.0.html:42 +msgid "Remove" +msgstr "" + +#: ckanext/harvest/templates_new/source/search_2.0.html:49 +msgid "add a new one" +msgstr "" + +#: ckanext/harvest/templates_new/source/search_2.0.html:55 +msgid "" +"

There was an error while searching. Please try " +"again.

" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/list.html:5 +#: ckanext/harvest/templates_new/source/job/list.html:10 +msgid "Harvest Jobs" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/list.html:21 +msgid "Job: " +msgstr "" + +#: ckanext/harvest/templates_new/source/job/list.html:28 +msgid "Started:" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/list.html:28 +#: ckanext/harvest/templates_new/source/job/list.html:30 +msgid "Not yet" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/list.html:30 +msgid "Finished:" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:3 +#: ckanext/harvest/templates_new/source/job/read.html:12 +msgid "Job Report" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:9 +msgid "Back to job list" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:18 +#: ckanext/harvest/templates_new/source/job/read.html:22 +msgid "Error Summary" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:19 +msgid "No errors for this job" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:23 +msgid "Only the 20 most frequent errors are shown" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:26 +#: ckanext/harvest/templates_new/source/job/read.html:40 +msgid "Job Errors" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:30 +#: ckanext/harvest/templates_new/source/job/read.html:57 +msgid "Document Errors" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:37 +msgid "Error Report" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:58 +msgid "documents with errors" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:69 +msgid "Remote content" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:73 +msgid "Local content" +msgstr "" + diff --git a/i18n/sv/LC_MESSAGES/ckanext-harvest.mo b/i18n/sv/LC_MESSAGES/ckanext-harvest.mo new file mode 100644 index 0000000000000000000000000000000000000000..f53c285b1fd092eff2981fe9baf374ca748782a5 GIT binary patch literal 434 zcmaKoOHaZ;5XUj`v`5b##>9h02e(Zmuu#IQ7?M^ARPRe!YPIY(yIUf6zk*-S&*D}O z=*3AUna4l#_9vOIX`uNUMIio+Qsj#iFIwR)r&|i&er%Ow8@oZkiK#$-Yh zpch4hB5x|4^~t=bG%s+f^wuzt<#%cVzY9NMa3SF=0Pm8-vp77E@S2p2m9#>-JNBh} z$T~1LWx;dVh13Bu!UmPyVEdq}@7)NEp-j~}ml=chD!1fLNTD4Rhi}hd#8;wlWIN3k GX?y|AL3_yn literal 0 HcmV?d00001 diff --git a/i18n/sv/LC_MESSAGES/ckanext-harvest.po b/i18n/sv/LC_MESSAGES/ckanext-harvest.po new file mode 100644 index 0000000..7317ca2 --- /dev/null +++ b/i18n/sv/LC_MESSAGES/ckanext-harvest.po @@ -0,0 +1,558 @@ +# Swedish translations for ckanext-harvest. +# Copyright (C) 2015 ORGANIZATION +# This file is distributed under the same license as the ckanext-harvest +# project. +# FIRST AUTHOR , 2015. +# +msgid "" +msgstr "" +"Project-Id-Version: ckanext-harvest 0.2\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2015-06-10 09:47+0100\n" +"PO-Revision-Date: 2015-06-10 09:47+0100\n" +"Last-Translator: FULL NAME \n" +"Language-Team: sv \n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 0.9.6\n" + +#: ckanext/harvest/helpers.py:70 +msgid "title" +msgstr "" + +#: ckanext/harvest/controllers/organization.py:41 +msgid "Group not found" +msgstr "" + +#: ckanext/harvest/controllers/organization.py:43 +#, python-format +msgid "Unauthorized to read group %s" +msgstr "" + +#: ckanext/harvest/controllers/organization.py:69 +msgid "Cannot render description" +msgstr "" + +#: ckanext/harvest/controllers/organization.py:151 +msgid "Groups" +msgstr "" + +#: ckanext/harvest/controllers/organization.py:152 +msgid "Tags" +msgstr "" + +#: ckanext/harvest/controllers/organization.py:153 +msgid "Formats" +msgstr "" + +#: ckanext/harvest/controllers/organization.py:154 +msgid "Licence" +msgstr "" + +#: ckanext/harvest/controllers/view.py:27 +msgid "Not authorized to see this page" +msgstr "" + +#: ckanext/harvest/controllers/view.py:44 +msgid "Harvesting source successfully cleared" +msgstr "" + +#: ckanext/harvest/controllers/view.py:46 +msgid "Harvesting source successfully inactivated" +msgstr "" + +#: ckanext/harvest/controllers/view.py:50 +#: ckanext/harvest/controllers/view.py:61 +#: ckanext/harvest/controllers/view.py:82 +#: ckanext/harvest/controllers/view.py:143 +#: ckanext/harvest/controllers/view.py:181 +#: ckanext/harvest/controllers/view.py:192 +#: ckanext/harvest/controllers/view.py:218 +#: ckanext/harvest/logic/auth/create.py:34 +#: ckanext/harvest/logic/auth/delete.py:18 ckanext/harvest/logic/auth/get.py:33 +#: ckanext/harvest/logic/auth/update.py:19 +msgid "Harvest source not found" +msgstr "" + +#: ckanext/harvest/controllers/view.py:59 +msgid "Refresh requested, harvesting will take place within 15 minutes." +msgstr "" + +#: ckanext/harvest/controllers/view.py:66 +msgid "" +"Cannot create new harvest jobs on inactive sources. First, please change " +"the source status to 'active'." +msgstr "" + +#: ckanext/harvest/controllers/view.py:69 +msgid "A harvest job has already been scheduled for this source" +msgstr "" + +#: ckanext/harvest/controllers/view.py:80 +msgid "Harvest source cleared" +msgstr "" + +#: ckanext/harvest/controllers/view.py:108 +msgid "No content found" +msgstr "" + +#: ckanext/harvest/controllers/view.py:168 +msgid "Harvest job not found" +msgstr "" + +#: ckanext/harvest/controllers/view.py:201 +#: ckanext/harvest/templates_new/source/admin.html:15 +#: ckanext/harvest/templates_new/source/job/list.html:13 +msgid "No jobs yet for this source" +msgstr "" + +#: ckanext/harvest/logic/auth/create.py:19 +msgid "User {0} not authorized to create harvest sources" +msgstr "" + +#: ckanext/harvest/logic/auth/create.py:42 +msgid "User not authorized to create a job for source {0}" +msgstr "" + +#: ckanext/harvest/logic/auth/create.py:52 +msgid "Only sysadmins can create harvest jobs for all sources" +msgstr "" + +#: ckanext/harvest/logic/auth/create.py:63 +msgid "Only the sysadmins can create harvest objects" +msgstr "" + +#: ckanext/harvest/logic/auth/delete.py:27 +msgid "User {0} not authorized to delete harvest source {1}" +msgstr "" + +#: ckanext/harvest/logic/auth/get.py:42 +msgid "User {0} not authorized to read harvest source {1}" +msgstr "" + +#: ckanext/harvest/logic/auth/get.py:82 +msgid "User {0} not authorized to see jobs from source {1}" +msgstr "" + +#: ckanext/harvest/logic/auth/get.py:104 +msgid "User {0} not authorized to list jobs for source {1}" +msgstr "" + +#: ckanext/harvest/logic/auth/update.py:28 +msgid "User {0} not authorized to update harvest source {1}" +msgstr "" + +#: ckanext/harvest/logic/auth/update.py:45 +msgid "Only sysadmins can reimport all harvest objects" +msgstr "" + +#: ckanext/harvest/logic/auth/update.py:57 +msgid "Only sysadmins can run the pending harvest jobs" +msgstr "" + +#: ckanext/harvest/logic/auth/update.py:68 +msgid "Only sysadmins can reindex all harvest sources" +msgstr "" + +#: ckanext/harvest/templates_new/index.html:3 +msgid "Harvesting Sources" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/add_source_button.html:6 +#: ckanext/harvest/templates_new/source/org_source_list.html:11 +msgid "Add Harvest Source" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/job_details.html:26 +#: ckanext/harvest/templates_new/source/job/list.html:38 +msgid "errors" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/job_details.html:41 +msgid "Details" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/job_details.html:48 +msgid "Id" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/job_details.html:52 +msgid "Created" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/job_details.html:56 +msgid "Started" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/job_details.html:60 +msgid "Finished" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/job_details.html:64 +msgid "Status" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/job_error_summary.html:18 +msgid "Count" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/job_error_summary.html:19 +msgid "Message" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/search_result_text.html:4 +msgid "{number} harvest source found for \"{query}\"" +msgid_plural "{number} harvest sources found for \"{query}\"" +msgstr[0] "" +msgstr[1] "" + +#: ckanext/harvest/templates_new/snippets/search_result_text.html:5 +#: ckanext/harvest/templates_new/source/org_source_list.html:17 +#: ckanext/harvest/templates_new/source/search_2.0.html:27 +msgid "Sorry no harvest sources found for \"{query}\"" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/search_result_text.html:6 +msgid "{number} harvest source found" +msgid_plural "{number} harvest sources found" +msgstr[0] "" +msgstr[1] "" + +#: ckanext/harvest/templates_new/snippets/search_result_text.html:7 +#: ckanext/harvest/templates_new/source/org_source_list.html:25 +msgid "Sorry no harvest sources found" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/source_item.html:28 +msgid "Draft" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/source_item.html:30 +#: ckanext/harvest/templates_new/source/new_source_form.html:83 +msgid "Deleted" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/source_item.html:37 +#: ckanext/harvest/templates_new/source/about.html:9 +#: ckanext/harvest/templates_new/source/read_base.html:25 +msgid "There is no description for this harvest source" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/source_item.html:42 +#: ckanext/harvest/templates_new/source/read_base.html:30 +#: ckanext/harvest/templates_new/source/read_base.html:53 +msgid "Datasets" +msgstr "" + +#: ckanext/harvest/templates_new/snippets/source_item.html:45 +#: ckanext/harvest/templates_new/source/new_source_form.html:63 +msgid "Organization" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin.html:11 +msgid "View full job report" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:7 +#: ckanext/harvest/templates_new/source/read_base.html:4 +msgid "Admin" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:15 +msgid "" +"This will re-run the harvesting for this source. Any updates at the " +"source will overwrite the local datasets. Sources with a large number of " +"datasets may take a significant amount of time to finish harvesting. " +"Please confirm you would like us to start reharvesting." +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:18 +msgid "Start a new harvesting job for this harvest source now" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:20 +msgid "Reharvest" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:24 +msgid "" +"Warning: This will remove all datasets for this source, as well as all " +"previous job reports. Are you sure you want to continue?" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:27 +msgid "Delete all harvest jobs and existing datasets from this source" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:28 +msgid "Clear" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:32 +msgid "View harvest source" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:48 +msgid "Dashboard" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:49 +msgid "Jobs" +msgstr "" + +#: ckanext/harvest/templates_new/source/admin_base.html:50 +msgid "Edit" +msgstr "" + +#: ckanext/harvest/templates_new/source/base.html:17 +msgid "Organizations" +msgstr "" + +#: ckanext/harvest/templates_new/source/base.html:19 +#: ckanext/harvest/templates_new/source/base.html:22 +#: ckanext/harvest/templates_new/source/new.html:4 +#: ckanext/harvest/templates_new/source/org_source_list.html:3 +#: ckanext/harvest/templates_new/source/org_source_list.html:7 +#: ckanext/harvest/templates_new/source/org_source_list.html:19 +#: ckanext/harvest/templates_new/source/search.html:7 +msgid "Harvest Sources" +msgstr "" + +#: ckanext/harvest/templates_new/source/edit.html:3 +msgid "Edit harvest source" +msgstr "" + +#: ckanext/harvest/templates_new/source/new.html:5 +msgid "Create Harvest Source" +msgstr "" + +#: ckanext/harvest/templates_new/source/new.html:11 +msgid "Create harvest source" +msgstr "" + +#: ckanext/harvest/templates_new/source/new.html:23 +#: ckanext/harvest/templates_new/source/search.html:3 +msgid "Harvest sources" +msgstr "" + +#: ckanext/harvest/templates_new/source/new.html:26 +msgid "" +" Harvest sources allow importing remote metadata into this catalog. " +"Remote sources can be other catalogs such as other CKAN instances, CSW " +"servers or Web Accessible Folders (WAF) (depending on the actual " +"harvesters enabled for this instance). " +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:8 +msgid "URL" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:10 +msgid "This should include the http:// part of the URL" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:14 +msgid "Title" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:14 +msgid "eg. A descriptive title" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:21 +msgid "Name" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:21 +msgid "eg. my-dataset" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:23 +msgid "Description" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:43 +msgid "Update frequency" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:46 +msgid "Configuration" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:66 +msgid "No organization" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:79 +msgid "State" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:82 +msgid "Active" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:92 +msgid "" +"This will flag the source as deleted but keep all its datasets and " +"previous jobs. Are you sure you want to delete this harvest source?" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:93 +msgid "" +"Warning: Apart from deleting this source, this command will remove all " +"its datasets, as well as all previous job reports. Are you sure you want " +"to continue?" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:96 +msgid "Delete" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:102 +msgid "Delete source" +msgstr "" + +#: ckanext/harvest/templates_new/source/new_source_form.html:107 +msgid "Delete and clear source" +msgstr "" + +#: ckanext/harvest/templates_new/source/org_source_list.html:15 +#: ckanext/harvest/templates_new/source/search_2.0.html:25 +msgid " found for \"{query}\"" +msgstr "" + +#: ckanext/harvest/templates_new/source/org_source_list.html:31 +msgid "Search sources..." +msgstr "" + +#: ckanext/harvest/templates_new/source/org_source_list.html:32 +#: ckanext/harvest/templates_new/source/search_2.0.html:8 +msgid "Search" +msgstr "" + +#: ckanext/harvest/templates_new/source/read_base.html:22 +msgid "read more" +msgstr "" + +#: ckanext/harvest/templates_new/source/read_base.html:54 +msgid "About" +msgstr "" + +#: ckanext/harvest/templates_new/source/search.html:44 +msgid "Relevance" +msgstr "" + +#: ckanext/harvest/templates_new/source/search.html:45 +msgid "Name Ascending" +msgstr "" + +#: ckanext/harvest/templates_new/source/search.html:46 +msgid "Name Descending" +msgstr "" + +#: ckanext/harvest/templates_new/source/search.html:47 +msgid "Last Modified" +msgstr "" + +#: ckanext/harvest/templates_new/source/search.html:48 +msgid "Popular" +msgstr "" + +#: ckanext/harvest/templates_new/source/search.html:50 +msgid "Search harvest sources..." +msgstr "" + +#: ckanext/harvest/templates_new/source/search_2.0.html:7 +msgid "Search..." +msgstr "" + +#: ckanext/harvest/templates_new/source/search_2.0.html:29 +msgid "All harvest sources" +msgstr "" + +#: ckanext/harvest/templates_new/source/search_2.0.html:42 +msgid "Remove" +msgstr "" + +#: ckanext/harvest/templates_new/source/search_2.0.html:49 +msgid "add a new one" +msgstr "" + +#: ckanext/harvest/templates_new/source/search_2.0.html:55 +msgid "" +"

There was an error while searching. Please try " +"again.

" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/list.html:5 +#: ckanext/harvest/templates_new/source/job/list.html:10 +msgid "Harvest Jobs" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/list.html:21 +msgid "Job: " +msgstr "" + +#: ckanext/harvest/templates_new/source/job/list.html:28 +msgid "Started:" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/list.html:28 +#: ckanext/harvest/templates_new/source/job/list.html:30 +msgid "Not yet" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/list.html:30 +msgid "Finished:" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:3 +#: ckanext/harvest/templates_new/source/job/read.html:12 +msgid "Job Report" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:9 +msgid "Back to job list" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:18 +#: ckanext/harvest/templates_new/source/job/read.html:22 +msgid "Error Summary" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:19 +msgid "No errors for this job" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:23 +msgid "Only the 20 most frequent errors are shown" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:26 +#: ckanext/harvest/templates_new/source/job/read.html:40 +msgid "Job Errors" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:30 +#: ckanext/harvest/templates_new/source/job/read.html:57 +msgid "Document Errors" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:37 +msgid "Error Report" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:58 +msgid "documents with errors" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:69 +msgid "Remote content" +msgstr "" + +#: ckanext/harvest/templates_new/source/job/read.html:73 +msgid "Local content" +msgstr "" + diff --git a/setup.cfg b/setup.cfg index 0ec3560..92120a8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,24 @@ [nosetests] with-pylons = test.ini + +[extract_messages] +keywords = translate isPlural +add_comments = TRANSLATORS: +output_file = i18n/ckanext-harvest.pot +width = 80 + +[init_catalog] +domain = ckanext-harvest +input_file = i18n/ckanext-harvest.pot +output_dir = i18n + +[update_catalog] +domain = ckanext-harvest +input_file = i18n/ckanext-harvest.pot +output_dir = i18n +previous = true + +[compile_catalog] +domain = ckanext-harvest +directory = i18n +statistics = true diff --git a/setup.py b/setup.py index 01df224..5275010 100644 --- a/setup.py +++ b/setup.py @@ -39,5 +39,14 @@ setup( test_action_harvester=ckanext.harvest.tests.test_action:MockHarvesterForActionTests [paste.paster_command] harvester = ckanext.harvest.commands.harvester:Harvester + [babel.extractors] + ckan = ckan.lib.extract:extract_ckan """, + message_extractors={ + 'ckanext': [ + ('**.py', 'python', None), + ('**.js', 'javascript', None), + ('**/templates_new/**.html', 'ckan', None), + ], + } ) From 5fbfa2a4c1bca9b1c8129343cd2894295697a756 Mon Sep 17 00:00:00 2001 From: joetsoi Date: Wed, 10 Jun 2015 10:07:07 +0100 Subject: [PATCH 04/17] i18n: add transifex setup --- .tx/config | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .tx/config diff --git a/.tx/config b/.tx/config new file mode 100644 index 0000000..d83ba80 --- /dev/null +++ b/.tx/config @@ -0,0 +1,9 @@ +[main] +host = https://www.transifex.com + +[ckanext-harvest.ckanext-harvestpot] +file_filter = i18n//LC_MESSAGES/ckanext-harvest.po +source_file = i18n/ckanext-harvest.pot +source_lang = en +type = PO + From 61bc150ae6f313bd34583b4711319566c86c470b Mon Sep 17 00:00:00 2001 From: Stefan Oderbolz Date: Wed, 10 Jun 2015 11:19:10 +0200 Subject: [PATCH 05/17] Expose clear harvester source as a paster command --- ckanext/harvest/commands/harvester.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ckanext/harvest/commands/harvester.py b/ckanext/harvest/commands/harvester.py index fadd669..75fa163 100644 --- a/ckanext/harvest/commands/harvester.py +++ b/ckanext/harvest/commands/harvester.py @@ -112,6 +112,8 @@ class Harvester(CkanCommand): self.create_harvest_source() elif cmd == "rmsource": self.remove_harvest_source() + elif cmd == 'clearsource': + self.clear_harvest_source() elif cmd == 'sources': self.list_harvest_sources() elif cmd == 'job': @@ -248,6 +250,16 @@ class Harvester(CkanCommand): get_action('harvest_source_delete')(context,{'id':source_id}) print 'Removed harvest source: %s' % source_id + def clear_harvest_source(self): + if len(self.args) >= 2: + source_id = unicode(self.args[1]) + else: + print 'Please provide a source id' + sys.exit(1) + context = {'model': model, 'user': self.admin_user['name'], 'session':model.Session} + get_action('harvest_source_clear')(context,{'id':source_id}) + print 'Cleared harvest source: %s' % source_id + def list_harvest_sources(self): if len(self.args) >= 2 and self.args[1] == 'all': data_dict = {} From 8ebb8430527a445765404847174deaa3ec501453 Mon Sep 17 00:00:00 2001 From: Stefan Oderbolz Date: Wed, 10 Jun 2015 11:26:22 +0200 Subject: [PATCH 06/17] Add documentation for clearsource command --- README.rst | 3 +++ ckanext/harvest/commands/harvester.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/README.rst b/README.rst index 2456375..2f7a00d 100644 --- a/README.rst +++ b/README.rst @@ -115,6 +115,9 @@ The following operations can be run from the command line using the harvester rmsource {id} - remove (inactivate) a harvester source + harvester clearsource {id} + - clear a harvester source (delete all associtated datasets) + harvester sources [all] - lists harvest sources If 'all' is defined, it also shows the Inactive sources diff --git a/ckanext/harvest/commands/harvester.py b/ckanext/harvest/commands/harvester.py index 75fa163..6499eda 100644 --- a/ckanext/harvest/commands/harvester.py +++ b/ckanext/harvest/commands/harvester.py @@ -20,6 +20,9 @@ class Harvester(CkanCommand): harvester rmsource {id} - remove (inactivate) a harvester source + harvester clearsource {id} + - clear a harvester source (delete all associtated datasets) + harvester sources [all] - lists harvest sources If 'all' is defined, it also shows the Inactive sources From 92b93c53fc8679d4c741868e81fca01fe3948374 Mon Sep 17 00:00:00 2001 From: joetsoi Date: Wed, 10 Jun 2015 12:14:20 +0100 Subject: [PATCH 07/17] add some translation strings --- ckanext/harvest/templates_new/index.html | 28 ++++++++------- .../snippets/package_list_empty.html | 2 +- .../harvest/templates_new/source/admin.html | 2 +- .../source/old_new_source_form.html | 2 +- .../harvest/templates_new/source/read.html | 2 +- .../templates_new/source/search_2.0.html | 4 +-- i18n/ckanext-harvest.pot | 23 +++++++++--- i18n/sv/LC_MESSAGES/ckanext-harvest.po | 35 ++++++++++++++----- 8 files changed, 66 insertions(+), 32 deletions(-) diff --git a/ckanext/harvest/templates_new/index.html b/ckanext/harvest/templates_new/index.html index a5498bc..5eea4d7 100644 --- a/ckanext/harvest/templates_new/index.html +++ b/ckanext/harvest/templates_new/index.html @@ -18,15 +18,15 @@ {% block primary %}
-

Harvesting Sources

+

{% trans %}Harvesting Sources{% endtrans %}

{% if c.status %}
-

Status:

+

{{ _('Status') }}:

{{ h.literal(c.status) }}
{% endif %} - + {% if c.sources %}
@@ -36,15 +36,19 @@ - - - + + + - - - - - + {# TRANSLATORS: Appears in harvest source table for the type of harvester #} + + {# TRANSLATORS: Appears in harvest source table 'is Active' #} + + + {# TRANSLATORS: Appears in harvest source table 'date of next harvest #} + + {# TRANSLATORS: Appears in harvest source table date created #} + {% set old_publisher = None %} {% for source in c.sources %} @@ -78,7 +82,7 @@ {% endfor %}
ViewEditRefresh{{ _('View') }}{{ _('Edit') }}{{ _('Refresh'}} URLTypeActiveStatisticsNext HarvestCreated{{ _('Type')}}{{ _('Active')}}{{ _('Statistics') }}{{ _('Next Harvest') }}{{ _('Created') }}
{% else %} -
No harvest sources defined yet.
+
{% trans %}No harvest sources defined yet.{% endtrans %}
{% endif %}
diff --git a/ckanext/harvest/templates_new/snippets/package_list_empty.html b/ckanext/harvest/templates_new/snippets/package_list_empty.html index 3279e47..a6d297a 100644 --- a/ckanext/harvest/templates_new/snippets/package_list_empty.html +++ b/ckanext/harvest/templates_new/snippets/package_list_empty.html @@ -1 +1 @@ -

There are no datasets associated to this harvest source.

+

{% trans %}There are no datasets associated to this harvest source.{% endtrans %}

diff --git a/ckanext/harvest/templates_new/source/admin.html b/ckanext/harvest/templates_new/source/admin.html index a2ee908..4fd7cb4 100644 --- a/ckanext/harvest/templates_new/source/admin.html +++ b/ckanext/harvest/templates_new/source/admin.html @@ -2,7 +2,7 @@ {% block primary_content_inner %}
-

Last Harvest Job

+

{{ _('Last Harvest Job') }}

{% if source.status and source.status.last_job %} {% snippet "snippets/job_details.html", job=source.status.last_job %}
diff --git a/ckanext/harvest/templates_new/source/old_new_source_form.html b/ckanext/harvest/templates_new/source/old_new_source_form.html index ac7a879..fd1d88d 100644 --- a/ckanext/harvest/templates_new/source/old_new_source_form.html +++ b/ckanext/harvest/templates_new/source/old_new_source_form.html @@ -2,5 +2,5 @@
{{ autoform.generate(form_items, data, errors, error_summary) }} - or Return to the harvest sources list + or {% trans %}Return to the harvest sources list{% endtrans %}
diff --git a/ckanext/harvest/templates_new/source/read.html b/ckanext/harvest/templates_new/source/read.html index 1f748d0..8ba1f21 100644 --- a/ckanext/harvest/templates_new/source/read.html +++ b/ckanext/harvest/templates_new/source/read.html @@ -2,7 +2,7 @@ {% block primary_content_inner %}
-

Datasets

+

{{ _('Datasets') }}

{{ h.package_list_for_source(source.id) }}
{% endblock %} diff --git a/ckanext/harvest/templates_new/source/search_2.0.html b/ckanext/harvest/templates_new/source/search_2.0.html index 88f1c94..b48836b 100644 --- a/ckanext/harvest/templates_new/source/search_2.0.html +++ b/ckanext/harvest/templates_new/source/search_2.0.html @@ -45,8 +45,8 @@ {% endfor %}
{% if request.params and c.page.item_count == 0 %} -

Try another search term, - browse the sources below or {{ _('add a new one') }}. +

{% trans %}Try another search term, + browse the sources below or {% endtrans %}{{ _('add a new one') }}.

{% endif %} diff --git a/i18n/ckanext-harvest.pot b/i18n/ckanext-harvest.pot index bfdef1c..2fdd283 100644 --- a/i18n/ckanext-harvest.pot +++ b/i18n/ckanext-harvest.pot @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: ckanext-harvest 0.2\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-06-10 09:47+0100\n" +"POT-Creation-Date: 2015-06-10 12:12+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -152,10 +152,6 @@ msgstr "" msgid "Only sysadmins can reindex all harvest sources" msgstr "" -#: ckanext/harvest/templates_new/index.html:3 -msgid "Harvesting Sources" -msgstr "" - #: ckanext/harvest/templates_new/snippets/add_source_button.html:6 #: ckanext/harvest/templates_new/source/org_source_list.html:11 msgid "Add Harvest Source" @@ -198,6 +194,10 @@ msgstr "" msgid "Message" msgstr "" +#: ckanext/harvest/templates_new/snippets/package_list_empty.html:1 +msgid "There are no datasets associated to this harvest source." +msgstr "" + #: ckanext/harvest/templates_new/snippets/search_result_text.html:4 msgid "{number} harvest source found for \"{query}\"" msgid_plural "{number} harvest sources found for \"{query}\"" @@ -237,6 +237,7 @@ msgid "There is no description for this harvest source" msgstr "" #: ckanext/harvest/templates_new/snippets/source_item.html:42 +#: ckanext/harvest/templates_new/source/read.html:5 #: ckanext/harvest/templates_new/source/read_base.html:30 #: ckanext/harvest/templates_new/source/read_base.html:53 msgid "Datasets" @@ -247,6 +248,10 @@ msgstr "" msgid "Organization" msgstr "" +#: ckanext/harvest/templates_new/source/admin.html:5 +msgid "Last Harvest Job" +msgstr "" + #: ckanext/harvest/templates_new/source/admin.html:11 msgid "View full job report" msgstr "" @@ -414,6 +419,10 @@ msgstr "" msgid "Delete and clear source" msgstr "" +#: ckanext/harvest/templates_new/source/old_new_source_form.html:5 +msgid "Return to the harvest sources list" +msgstr "" + #: ckanext/harvest/templates_new/source/org_source_list.html:15 #: ckanext/harvest/templates_new/source/search_2.0.html:25 msgid " found for \"{query}\"" @@ -472,6 +481,10 @@ msgstr "" msgid "Remove" msgstr "" +#: ckanext/harvest/templates_new/source/search_2.0.html:48 +msgid "Try another search term, browse the sources below or " +msgstr "" + #: ckanext/harvest/templates_new/source/search_2.0.html:49 msgid "add a new one" msgstr "" diff --git a/i18n/sv/LC_MESSAGES/ckanext-harvest.po b/i18n/sv/LC_MESSAGES/ckanext-harvest.po index 7317ca2..91f233c 100644 --- a/i18n/sv/LC_MESSAGES/ckanext-harvest.po +++ b/i18n/sv/LC_MESSAGES/ckanext-harvest.po @@ -2,16 +2,17 @@ # Copyright (C) 2015 ORGANIZATION # This file is distributed under the same license as the ckanext-harvest # project. -# FIRST AUTHOR , 2015. # +# Translators: msgid "" msgstr "" -"Project-Id-Version: ckanext-harvest 0.2\n" +"Project-Id-Version: ckanext-harvest\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-06-10 09:47+0100\n" -"PO-Revision-Date: 2015-06-10 09:47+0100\n" +"POT-Creation-Date: 2015-06-10 12:12+0100\n" +"PO-Revision-Date: 2015-06-10 09:00+0000\n" "Last-Translator: FULL NAME \n" -"Language-Team: sv \n" +"Language-Team: Swedish (http://www.transifex.com/projects/p/ckanext-" +"harvest/language/sv/)\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" @@ -156,10 +157,6 @@ msgstr "" msgid "Only sysadmins can reindex all harvest sources" msgstr "" -#: ckanext/harvest/templates_new/index.html:3 -msgid "Harvesting Sources" -msgstr "" - #: ckanext/harvest/templates_new/snippets/add_source_button.html:6 #: ckanext/harvest/templates_new/source/org_source_list.html:11 msgid "Add Harvest Source" @@ -202,6 +199,10 @@ msgstr "" msgid "Message" msgstr "" +#: ckanext/harvest/templates_new/snippets/package_list_empty.html:1 +msgid "There are no datasets associated to this harvest source." +msgstr "" + #: ckanext/harvest/templates_new/snippets/search_result_text.html:4 msgid "{number} harvest source found for \"{query}\"" msgid_plural "{number} harvest sources found for \"{query}\"" @@ -241,6 +242,7 @@ msgid "There is no description for this harvest source" msgstr "" #: ckanext/harvest/templates_new/snippets/source_item.html:42 +#: ckanext/harvest/templates_new/source/read.html:5 #: ckanext/harvest/templates_new/source/read_base.html:30 #: ckanext/harvest/templates_new/source/read_base.html:53 msgid "Datasets" @@ -251,6 +253,10 @@ msgstr "" msgid "Organization" msgstr "" +#: ckanext/harvest/templates_new/source/admin.html:5 +msgid "Last Harvest Job" +msgstr "" + #: ckanext/harvest/templates_new/source/admin.html:11 msgid "View full job report" msgstr "" @@ -418,6 +424,10 @@ msgstr "" msgid "Delete and clear source" msgstr "" +#: ckanext/harvest/templates_new/source/old_new_source_form.html:5 +msgid "Return to the harvest sources list" +msgstr "" + #: ckanext/harvest/templates_new/source/org_source_list.html:15 #: ckanext/harvest/templates_new/source/search_2.0.html:25 msgid " found for \"{query}\"" @@ -476,6 +486,10 @@ msgstr "" msgid "Remove" msgstr "" +#: ckanext/harvest/templates_new/source/search_2.0.html:48 +msgid "Try another search term, browse the sources below or " +msgstr "" + #: ckanext/harvest/templates_new/source/search_2.0.html:49 msgid "add a new one" msgstr "" @@ -556,3 +570,6 @@ msgstr "" msgid "Local content" msgstr "" +#~ msgid "Harvesting Sources" +#~ msgstr "" + From 2a2d85f60cf1ef7ada15da9cd24e5de541079067 Mon Sep 17 00:00:00 2001 From: Stefan Oderbolz Date: Wed, 10 Jun 2015 16:19:23 +0200 Subject: [PATCH 08/17] Wording changes for clearsource and rmsource --- README.rst | 4 ++-- ckanext/harvest/commands/harvester.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 2f7a00d..a7fb2ef 100644 --- a/README.rst +++ b/README.rst @@ -113,10 +113,10 @@ The following operations can be run from the command line using the - create new harvest source harvester rmsource {id} - - remove (inactivate) a harvester source + - remove (deactivate) a harvester source, whilst leaving any related datasets, jobs and objects harvester clearsource {id} - - clear a harvester source (delete all associtated datasets) + - clears all datasets, jobs and objects related to a harvest source, but keeps the source itself harvester sources [all] - lists harvest sources diff --git a/ckanext/harvest/commands/harvester.py b/ckanext/harvest/commands/harvester.py index 6499eda..06a7cf0 100644 --- a/ckanext/harvest/commands/harvester.py +++ b/ckanext/harvest/commands/harvester.py @@ -18,10 +18,10 @@ class Harvester(CkanCommand): - create new harvest source harvester rmsource {id} - - remove (inactivate) a harvester source + - remove (deactivate) a harvester source, whilst leaving any related datasets, jobs and objects harvester clearsource {id} - - clear a harvester source (delete all associtated datasets) + - clears all datasets, jobs and objects related to a harvest source, but keeps the source itself harvester sources [all] - lists harvest sources From 64ff0f3a3a10897e41c54fb6709a74ef1ea66d5d Mon Sep 17 00:00:00 2001 From: Stefan Oderbolz Date: Wed, 10 Jun 2015 16:22:04 +0200 Subject: [PATCH 09/17] Use single quotes to be consistent --- ckanext/harvest/commands/harvester.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext/harvest/commands/harvester.py b/ckanext/harvest/commands/harvester.py index 06a7cf0..ba546fe 100644 --- a/ckanext/harvest/commands/harvester.py +++ b/ckanext/harvest/commands/harvester.py @@ -113,7 +113,7 @@ class Harvester(CkanCommand): cmd = self.args[0] if cmd == 'source': self.create_harvest_source() - elif cmd == "rmsource": + elif cmd == 'rmsource': self.remove_harvest_source() elif cmd == 'clearsource': self.clear_harvest_source() From 84126bb8210bcfb7bc8cba8b63aad6c763da76e5 Mon Sep 17 00:00:00 2001 From: amercader Date: Wed, 10 Jun 2015 15:57:28 +0100 Subject: [PATCH 10/17] Update README Simplify install instructions (no need to choose a branch on ckanext-harvest, just use master). Updated examples and paths. Added contributing and license info. --- README.rst | 64 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/README.rst b/README.rst index a7fb2ef..f3dadf8 100644 --- a/README.rst +++ b/README.rst @@ -32,25 +32,9 @@ Installation ckan.harvest.mq.type = rabbitmq -2. Install the extension into your python environment. +2. Install the extension into your python environment:: - *Note:* Depending on the CKAN core version you are targeting you will need to - use a different branch from the extension. - - For a production site, use the `stable` branch, unless there is a specific - branch that targets the CKAN core version that you are using. - - To target the latest CKAN core release:: - - (pyenv) $ pip install -e git+https://github.com/okfn/ckanext-harvest.git@stable#egg=ckanext-harvest - - To target an old release (if a release branch exists, otherwise use `stable`):: - - (pyenv) $ pip install -e git+https://github.com/okfn/ckanext-harvest.git@release-v1.8#egg=ckanext-harvest - - To target CKAN `master`, use the extension `master` branch (ie no branch defined):: - - (pyenv) $ pip install -e git+https://github.com/okfn/ckanext-harvest.git#egg=ckanext-harvest + (pyenv) $ pip install -e git+https://github.com/ckan/ckanext-harvest.git#egg=ckanext-harvest 3. Install the rest of python modules required by the extension:: @@ -418,8 +402,8 @@ interface: Here you can also find other examples of custom harvesters: -* https://github.com/okfn/ckanext-pdeu/tree/master/ckanext/pdeu/harvesters -* https://github.com/okfn/ckanext-inspire/ckanext/inspire/harvesters.py +* https://github.com/ckan/ckanext-dcat/tree/master/ckanext/dcat/harvesters +* https://github.com/ckan/ckanext-spatial/tree/master/ckanext/spatial/harvesters Running the harvest jobs @@ -466,7 +450,7 @@ have already installed and configured the harvesting extension (See `Installation` if not). Note: It is recommended to run the harvest process from a non-root user -(generally the one you are running CKAN with). Replace the user `okfn` in the +(generally the one you are running CKAN with). Replace the user `ckan` in the following steps with the one you are using. 1. Install Supervisor:: @@ -494,10 +478,10 @@ following steps with the one you are using. [program:ckan_gather_consumer] - command=/var/lib/ckan/std/pyenv/bin/paster --plugin=ckanext-harvest harvester gather_consumer --config=/etc/ckan/std/std.ini + command=/usr/lib//ckan/default/bin/paster --plugin=ckanext-harvest harvester gather_consumer --config=/etc/ckan/std/std.ini ; user that owns virtual environment. - user=okfn + user=ckan numprocs=1 stdout_logfile=/var/log/ckan/std/gather_consumer.log @@ -508,10 +492,10 @@ following steps with the one you are using. [program:ckan_fetch_consumer] - command=/var/lib/ckan/std/pyenv/bin/paster --plugin=ckanext-harvest harvester fetch_consumer --config=/etc/ckan/std/std.ini + command=/usr/lib//ckan/default/bin/paster --plugin=ckanext-harvest harvester fetch_consumer --config=/etc/ckan/std/std.ini ; user that owns virtual environment. - user=okfn + user=ckan numprocs=1 stdout_logfile=/var/log/ckan/std/fetch_consumer.log @@ -574,20 +558,44 @@ following steps with the one you are using. that will run the `run` harvester command periodically. To do so, edit the cron table with the following command (it may ask you to choose an editor):: - sudo crontab -e -u okfn + sudo crontab -e -u ckan Note that we are running this command as the same user we configured the processes to be run with - (`okfn` in our example). + (`ckan` in our example). Paste this line into your crontab, again replacing the paths to paster and the ini file with yours:: # m h dom mon dow command - */15 * * * * /var/lib/ckan/std/pyenv/bin/paster --plugin=ckanext-harvest harvester run --config=/etc/ckan/std/std.ini + */15 * * * * /usr/lib/ckan/default/bin/paster --plugin=ckanext-harvest harvester run --config=/etc/ckan/std/std.ini This particular example will check for pending jobs every fifteen minutes. You can of course modify this periodicity, this `Wikipedia page `_ has a good overview of the crontab syntax. +Community +========= + +* Developer mailing list: `ckan-dev@lists.okfn.org `_ +* Developer IRC channel: `#ckan on irc.freenode.net `_ +* `Issue tracker `_ + + +Contributing +============ + +For contributing to ckanext-spatial or its documentation, follow the same +guidelines that apply to CKAN core, described in +`CONTRIBUTING `_. + + +License +======= + +This extension is open and licensed under the GNU Affero General Public License (AGPL) v3.0. +Its full text may be found at: + +http://www.fsf.org/licensing/licenses/agpl-3.0.html + .. _Supervisor: http://supervisord.org From d3a3f09ad1d49ce6accda00c805735bdf8b1ffca Mon Sep 17 00:00:00 2001 From: amercader Date: Thu, 11 Jun 2015 10:19:07 +0100 Subject: [PATCH 11/17] [#127] Use site user on the CKAN harvester To avoid having to create a 'harvest' sysadmin explicitly. It will still be used if present, but if not the site user will be used. You can also define to user to use via a config option. --- ckanext/harvest/harvesters/base.py | 48 +++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/ckanext/harvest/harvesters/base.py b/ckanext/harvest/harvesters/base.py index b4db6ce..41a5061 100644 --- a/ckanext/harvest/harvesters/base.py +++ b/ckanext/harvest/harvesters/base.py @@ -4,6 +4,7 @@ import uuid from sqlalchemy.sql import update,and_, bindparam from sqlalchemy.exc import InvalidRequestError +from pylons import config from ckan import plugins as p from ckan import model @@ -38,6 +39,8 @@ class HarvesterBase(SingletonPlugin): config = None + _user_name = None + def _gen_new_name(self, title): ''' Creates a URL friendly name from a title @@ -80,6 +83,46 @@ class HarvesterBase(SingletonPlugin): log_message = '{0}, line {1}'.format(message,line) if line else message log.debug(log_message) + def _get_user_name(self): + ''' + Returns the name of the user that will perform the harvesting actions + (deleting, updating and creating datasets) + + By default this will be the old 'harvest' user to maintain + compatibility. If not present, the internal site admin user will be + used. This is the recommended setting, but if necessary it can be + overridden with the `ckanext.harvest.user_name` config option: + + ckanext.harvest.user_name = harvest + + ''' + if self._user_name: + return self._user_name + + config_user_name = config.get('ckanext.harvest.user_name') + if config_user_name: + self._user_name = config_user_name + return self._user_name + + context = {'model': model, + 'ignore_auth': True, + } + + # Check if 'harvest' user exists and if is a sysadmin + try: + user_harvest = p.toolkit.get_action('user_show')( + context, {'id': 'harvest'}) + if user_harvest['sysadmin']: + self._user_name = 'harvest' + return self._user_name + except p.toolkit.ObjectNotFound: + pass + + context['defer_commit'] = True # See ckan/ckan#1714 + self._site_user = p.toolkit.get_action('get_site_user')(context, {}) + self._user_name = self._site_user['name'] + + return self._user_name def _create_harvest_objects(self, remote_ids, harvest_job): ''' @@ -135,13 +178,10 @@ class HarvesterBase(SingletonPlugin): api_version = int(self.config.get('api_version', 2)) except ValueError: raise ValueError('api_version must be an integer') - - #TODO: use site user when available - user_name = self.config.get('user', u'harvest') else: api_version = 2 - user_name = u'harvest' + user_name = self._get_user_name() context = { 'model': model, 'session': Session, From 673dfc98829e3ab673db818b6ecefad95d738927 Mon Sep 17 00:00:00 2001 From: amercader Date: Thu, 11 Jun 2015 10:38:33 +0100 Subject: [PATCH 12/17] [#127] Use site user on the CKAN harvester Add missing call --- ckanext/harvest/harvesters/ckanharvester.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ckanext/harvest/harvesters/ckanharvester.py b/ckanext/harvest/harvesters/ckanharvester.py index 7575bad..6339969 100644 --- a/ckanext/harvest/harvesters/ckanharvester.py +++ b/ckanext/harvest/harvesters/ckanharvester.py @@ -253,6 +253,8 @@ class CKANHarvester(HarvesterBase): def import_stage(self,harvest_object): log.debug('In CKANHarvester import_stage') + + context = {'model': model, 'session': Session, 'user': self._get_user_name()} if not harvest_object: log.error('No harvest object received') return False @@ -288,7 +290,6 @@ class CKANHarvester(HarvesterBase): # check if remote groups exist locally, otherwise remove validated_groups = [] - context = {'model': model, 'session': Session, 'user': 'harvest'} for group_name in package_dict['groups']: try: @@ -309,6 +310,7 @@ class CKANHarvester(HarvesterBase): for key in ['packages', 'created', 'users', 'groups', 'tags', 'extras', 'display_name']: group.pop(key, None) + get_action('group_create')(context, group) log.info('Group %s has been newly created' % group_name) if self.api_version == 1: @@ -318,7 +320,6 @@ class CKANHarvester(HarvesterBase): package_dict['groups'] = validated_groups - context = {'model': model, 'session': Session, 'user': 'harvest'} # Local harvest source organization source_dataset = get_action('package_show')(context, {'id': harvest_object.source.id}) From 88d9ba03973a79bbe2c124f8c7c6633b1d70dd42 Mon Sep 17 00:00:00 2001 From: amercader Date: Thu, 11 Jun 2015 13:56:22 +0100 Subject: [PATCH 13/17] [#136] Fix broken RabbitMQ queue names The harvester command was still using the old ones. Use specific ones for testing. --- ckanext/harvest/commands/harvester.py | 10 ++++++---- ckanext/harvest/tests/test_queue.py | 8 ++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ckanext/harvest/commands/harvester.py b/ckanext/harvest/commands/harvester.py index ba546fe..975c653 100644 --- a/ckanext/harvest/commands/harvester.py +++ b/ckanext/harvest/commands/harvester.py @@ -127,17 +127,19 @@ class Harvester(CkanCommand): self.run_harvester() elif cmd == 'gather_consumer': import logging - from ckanext.harvest.queue import get_gather_consumer, gather_callback + from ckanext.harvest.queue import (get_gather_consumer, + gather_callback, get_gather_queue_name) logging.getLogger('amqplib').setLevel(logging.INFO) consumer = get_gather_consumer() - for method, header, body in consumer.consume(queue='ckan.harvest.gather'): + for method, header, body in consumer.consume(queue=get_gather_queue_name()): gather_callback(consumer, method, header, body) elif cmd == 'fetch_consumer': import logging logging.getLogger('amqplib').setLevel(logging.INFO) - from ckanext.harvest.queue import get_fetch_consumer, fetch_callback + from ckanext.harvest.queue import (get_fetch_consumer, fetch_callback, + get_fetch_queue_name) consumer = get_fetch_consumer() - for method, header, body in consumer.consume(queue='ckan.harvest.fetch'): + for method, header, body in consumer.consume(queue=get_fetch_queue_name()): fetch_callback(consumer, method, header, body) elif cmd == 'purge_queues': from ckanext.harvest.queue import purge_queues diff --git a/ckanext/harvest/tests/test_queue.py b/ckanext/harvest/tests/test_queue.py index 4e0e602..2b06926 100644 --- a/ckanext/harvest/tests/test_queue.py +++ b/ckanext/harvest/tests/test_queue.py @@ -92,10 +92,10 @@ class TestHarvestQueue(object): def test_01_basic_harvester(self): ### make sure queues/exchanges are created first and are empty - consumer = queue.get_consumer('ckan.harvest.gather','harvest_job_id') - consumer_fetch = queue.get_consumer('ckan.harvest.fetch','harvest_object_id') - consumer.queue_purge(queue='ckan.harvest.gather') - consumer_fetch.queue_purge(queue='ckan.harvest.fetch') + consumer = queue.get_consumer('ckan.harvest.test.gather', 'harvest_job_id') + consumer_fetch = queue.get_consumer('ckan.harvest.test.fetch', 'harvest_object_id') + consumer.queue_purge(queue='ckan.harvest.test.gather') + consumer_fetch.queue_purge(queue='ckan.harvest.test.fetch') user = logic.get_action('get_site_user')( From 7a8fc2c67e8a951dc1e21628f5f743dd1a134f74 Mon Sep 17 00:00:00 2001 From: Tryggvi Bjorgvinsson Date: Mon, 15 Jun 2015 14:28:20 +0000 Subject: [PATCH 14/17] Add Swedish translations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Harvester has been translated into Swedish. This updates the .po file from transifex and a resulting compiled .mo file. Thanks to translator Börje Lewin. --- i18n/sv/LC_MESSAGES/ckanext-harvest.mo | Bin 434 -> 10815 bytes i18n/sv/LC_MESSAGES/ckanext-harvest.po | 304 ++++++++++++------------- 2 files changed, 151 insertions(+), 153 deletions(-) diff --git a/i18n/sv/LC_MESSAGES/ckanext-harvest.mo b/i18n/sv/LC_MESSAGES/ckanext-harvest.mo index f53c285b1fd092eff2981fe9baf374ca748782a5..d044cbb726ba9b12a438ff151d6de8c104f41e66 100644 GIT binary patch literal 10815 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 E0D^ibRR910 diff --git a/i18n/sv/LC_MESSAGES/ckanext-harvest.po b/i18n/sv/LC_MESSAGES/ckanext-harvest.po index 91f233c..e370a26 100644 --- a/i18n/sv/LC_MESSAGES/ckanext-harvest.po +++ b/i18n/sv/LC_MESSAGES/ckanext-harvest.po @@ -1,68 +1,69 @@ -# Swedish translations for ckanext-harvest. +# Translations template for ckanext-harvest. # Copyright (C) 2015 ORGANIZATION # This file is distributed under the same license as the ckanext-harvest # project. -# +# # Translators: +# Börje Lewin , 2015 msgid "" msgstr "" -"Project-Id-Version: ckanext-harvest\n" +"Project-Id-Version: ckanext-harvest\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2015-06-10 12:12+0100\n" -"PO-Revision-Date: 2015-06-10 09:00+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Swedish (http://www.transifex.com/projects/p/ckanext-" -"harvest/language/sv/)\n" -"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"PO-Revision-Date: 2015-06-11 17:28+0000\n" +"Last-Translator: Börje Lewin \n" +"Language-Team: Swedish (http://www.transifex.com/projects/p/ckanext-harvest/language/sv/)\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.6\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ckanext/harvest/helpers.py:70 msgid "title" -msgstr "" +msgstr "rubrik" #: ckanext/harvest/controllers/organization.py:41 msgid "Group not found" -msgstr "" +msgstr "Hittar inte grupp" #: ckanext/harvest/controllers/organization.py:43 #, python-format msgid "Unauthorized to read group %s" -msgstr "" +msgstr "Obehörig att läsa grupp %s" #: ckanext/harvest/controllers/organization.py:69 msgid "Cannot render description" -msgstr "" +msgstr "Kan inte generera beskrivning" #: ckanext/harvest/controllers/organization.py:151 msgid "Groups" -msgstr "" +msgstr "Grupper" #: ckanext/harvest/controllers/organization.py:152 msgid "Tags" -msgstr "" +msgstr "Taggar" #: ckanext/harvest/controllers/organization.py:153 msgid "Formats" -msgstr "" +msgstr "Format" #: ckanext/harvest/controllers/organization.py:154 msgid "Licence" -msgstr "" +msgstr "Licens" #: ckanext/harvest/controllers/view.py:27 msgid "Not authorized to see this page" -msgstr "" +msgstr "Obehörig att se denna sida" #: ckanext/harvest/controllers/view.py:44 msgid "Harvesting source successfully cleared" -msgstr "" +msgstr "Källan för skördning har raderats" #: ckanext/harvest/controllers/view.py:46 msgid "Harvesting source successfully inactivated" -msgstr "" +msgstr "Källan för skördning har avaktiverats" #: ckanext/harvest/controllers/view.py:50 #: ckanext/harvest/controllers/view.py:61 @@ -72,249 +73,250 @@ msgstr "" #: ckanext/harvest/controllers/view.py:192 #: ckanext/harvest/controllers/view.py:218 #: ckanext/harvest/logic/auth/create.py:34 -#: ckanext/harvest/logic/auth/delete.py:18 ckanext/harvest/logic/auth/get.py:33 +#: ckanext/harvest/logic/auth/delete.py:18 +#: ckanext/harvest/logic/auth/get.py:33 #: ckanext/harvest/logic/auth/update.py:19 msgid "Harvest source not found" -msgstr "" +msgstr "Hittar inte källan" #: ckanext/harvest/controllers/view.py:59 msgid "Refresh requested, harvesting will take place within 15 minutes." -msgstr "" +msgstr "Uppdatering har begärts, skördning sker inom 15 minuter." #: ckanext/harvest/controllers/view.py:66 msgid "" -"Cannot create new harvest jobs on inactive sources. First, please change " -"the source status to 'active'." -msgstr "" +"Cannot create new harvest jobs on inactive sources. First, please change the" +" source status to 'active'." +msgstr "Kan inte skapa nya skördningsjobb för inaktiva källor. Ändra först källans status till 'aktiv'." #: ckanext/harvest/controllers/view.py:69 msgid "A harvest job has already been scheduled for this source" -msgstr "" +msgstr "Ett skördningsjobb har redan schemalagts för denna källa" #: ckanext/harvest/controllers/view.py:80 msgid "Harvest source cleared" -msgstr "" +msgstr "Skördningskällan har rensats" #: ckanext/harvest/controllers/view.py:108 msgid "No content found" -msgstr "" +msgstr "Hittar inget innehåll" #: ckanext/harvest/controllers/view.py:168 msgid "Harvest job not found" -msgstr "" +msgstr "Hittar inte skördningsjobbet" #: ckanext/harvest/controllers/view.py:201 #: ckanext/harvest/templates_new/source/admin.html:15 #: ckanext/harvest/templates_new/source/job/list.html:13 msgid "No jobs yet for this source" -msgstr "" +msgstr "Det finns inga jobb för denna källa" #: ckanext/harvest/logic/auth/create.py:19 msgid "User {0} not authorized to create harvest sources" -msgstr "" +msgstr "Användaren {0} är inte behörig att skapa källor för skördning" #: ckanext/harvest/logic/auth/create.py:42 msgid "User not authorized to create a job for source {0}" -msgstr "" +msgstr "Användaren är inte behörig att skapa jobb för källan {0}" #: ckanext/harvest/logic/auth/create.py:52 msgid "Only sysadmins can create harvest jobs for all sources" -msgstr "" +msgstr "Endast systemadministratörer kan skapa skördningsjobb för alla källor" #: ckanext/harvest/logic/auth/create.py:63 msgid "Only the sysadmins can create harvest objects" -msgstr "" +msgstr "Endast systemadministratörer kan skapa skördningsobjekt" #: ckanext/harvest/logic/auth/delete.py:27 msgid "User {0} not authorized to delete harvest source {1}" -msgstr "" +msgstr "Användaren {0} är inte behörig att ta bort skördningskällan {1}" #: ckanext/harvest/logic/auth/get.py:42 msgid "User {0} not authorized to read harvest source {1}" -msgstr "" +msgstr "Användaren {0} är inte behörig att läsa skördningskällan {1}" #: ckanext/harvest/logic/auth/get.py:82 msgid "User {0} not authorized to see jobs from source {1}" -msgstr "" +msgstr "Användaren {0} är inte behörig att se jobb från källan {1}" #: ckanext/harvest/logic/auth/get.py:104 msgid "User {0} not authorized to list jobs for source {1}" -msgstr "" +msgstr "Användaren {0} är inte behörig att lista jobb för källan {1}" #: ckanext/harvest/logic/auth/update.py:28 msgid "User {0} not authorized to update harvest source {1}" -msgstr "" +msgstr "Användaren {0} är inte behörig att uppdater skördingskällan {1}" #: ckanext/harvest/logic/auth/update.py:45 msgid "Only sysadmins can reimport all harvest objects" -msgstr "" +msgstr "Endast systemadministratörer kan importera om skördningsobjekt" #: ckanext/harvest/logic/auth/update.py:57 msgid "Only sysadmins can run the pending harvest jobs" -msgstr "" +msgstr "Endast systemadministratörer kan köra väntande skördningsjobb" #: ckanext/harvest/logic/auth/update.py:68 msgid "Only sysadmins can reindex all harvest sources" -msgstr "" +msgstr "Endast systemadministratörer kan omindexera skördningskällor" #: ckanext/harvest/templates_new/snippets/add_source_button.html:6 #: ckanext/harvest/templates_new/source/org_source_list.html:11 msgid "Add Harvest Source" -msgstr "" +msgstr "Lägg till skördningskälla" #: ckanext/harvest/templates_new/snippets/job_details.html:26 #: ckanext/harvest/templates_new/source/job/list.html:38 msgid "errors" -msgstr "" +msgstr "fel" #: ckanext/harvest/templates_new/snippets/job_details.html:41 msgid "Details" -msgstr "" +msgstr "Detaljer" #: ckanext/harvest/templates_new/snippets/job_details.html:48 msgid "Id" -msgstr "" +msgstr "Id" #: ckanext/harvest/templates_new/snippets/job_details.html:52 msgid "Created" -msgstr "" +msgstr "Skapad" #: ckanext/harvest/templates_new/snippets/job_details.html:56 msgid "Started" -msgstr "" +msgstr "Påbörjad" #: ckanext/harvest/templates_new/snippets/job_details.html:60 msgid "Finished" -msgstr "" +msgstr "Avslutad" #: ckanext/harvest/templates_new/snippets/job_details.html:64 msgid "Status" -msgstr "" +msgstr "Status" #: ckanext/harvest/templates_new/snippets/job_error_summary.html:18 msgid "Count" -msgstr "" +msgstr "Antal" #: ckanext/harvest/templates_new/snippets/job_error_summary.html:19 msgid "Message" -msgstr "" +msgstr "Meddelande" #: ckanext/harvest/templates_new/snippets/package_list_empty.html:1 msgid "There are no datasets associated to this harvest source." -msgstr "" +msgstr "Det finns inga dataset kopplade till denna skördningskälla" #: ckanext/harvest/templates_new/snippets/search_result_text.html:4 msgid "{number} harvest source found for \"{query}\"" msgid_plural "{number} harvest sources found for \"{query}\"" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "{number} skördningskälla hittades för \"{query}\"" +msgstr[1] "{number} skördningskällor hittades för \"{query}\"" #: ckanext/harvest/templates_new/snippets/search_result_text.html:5 #: ckanext/harvest/templates_new/source/org_source_list.html:17 #: ckanext/harvest/templates_new/source/search_2.0.html:27 msgid "Sorry no harvest sources found for \"{query}\"" -msgstr "" +msgstr "Hittar inga skördningskällor för \"{query}\"" #: ckanext/harvest/templates_new/snippets/search_result_text.html:6 msgid "{number} harvest source found" msgid_plural "{number} harvest sources found" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "{number} skördningskälla hittades" +msgstr[1] "{number} skördningskällor hittades" #: ckanext/harvest/templates_new/snippets/search_result_text.html:7 #: ckanext/harvest/templates_new/source/org_source_list.html:25 msgid "Sorry no harvest sources found" -msgstr "" +msgstr "Hittade inga skördningskällor" #: ckanext/harvest/templates_new/snippets/source_item.html:28 msgid "Draft" -msgstr "" +msgstr "Utkast" #: ckanext/harvest/templates_new/snippets/source_item.html:30 #: ckanext/harvest/templates_new/source/new_source_form.html:83 msgid "Deleted" -msgstr "" +msgstr "Borttagen" #: ckanext/harvest/templates_new/snippets/source_item.html:37 #: ckanext/harvest/templates_new/source/about.html:9 #: ckanext/harvest/templates_new/source/read_base.html:25 msgid "There is no description for this harvest source" -msgstr "" +msgstr "Det finns ingen beskrivning för denna skördningskälla" #: ckanext/harvest/templates_new/snippets/source_item.html:42 #: ckanext/harvest/templates_new/source/read.html:5 #: ckanext/harvest/templates_new/source/read_base.html:30 #: ckanext/harvest/templates_new/source/read_base.html:53 msgid "Datasets" -msgstr "" +msgstr "Dataset" #: ckanext/harvest/templates_new/snippets/source_item.html:45 #: ckanext/harvest/templates_new/source/new_source_form.html:63 msgid "Organization" -msgstr "" +msgstr "Organisation" #: ckanext/harvest/templates_new/source/admin.html:5 msgid "Last Harvest Job" -msgstr "" +msgstr "Sista skördningsjobb" #: ckanext/harvest/templates_new/source/admin.html:11 msgid "View full job report" -msgstr "" +msgstr "Visa fullständig jobbrapport" #: ckanext/harvest/templates_new/source/admin_base.html:7 #: ckanext/harvest/templates_new/source/read_base.html:4 msgid "Admin" -msgstr "" +msgstr "Admin" #: ckanext/harvest/templates_new/source/admin_base.html:15 msgid "" -"This will re-run the harvesting for this source. Any updates at the " -"source will overwrite the local datasets. Sources with a large number of " -"datasets may take a significant amount of time to finish harvesting. " -"Please confirm you would like us to start reharvesting." -msgstr "" +"This will re-run the harvesting for this source. Any updates at the source " +"will overwrite the local datasets. Sources with a large number of datasets " +"may take a significant amount of time to finish harvesting. Please confirm " +"you would like us to start reharvesting." +msgstr "Skördningen kommer att köras igen för denna källa. Alla uppdateringar från källan kommer att ersätta lokala dataset. Källor med många dataset kan ta lång tid att skörda. Bekräfta om du vill starta en omskördning." #: ckanext/harvest/templates_new/source/admin_base.html:18 msgid "Start a new harvesting job for this harvest source now" -msgstr "" +msgstr "Starta ett nytt skördningsjobb för denna skördningskälla nu." #: ckanext/harvest/templates_new/source/admin_base.html:20 msgid "Reharvest" -msgstr "" +msgstr "Skörda om" #: ckanext/harvest/templates_new/source/admin_base.html:24 msgid "" "Warning: This will remove all datasets for this source, as well as all " "previous job reports. Are you sure you want to continue?" -msgstr "" +msgstr "Varning: Alla dataset för denna källa tas bort, liksom tidigare jobbrapporter. Vill du fortsätta?" #: ckanext/harvest/templates_new/source/admin_base.html:27 msgid "Delete all harvest jobs and existing datasets from this source" -msgstr "" +msgstr "Ta bort alla skördningsjobb och befintliga dataset från denna källa" #: ckanext/harvest/templates_new/source/admin_base.html:28 msgid "Clear" -msgstr "" +msgstr "Rensa" #: ckanext/harvest/templates_new/source/admin_base.html:32 msgid "View harvest source" -msgstr "" +msgstr "Visa skördningskälla" #: ckanext/harvest/templates_new/source/admin_base.html:48 msgid "Dashboard" -msgstr "" +msgstr "Kontrollpanel" #: ckanext/harvest/templates_new/source/admin_base.html:49 msgid "Jobs" -msgstr "" +msgstr "Jobb" #: ckanext/harvest/templates_new/source/admin_base.html:50 msgid "Edit" -msgstr "" +msgstr "Redigera" #: ckanext/harvest/templates_new/source/base.html:17 msgid "Organizations" -msgstr "" +msgstr "Organisationer" #: ckanext/harvest/templates_new/source/base.html:19 #: ckanext/harvest/templates_new/source/base.html:22 @@ -324,252 +326,248 @@ msgstr "" #: ckanext/harvest/templates_new/source/org_source_list.html:19 #: ckanext/harvest/templates_new/source/search.html:7 msgid "Harvest Sources" -msgstr "" +msgstr "Skördningskällor" #: ckanext/harvest/templates_new/source/edit.html:3 msgid "Edit harvest source" -msgstr "" +msgstr "Redigera skördningskällo" #: ckanext/harvest/templates_new/source/new.html:5 msgid "Create Harvest Source" -msgstr "" +msgstr "Skapa skördningskälla" #: ckanext/harvest/templates_new/source/new.html:11 msgid "Create harvest source" -msgstr "" +msgstr "Skapa skördningskälla" #: ckanext/harvest/templates_new/source/new.html:23 #: ckanext/harvest/templates_new/source/search.html:3 msgid "Harvest sources" -msgstr "" +msgstr "Skördningskällor" #: ckanext/harvest/templates_new/source/new.html:26 msgid "" -" Harvest sources allow importing remote metadata into this catalog. " -"Remote sources can be other catalogs such as other CKAN instances, CSW " -"servers or Web Accessible Folders (WAF) (depending on the actual " -"harvesters enabled for this instance). " -msgstr "" +" Harvest sources allow importing remote metadata into this catalog. Remote " +"sources can be other catalogs such as other CKAN instances, CSW servers or " +"Web Accessible Folders (WAF) (depending on the actual harvesters enabled for" +" this instance). " +msgstr "Skördningskällor kan användas för att importera metadata till katalogen. Källor kan vara kataloger (t ex CKAN-instanser), CSW-servrar eller Web Accessible Folders (WAF), beroende på antalet aktiverade skördningsformat för instansen. " #: ckanext/harvest/templates_new/source/new_source_form.html:8 msgid "URL" -msgstr "" +msgstr "URL" #: ckanext/harvest/templates_new/source/new_source_form.html:10 msgid "This should include the http:// part of the URL" -msgstr "" +msgstr "Denna URL ska börja med http://" #: ckanext/harvest/templates_new/source/new_source_form.html:14 msgid "Title" -msgstr "" +msgstr "Rubrik" #: ckanext/harvest/templates_new/source/new_source_form.html:14 msgid "eg. A descriptive title" -msgstr "" +msgstr "t ex Beskrivande rubrik" #: ckanext/harvest/templates_new/source/new_source_form.html:21 msgid "Name" -msgstr "" +msgstr "Namn" #: ckanext/harvest/templates_new/source/new_source_form.html:21 msgid "eg. my-dataset" -msgstr "" +msgstr "t ex mitt-dataset" #: ckanext/harvest/templates_new/source/new_source_form.html:23 msgid "Description" -msgstr "" +msgstr "Beskrivning" #: ckanext/harvest/templates_new/source/new_source_form.html:43 msgid "Update frequency" -msgstr "" +msgstr "Uppdateringsfrekvens" #: ckanext/harvest/templates_new/source/new_source_form.html:46 msgid "Configuration" -msgstr "" +msgstr "Konfiguration" #: ckanext/harvest/templates_new/source/new_source_form.html:66 msgid "No organization" -msgstr "" +msgstr "Ingen organisation" #: ckanext/harvest/templates_new/source/new_source_form.html:79 msgid "State" -msgstr "" +msgstr "Status" #: ckanext/harvest/templates_new/source/new_source_form.html:82 msgid "Active" -msgstr "" +msgstr "Aktiv" #: ckanext/harvest/templates_new/source/new_source_form.html:92 msgid "" -"This will flag the source as deleted but keep all its datasets and " -"previous jobs. Are you sure you want to delete this harvest source?" -msgstr "" +"This will flag the source as deleted but keep all its datasets and previous " +"jobs. Are you sure you want to delete this harvest source?" +msgstr "Källan markeras som borttagen men alla dataset och tidigare jobb sparas. Vill du markera skördningskällan som borttagen?" #: ckanext/harvest/templates_new/source/new_source_form.html:93 msgid "" -"Warning: Apart from deleting this source, this command will remove all " -"its datasets, as well as all previous job reports. Are you sure you want " -"to continue?" -msgstr "" +"Warning: Apart from deleting this source, this command will remove all its " +"datasets, as well as all previous job reports. Are you sure you want to " +"continue?" +msgstr "Varning. Förutom att källan tas bort, raderas även alla källans dataset och tidigare jobbrapporter. Vill du fortsätta med raderingen?" #: ckanext/harvest/templates_new/source/new_source_form.html:96 msgid "Delete" -msgstr "" +msgstr "Ta bort" #: ckanext/harvest/templates_new/source/new_source_form.html:102 msgid "Delete source" -msgstr "" +msgstr "Ta bort källa" #: ckanext/harvest/templates_new/source/new_source_form.html:107 msgid "Delete and clear source" -msgstr "" +msgstr "Ta bort och rensa källa" #: ckanext/harvest/templates_new/source/old_new_source_form.html:5 msgid "Return to the harvest sources list" -msgstr "" +msgstr "Återgå till listan med skördningskällor" #: ckanext/harvest/templates_new/source/org_source_list.html:15 #: ckanext/harvest/templates_new/source/search_2.0.html:25 msgid " found for \"{query}\"" -msgstr "" +msgstr " hittades för \"{query}\"" #: ckanext/harvest/templates_new/source/org_source_list.html:31 msgid "Search sources..." -msgstr "" +msgstr "Sök källor..." #: ckanext/harvest/templates_new/source/org_source_list.html:32 #: ckanext/harvest/templates_new/source/search_2.0.html:8 msgid "Search" -msgstr "" +msgstr "Sök" #: ckanext/harvest/templates_new/source/read_base.html:22 msgid "read more" -msgstr "" +msgstr "läs mer" #: ckanext/harvest/templates_new/source/read_base.html:54 msgid "About" -msgstr "" +msgstr "Om" #: ckanext/harvest/templates_new/source/search.html:44 msgid "Relevance" -msgstr "" +msgstr "Relevans" #: ckanext/harvest/templates_new/source/search.html:45 msgid "Name Ascending" -msgstr "" +msgstr "Namn (stigande)" #: ckanext/harvest/templates_new/source/search.html:46 msgid "Name Descending" -msgstr "" +msgstr "Namn (fallande)" #: ckanext/harvest/templates_new/source/search.html:47 msgid "Last Modified" -msgstr "" +msgstr "Senast ändrad" #: ckanext/harvest/templates_new/source/search.html:48 msgid "Popular" -msgstr "" +msgstr "Populär" #: ckanext/harvest/templates_new/source/search.html:50 msgid "Search harvest sources..." -msgstr "" +msgstr "Sök skördningskällor..." #: ckanext/harvest/templates_new/source/search_2.0.html:7 msgid "Search..." -msgstr "" +msgstr "Sök..." #: ckanext/harvest/templates_new/source/search_2.0.html:29 msgid "All harvest sources" -msgstr "" +msgstr "Alla skördningskällor" #: ckanext/harvest/templates_new/source/search_2.0.html:42 msgid "Remove" -msgstr "" +msgstr "Radera" #: ckanext/harvest/templates_new/source/search_2.0.html:48 msgid "Try another search term, browse the sources below or " -msgstr "" +msgstr "Försök med en annan sökning, välj bland källorna nedan eller " #: ckanext/harvest/templates_new/source/search_2.0.html:49 msgid "add a new one" -msgstr "" +msgstr "lägg till en ny" #: ckanext/harvest/templates_new/source/search_2.0.html:55 msgid "" "

There was an error while searching. Please try " "again.

" -msgstr "" +msgstr "

Fel vid sökning. Försök igen.

" #: ckanext/harvest/templates_new/source/job/list.html:5 #: ckanext/harvest/templates_new/source/job/list.html:10 msgid "Harvest Jobs" -msgstr "" +msgstr "Skördningsjobb" #: ckanext/harvest/templates_new/source/job/list.html:21 msgid "Job: " -msgstr "" +msgstr "Jobb:" #: ckanext/harvest/templates_new/source/job/list.html:28 msgid "Started:" -msgstr "" +msgstr "Påbörjade:" #: ckanext/harvest/templates_new/source/job/list.html:28 #: ckanext/harvest/templates_new/source/job/list.html:30 msgid "Not yet" -msgstr "" +msgstr "Inte ännu" #: ckanext/harvest/templates_new/source/job/list.html:30 msgid "Finished:" -msgstr "" +msgstr "Avslutade:" #: ckanext/harvest/templates_new/source/job/read.html:3 #: ckanext/harvest/templates_new/source/job/read.html:12 msgid "Job Report" -msgstr "" +msgstr "Jobbrapport" #: ckanext/harvest/templates_new/source/job/read.html:9 msgid "Back to job list" -msgstr "" +msgstr "Tillbaka till jobblistan" #: ckanext/harvest/templates_new/source/job/read.html:18 #: ckanext/harvest/templates_new/source/job/read.html:22 msgid "Error Summary" -msgstr "" +msgstr "Översikt för felaktigheter" #: ckanext/harvest/templates_new/source/job/read.html:19 msgid "No errors for this job" -msgstr "" +msgstr "Inga felaktigheter för detta jobb" #: ckanext/harvest/templates_new/source/job/read.html:23 msgid "Only the 20 most frequent errors are shown" -msgstr "" +msgstr "Endast de 20 vanligaste felen visas" #: ckanext/harvest/templates_new/source/job/read.html:26 #: ckanext/harvest/templates_new/source/job/read.html:40 msgid "Job Errors" -msgstr "" +msgstr "Jobbfel" #: ckanext/harvest/templates_new/source/job/read.html:30 #: ckanext/harvest/templates_new/source/job/read.html:57 msgid "Document Errors" -msgstr "" +msgstr "Dokumentfel" #: ckanext/harvest/templates_new/source/job/read.html:37 msgid "Error Report" -msgstr "" +msgstr "Felrapport" #: ckanext/harvest/templates_new/source/job/read.html:58 msgid "documents with errors" -msgstr "" +msgstr "dokument med fel" #: ckanext/harvest/templates_new/source/job/read.html:69 msgid "Remote content" -msgstr "" +msgstr "Fjärrinnehåll" #: ckanext/harvest/templates_new/source/job/read.html:73 msgid "Local content" -msgstr "" - -#~ msgid "Harvesting Sources" -#~ msgstr "" - +msgstr "Lokalt innehåll" From 4dc2f7367d67a4f8d976864099db3bc6c9ac76a9 Mon Sep 17 00:00:00 2001 From: Stefan Oderbolz Date: Fri, 26 Jun 2015 17:07:16 +0200 Subject: [PATCH 15/17] [#139] Delete package relationships when clearing a harvest source --- ckanext/harvest/logic/action/update.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ckanext/harvest/logic/action/update.py b/ckanext/harvest/logic/action/update.py index 02eae72..36395fb 100644 --- a/ckanext/harvest/logic/action/update.py +++ b/ckanext/harvest/logic/action/update.py @@ -154,6 +154,10 @@ def harvest_source_clear(context,data_dict): delete from package_revision where id in (select id from package where state = 'to_delete'); delete from package_tag where package_id in (select id from package where state = 'to_delete'); delete from package_extra where package_id in (select id from package where state = 'to_delete'); + delete from package_relationship_revision where subject_package_id in (select id from package where state = 'to_delete'); + delete from package_relationship_revision where object_package_id in (select id from package where state = 'to_delete'); + delete from package_relationship where subject_package_id in (select id from package where state = 'to_delete'); + delete from package_relationship where object_package_id in (select id from package where state = 'to_delete'); delete from member where table_id in (select id from package where state = 'to_delete'); delete from related_dataset where dataset_id in (select id from package where state = 'to_delete'); delete from related where id in {related_ids}; From 83dd0b4b688e7ef27a2def294933be134c2c297b Mon Sep 17 00:00:00 2001 From: Stefan Oderbolz Date: Thu, 9 Jul 2015 22:35:54 +0200 Subject: [PATCH 16/17] [#138] Add data attributes to support timezone conversion --- .../templates_new/snippets/job_details.html | 18 +++++++++++++++--- .../harvest/templates_new/source/job/list.html | 10 ++++++++-- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/ckanext/harvest/templates_new/snippets/job_details.html b/ckanext/harvest/templates_new/snippets/job_details.html index f0827ef..27daeff 100644 --- a/ckanext/harvest/templates_new/snippets/job_details.html +++ b/ckanext/harvest/templates_new/snippets/job_details.html @@ -50,15 +50,27 @@ Example: {{ _('Created') }} - {{ h.render_datetime(job.created, with_hours=True) }} + + + {{ h.render_datetime(job.created, with_hours=True) }} + + {{ _('Started') }} - {{ h.render_datetime(job.gather_started, with_hours=True) }} + + + {{ h.render_datetime(job.gather_started, with_hours=True) }} + + {{ _('Finished') }} - {{ h.render_datetime(job.finished, with_hours=True) }} + + + {{ h.render_datetime(job.finished, with_hours=True) }} + + {{ _('Status') }} diff --git a/ckanext/harvest/templates_new/source/job/list.html b/ckanext/harvest/templates_new/source/job/list.html index fe5d874..c147167 100644 --- a/ckanext/harvest/templates_new/source/job/list.html +++ b/ckanext/harvest/templates_new/source/job/list.html @@ -25,9 +25,15 @@ {% endif %}

- {{ _('Started:') }} {{ h.render_datetime(job.gather_started, with_hours=True) or _('Not yet') }} + {{ _('Started:') }} + + {{ h.render_datetime(job.gather_started, with_hours=True) or _('Not yet') }} + — - {{ _('Finished:') }} {{ h.render_datetime(job.finished, with_hours=True) or _('Not yet') }} + {{ _('Finished:') }} + + {{ h.render_datetime(job.finished, with_hours=True) or _('Not yet') }} +

{% if job.status == 'Finished' %} From ab76830e855974c8ce6c6e72a4969af2652ffd0a Mon Sep 17 00:00:00 2001 From: Stefan Oderbolz Date: Mon, 20 Jul 2015 18:41:50 +0200 Subject: [PATCH 17/17] [#145] Throw + catch a custom exception if there are no jobs to run If there are no harvesting jobs to run, there was always an ugly exception message when using the paster command. This replaces the ugly output with a proper message and uses a custom exception to allow others to deal with this error differently. --- ckanext/harvest/commands/harvester.py | 8 +++++--- ckanext/harvest/logic/__init__.py | 4 ++++ ckanext/harvest/logic/action/update.py | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ckanext/harvest/commands/harvester.py b/ckanext/harvest/commands/harvester.py index 975c653..7158c8c 100644 --- a/ckanext/harvest/commands/harvester.py +++ b/ckanext/harvest/commands/harvester.py @@ -3,6 +3,7 @@ from pprint import pprint from ckan import model from ckan.logic import get_action, ValidationError +from ckanext.harvest.logic import NoNewHarvestJobError from ckan.lib.cli import CkanCommand @@ -301,9 +302,10 @@ class Harvester(CkanCommand): def run_harvester(self): context = {'model': model, 'user': self.admin_user['name'], 'session':model.Session} - jobs = get_action('harvest_jobs_run')(context,{}) - - #print 'Sent %s jobs to the gather queue' % len(jobs) + try: + jobs = get_action('harvest_jobs_run')(context,{}) + except NoNewHarvestJobError: + print 'There are no new harvest jobs to run.' def import_stage(self): diff --git a/ckanext/harvest/logic/__init__.py b/ckanext/harvest/logic/__init__.py index 580a57b..ff87d8f 100644 --- a/ckanext/harvest/logic/__init__.py +++ b/ckanext/harvest/logic/__init__.py @@ -7,3 +7,7 @@ except ImportError: class HarvestJobExists(Exception): pass + + +class NoNewHarvestJobError(Exception): + pass diff --git a/ckanext/harvest/logic/action/update.py b/ckanext/harvest/logic/action/update.py index 36395fb..62e4c08 100644 --- a/ckanext/harvest/logic/action/update.py +++ b/ckanext/harvest/logic/action/update.py @@ -26,7 +26,7 @@ from ckanext.harvest.plugin import DATASET_TYPE_NAME from ckanext.harvest.queue import get_gather_publisher, resubmit_jobs from ckanext.harvest.model import HarvestSource, HarvestJob, HarvestObject -from ckanext.harvest.logic import HarvestJobExists +from ckanext.harvest.logic import HarvestJobExists, NoNewHarvestJobError from ckanext.harvest.logic.schema import harvest_source_show_package_schema from ckanext.harvest.logic.action.get import harvest_source_show, harvest_job_list, _get_sources_for_user @@ -365,7 +365,7 @@ def harvest_jobs_run(context,data_dict): jobs = harvest_job_list(context,{'source_id':source_id,'status':u'New'}) if len(jobs) == 0: log.info('No new harvest jobs.') - raise Exception('There are no new harvesting jobs') + raise NoNewHarvestJobError('There are no new harvesting jobs') # Send each job to the gather queue publisher = get_gather_publisher()