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

Uploaded Source

Built Distribution

fluent.migrate-0.13.2-py2.py3-none-any.whl (29.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file fluent_migrate-0.13.2.tar.gz.

File metadata

  • Download URL: fluent_migrate-0.13.2.tar.gz
  • Upload date:
  • Size: 25.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for fluent_migrate-0.13.2.tar.gz
Algorithm Hash digest
SHA256 e69bb4fde0a071e9edfecf371680ed719b451cff3ba2ecf6c32ccf9b29fffbaa
MD5 d769b72c6101866efbeb72acb259590b
BLAKE2b-256 7af67a29278222a9ae897aff40bff79ae05cf3b966766664da1b48d89533ba7b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fluent.migrate-0.13.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 77a361b4ff874af5c8134f2f73631c946e40527d9108ebadaeb823b97debf650
MD5 98a79557a300bef1730b12f7b19c2e5b
BLAKE2b-256 1b7eb3be10829760e6050eb3aa10a4e51734541086efb7bf6f16851451640dfd

See more details on using hashes here.

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