Skip to main content

No project description provided

Project description

Tests

ckanext-duo

Translate dataset/organization/group titles and descriptions using custom <field>_<locale> fields.

Requirements

Compatibility with core CKAN versions:

CKAN version Compatible?
2.9 yes

Installation

To install ckanext-duo:

  1. Activate your CKAN virtual environment, for example:

    . /usr/lib/ckan/default/bin/activate

  2. Clone the source and install it on the virtualenv

    pip install ckanext-duo

  3. Add duo duo_dataset duo_organization duo_group to the ckan.plugins setting in your CKAN config file.

  4. Make sure you have non-empty ckan.locale_default and ckan.locales_offered options inside CKAN config file.

  5. Restart CKAN.

How to use

Depending on entity that must be translated(group, dataset, organization), one must update corresponding metadata schema. Following fields must be added:

  • organization/group
    • title_<locale> (ex., title_ar)
    • description_<locale> (ex., description_ar)
  • dataset
    • title_<locale> (ex., title_ar)
    • notes_<locale> (ex., notes_ar)

If you are using ckanext-scheming, define field like this::

...
{
    "field_name": "title_ar",
    "label": "Arabic Name",
    "validators": "if_empty_same_as(title)"
},
...

Or you can define custom fields using low-level IDatasetForm/IGroupForm/IOrganizationForm.

If none of above is possible, provide an extra field via CKAN extras(key/value pairs of fields in the very bottom of dataset/group/organization form).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ckanext-duo-0.1.2.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

ckanext_duo-0.1.2-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file ckanext-duo-0.1.2.tar.gz.

File metadata

  • Download URL: ckanext-duo-0.1.2.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9

File hashes

Hashes for ckanext-duo-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5243d75661d2854ce86a49daa508eb079457c5ee315c0338c7bb43f046944386
MD5 c4132eedc9a47ed5de7a304350073c5f
BLAKE2b-256 f27cc0ea1b498cd24a69ea7f59ee06182e63e95eb28b2ec5f475af17138e6a69

See more details on using hashes here.

File details

Details for the file ckanext_duo-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: ckanext_duo-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 22.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9

File hashes

Hashes for ckanext_duo-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4d7c6394d84677ddb919685f0725ac8e2e0e5c78de4b84620460900a1702e85c
MD5 fbf6b892aae6bf28536eca4543b5bbd3
BLAKE2b-256 8fe83413ac08a0224eef39272d9dac7aaad953f13c1ac03a0a19a8c2694386f3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page