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

Uploaded Source

Built Distribution

fluent.migrate-0.9-py2.py3-none-any.whl (27.4 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: fluent.migrate-0.9.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for fluent.migrate-0.9.tar.gz
Algorithm Hash digest
SHA256 d42a001bd7292cef400e63f3d77c0c813a6a6162e7bd2dfa14eb01172d21e788
MD5 d7d341cc3cd73847df5d3fff1e8f84cc
BLAKE2b-256 bfb0bbd0bcdc331b4dd223150c1456dfdfed5f128a080b331795ce454dfa618b

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: fluent.migrate-0.9-py2.py3-none-any.whl
  • Upload date:
  • Size: 27.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for fluent.migrate-0.9-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 735c86816ef7b7b03b32ff9985685f2d99cb0ed135351e4760a85236538f0beb
MD5 eca305b204a6c9d82684616e306314a7
BLAKE2b-256 976651b082d9bbd3f174b04943da9ddf2e5fa328ad316bc8f18e5be9ffa3ee5f

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