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

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

Uploaded Source

Built Distribution

fluent.migrate-0.12.0-py2.py3-none-any.whl (27.5 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: fluent.migrate-0.12.0.tar.gz
  • Upload date:
  • Size: 23.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for fluent.migrate-0.12.0.tar.gz
Algorithm Hash digest
SHA256 926e69e94975521a974b206e242a479310c2cbca1865ca26bf40fa3c7a357338
MD5 3614067ac79d9712dd120de65b1e1dcb
BLAKE2b-256 fbc0f7eff025cd0957fd461218006519ea1cf863f72f260602b1c143d5c6f9b7

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for fluent.migrate-0.12.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e3564c92d1f53700e98792f1be1ff954488d431ff9f5ec290a4ab13b5de69487
MD5 f118eae46c32e45313e8bdfb2e82acae
BLAKE2b-256 e044195498e6ca7fcebe95eb09217a4e614c2d274a2e0e8c03c0ecbcdc7347c7

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