ckanext-switzerland
CKAN extension for DCAT-AP Switzerland, templates and different plugins for opendata.swiss.
Requirements
- CKAN 2.6+
- ckanext-scheming
- ckanext-fluent
Update translations
To generate an updated ckanext-switzerland.pot file inside the Docker
container, use the following commands:
docker-compose exec ckan bash
source /usr/lib/ckan/venv/bin/activate
cd /usr/lib/ckanext/ckanext-switzerland-ng/
python setup.py extract_messages
Copy any new strings that you want to translate from the new
ckanext-switzerland.pot into the ckanext-switzerland.po file for each
language, and add the translations.
After that compile the po files into mo files:
python setup.py compile_catalog
Log out of the ckan container (ctrl+D) and restart it for the new translations
to be used:
docker-compose restart ckan
Installation
To install ckanext-switzerland:
Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
Install the ckanext-switzerland Python package into your virtual environment:
pip install ckanext-switzerland
Add switzerland to the ckan.plugins setting in your CKAN
config file (by default the config file is located at
/etc/ckan/default/production.ini).
Restart CKAN. For example if you’ve deployed CKAN with Apache on Ubuntu:
sudo service apache2 reload
Config Settings
This extension uses the following config options (.ini file)
# the URL of the WordPress AJAX interface
ckanext.switzerland.wp_ajax_url = https://opendata.swiss/cms/wp-admin/admin-ajax.php
# number of harvest jobs to keep per harvest source when cleaning up harvest objects
ckanext.switzerland.number_harvest_jobs_per_source = 2
# piwik config
piwik.site_id = 1
piwik.url = piwik.opendata.swiss
# Name and Email Address for notifications about new showcases
ckanext.switzerland.showc