Skip to main content

Toolchain to migrate legacy translation to Fluent.

Project description

Fluent Migration Tools

Programmatically create Fluent files from existing content in both legacy and Fluent formats. Use recipes written in Python to migrate content for each of your localizations.

migrate-l10n is a CLI script which uses the fluent.migrate module under the hood to run migrations on existing translations.

validate-l10n-recipe is a CLI script to test a migration recipe for common errors, without trying to apply it.

Installation

Install from PyPI:

pip install fluent.migrate[hg]

If you only want to use the MigrationContext API, you can drop the requirement on python-hglib:

pip install fluent.migrate

Usage

Migrations consist of recipes, which are applied to a localization repository, based on template files. You can find recipes for Firefox in mozilla-central/python/l10n/fluent_migrations/, the reference repository is gecko-strings or quarantine. You apply those migrations to l10n repositories in l10n-central, or to gecko-strings for testing.

The migrations are run as python modules, so you need to have their file location in PYTHONPATH.

An example would look like

$ migrate-l10n --lang it --reference-dir gecko-strings --localization-dir l10n-central/it bug_1451992_preferences_sitedata bug_1451992_preferences_translation

Contact

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

fluent.migrate-0.8.1.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

fluent.migrate-0.8.1-py2.py3-none-any.whl (26.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file fluent.migrate-0.8.1.tar.gz.

File metadata

  • Download URL: fluent.migrate-0.8.1.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.6

File hashes

Hashes for fluent.migrate-0.8.1.tar.gz
Algorithm Hash digest
SHA256 18a87eeb39dd97ca0f40afb97180429a21e8663c5665e80766a7da96c147bd93
MD5 658d7ae051f6185ccc8d6e33bf117302
BLAKE2b-256 b7f263b4522fdf50ecd8685a1110287717bc2667389b0d8a7c66d3f9aa6436a1

See more details on using hashes here.

Provenance

File details

Details for the file fluent.migrate-0.8.1-py2.py3-none-any.whl.

File metadata

  • Download URL: fluent.migrate-0.8.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 26.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.6

File hashes

Hashes for fluent.migrate-0.8.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0dd5db3cde2c3ac4aed7def1af6f76497b98444308a91febaa19429de7935c75
MD5 2b788d97150a5feb749f2fd5dcce785b
BLAKE2b-256 885aab35cbab472a89adbf26f026a273310a11c72d6b59f97d7f2ce4199c6424

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