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.post1.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file ckanext_duo-0.1.2.post1.tar.gz.

File metadata

  • Download URL: ckanext_duo-0.1.2.post1.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for ckanext_duo-0.1.2.post1.tar.gz
Algorithm Hash digest
SHA256 e03c91b3cd1b46dfbe9dd834899269b47d3d8eef26a5d1ae560a2c4b23e8df61
MD5 6a87ba63a327d1e20b31dcd118b279eb
BLAKE2b-256 c2a6df79c50c6138d22e403ee72dbf3540c465214a18395af3e02199c39587f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ckanext_duo-0.1.2.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ddcc34e6cda4a4b292ca8c7f3cc4e864cd132b079d29f96b46646f91860a7c3
MD5 d7f3e694620f1e3ac120bf592257904e
BLAKE2b-256 fa69279d2701154a41287a92bf7d05125e94a73371bfa72850a76a65b7eb8d6d

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