Skip to main content

Translation plugin for Wagtail CMS

Project description

Wagtail localize

Version License codecov Language grade: Python black pre-commit

Wagtail Localize is a translation plugin for the Wagtail CMS. It allows pages or snippets to be translated within Wagtail's admin interface. It also provides integrations with external translations services such as Pontoon or DeepL, and importing/exporting translations with PO files.

Documentation Changelog

Requirements

Wagtail Localize requires the following:

Installation

Install using pip:

pip install wagtail-localize

Add wagtail_localize and wagtail_localize.locales to your INSTALLED_APPS setting:

INSTALLED_APPS = [
    # ...
    "wagtail_localize",
    "wagtail_localize.locales",  # This replaces "wagtail.locales"
    # ...
]

wagtail-localize loads additional assets for the editing interface. Run the collectstatic management command to collect all the required assets.

python manage.py collectstatic

Contributing

All contributions are welcome!

Install

To make changes to this project, first clone this repository:

git clone git@github.com:wagtail/wagtail-localize.git
cd wagtail-localize

With your preferred virtualenv activated, install testing dependencies:

Using pip

pip install pip>=21.3
pip install -e .[testing] -U

Using flit

pip install "flit>=3.8.0"
flit install

pre-commit

Note that this project uses pre-commit. To set up locally:

# if you don't have it yet, globally
$ pip install pre-commit
# go to the project directory
$ cd wagtail-localize
# initialize pre-commit
$ pre-commit install

# Optional, run all checks once for this, then the checks will run only on the changed files
$ pre-commit run --all-files

How to run tests

Now you can run tests as shown below:

tox

or, you can run them for a specific environment tox -e python3.8-django3.2-wagtail2.15 or specific test tox -e python3.9-django3.2-wagtail2.15-sqlite wagtail_localize.tests.test_edit_translation.TestGetEditTranslationView

To run the test app interactively, use tox -e interactive, visit http://127.0.0.1:8020/admin/ and log in with admin/changeme.

Support

For support, please use GitHub Discussions or ask a question on the #multi-language channel on Wagtail's Slack instance.

Thanks

Many thanks to all of our supporters, contributors, and early adopters who helped with the initial release. In particular, to The Mozilla Foundation and Torchbox who sponsored the majority of the initial development and Wagtail core's internationalisation support.

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

wagtail-localize-1.4.tar.gz (272.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wagtail_localize-1.4-py3-none-any.whl (481.2 kB view details)

Uploaded Python 3

File details

Details for the file wagtail-localize-1.4.tar.gz.

File metadata

  • Download URL: wagtail-localize-1.4.tar.gz
  • Upload date:
  • Size: 272.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.27.1

File hashes

Hashes for wagtail-localize-1.4.tar.gz
Algorithm Hash digest
SHA256 fd1195de3c23e3a061576f1b947fe7498676ff5678fe008d4cd388125a20a54a
MD5 dab42fe40f057bbf1b0d56f7bfa07570
BLAKE2b-256 2d24d8e45452b39e79997c6e5f37e3374fce704e135ec7cf274bd222a92a61b5

See more details on using hashes here.

File details

Details for the file wagtail_localize-1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for wagtail_localize-1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 40f974809509de54dcc18ee6aa98908bffd9dfaba53150e214f4046b2286920e
MD5 dfc4c79a27f4d2c51e25ce7eb562cae9
BLAKE2b-256 e2877e161e2f3d3167026430c1408f93544b0dedd2212b60ac37dff8f175d158

See more details on using hashes here.

Supported by

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