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:

# 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-wagtail4.1 or specific test tox -e python3.9-django3.2-wagtail4.1-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.6.tar.gz (267.3 kB view details)

Uploaded Source

Built Distribution

wagtail_localize-1.6-py3-none-any.whl (485.2 kB view details)

Uploaded Python 3

File details

Details for the file wagtail_localize-1.6.tar.gz.

File metadata

  • Download URL: wagtail_localize-1.6.tar.gz
  • Upload date:
  • Size: 267.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for wagtail_localize-1.6.tar.gz
Algorithm Hash digest
SHA256 b590d095ca0752a0247909ca8cea71fbaa54b173cd59aa63f460a4a6b0fc74d0
MD5 fb042a52d46563e4408a84487b3cafa2
BLAKE2b-256 a7913355b62d07deadabcbb717773a603ea558a4877cf3903b7a3a04e2ab70a8

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for wagtail_localize-1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 bc46941cd0dc287d8bca0fa15f50fca6ee7bb45f01af6161e75b0173b7af118f
MD5 4835d8dfb796b597e10759af36f126f0
BLAKE2b-256 40960c6c2887c1dabf76c258962f13fcb0e8db67c67d41bb18fab2bc07bfb35d

See more details on using hashes here.

Provenance

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