ckanext-duo


Nameckanext-duo JSON
Version 0.1.2.post1 PyPI version JSON
download
home_pageNone
SummaryNone
upload_time2024-10-17 14:53:04
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseAGPL
keywords ckan
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            [![Tests](https://github.com//ckanext-duo/workflows/Tests/badge.svg?branch=main)](https://github.com//ckanext-duo/actions)

# 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

1. Clone the source and install it on the virtualenv

    pip install ckanext-duo


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

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

1. 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).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ckanext-duo",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": "DataShades <datashades@linkdigital.com.au>",
    "keywords": "CKAN",
    "author": null,
    "author_email": "DataShades <datashades@linkdigital.com.au>, Sergey Motornyuk <sergey.motornyuk@linkdigital.com.au>",
    "download_url": "https://files.pythonhosted.org/packages/c2/a6/df79c50c6138d22e403ee72dbf3540c465214a18395af3e02199c39587f8/ckanext_duo-0.1.2.post1.tar.gz",
    "platform": null,
    "description": "[![Tests](https://github.com//ckanext-duo/workflows/Tests/badge.svg?branch=main)](https://github.com//ckanext-duo/actions)\n\n# ckanext-duo\n\nTranslate dataset/organization/group titles and descriptions using custom `<field>_<locale>` fields.\n\n\n## Requirements\n\nCompatibility with core CKAN versions:\n\n| CKAN version | Compatible? |\n|--------------|-------------|\n| 2.9          | yes         |\n\n## Installation\n\nTo install ckanext-duo:\n\n1. Activate your CKAN virtual environment, for example:\n\n     . /usr/lib/ckan/default/bin/activate\n\n1. Clone the source and install it on the virtualenv\n\n    pip install ckanext-duo\n\n\n1. Add `duo duo_dataset duo_organization duo_group` to the `ckan.plugins`\n   setting in your CKAN config file.\n\n1. Make sure you have non-empty `ckan.locale_default` and\n   `ckan.locales_offered` options inside CKAN config file.\n\n1. Restart CKAN.\n\n\n## How to use\n\nDepending on entity that must be translated(group, dataset, organization), one\nmust update corresponding metadata schema. Following fields must be added:\n\n- organization/group\n  - `title_<locale>` (ex., `title_ar`)\n  - `description_<locale>` (ex., `description_ar`)\n- dataset\n  - `title_<locale>` (ex., `title_ar`)\n  - `notes_<locale>` (ex., `notes_ar`)\n\nIf you are using ckanext-scheming, define field like this::\n\n\t...\n\t{\n        \"field_name\": \"title_ar\",\n        \"label\": \"Arabic Name\",\n        \"validators\": \"if_empty_same_as(title)\"\n\t},\n\t...\n\nOr you can define custom fields using low-level `IDatasetForm`/`IGroupForm`/`IOrganizationForm`.\n\nIf none of above is possible, provide an extra field via CKAN extras(key/value\npairs of fields in the very bottom of dataset/group/organization form).\n",
    "bugtrack_url": null,
    "license": "AGPL",
    "summary": null,
    "version": "0.1.2.post1",
    "project_urls": {
        "Homepage": "https://github.com/DataShades/ckanext-duo"
    },
    "split_keywords": [
        "ckan"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fa69279d2701154a41287a92bf7d05125e94a73371bfa72850a76a65b7eb8d6d",
                "md5": "d7f3e694620f1e3ac120bf592257904e",
                "sha256": "7ddcc34e6cda4a4b292ca8c7f3cc4e864cd132b079d29f96b46646f91860a7c3"
            },
            "downloads": -1,
            "filename": "ckanext_duo-0.1.2.post1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d7f3e694620f1e3ac120bf592257904e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 21976,
            "upload_time": "2024-10-17T14:53:02",
            "upload_time_iso_8601": "2024-10-17T14:53:02.660065Z",
            "url": "https://files.pythonhosted.org/packages/fa/69/279d2701154a41287a92bf7d05125e94a73371bfa72850a76a65b7eb8d6d/ckanext_duo-0.1.2.post1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c2a6df79c50c6138d22e403ee72dbf3540c465214a18395af3e02199c39587f8",
                "md5": "6a87ba63a327d1e20b31dcd118b279eb",
                "sha256": "e03c91b3cd1b46dfbe9dd834899269b47d3d8eef26a5d1ae560a2c4b23e8df61"
            },
            "downloads": -1,
            "filename": "ckanext_duo-0.1.2.post1.tar.gz",
            "has_sig": false,
            "md5_digest": "6a87ba63a327d1e20b31dcd118b279eb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 20720,
            "upload_time": "2024-10-17T14:53:04",
            "upload_time_iso_8601": "2024-10-17T14:53:04.046051Z",
            "url": "https://files.pythonhosted.org/packages/c2/a6/df79c50c6138d22e403ee72dbf3540c465214a18395af3e02199c39587f8/ckanext_duo-0.1.2.post1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-17 14:53:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DataShades",
    "github_project": "ckanext-duo",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "ckanext-duo"
}
        
Elapsed time: 0.56405s