A custom theme for for OpenData.HRO, the open data portal of the Hanseatic and University City of Rostock (https://www.opendata-hro.de/).
-
Activate your CKAN virtual Python environment, for example:
. /usr/lib/ckan/default/bin/activate -
Install HRO-theme into your virtual Python environment, for example:
cd /usr/lib/ckan/default/src git clone https://github.com/rostock/ckanext-hro_theme.git cd ckanext-hro_theme pip install -e . -
Enable HRO-theme in your CKAN config file (by default the config file is located at
/etc/ckan/default/ckan.ini):ckan.plugins = hro_theme -
Restart CKAN. For example, if you have deployed CKAN with Apache HTTP Server on Ubuntu, run:
sudo service apache2 reload
-
Activate your CKAN virtual Python environment, for example:
. /usr/lib/ckan/default/bin/activate -
Upgrade HRO-theme within your virtual Python environment:
cd /usr/lib/ckan/default/src/ckanext-hro_theme git pull pip install -e . -
Restart CKAN. For example, if you have deployed CKAN with Apache HTTP Server on Ubuntu:
sudo service apache2 reload
-
Create or update the file
ckanext/hro_theme/i18n/ckanext-hro_theme.potby extracting all translatable strings into it:cd /usr/lib/ckan/default/src/ckanext-hro_theme python setup.py extract_messages -
If necessary, create a new translation for your language – this will generate a new directory
ckanext/hro_theme/i18n/YOUR_LANGUAGEwith aLC_MESSAGES/ckanext-hro_theme.pofile containing all the untranslated strings:python setup.py init_catalog --locale <YOUR_LANGUAGE> -
Start editing either the new
pofile you created before or one of the existingpofiles:msgid "This is an untranslated string!" msgstr "This is a translated string!" -
Compile the updated
pofile(s) – this will generate the requiredmofile(s):python setup.py compile_catalog