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

Uploaded Source

Built Distribution

fluent.migrate-0.10-py2.py3-none-any.whl (28.0 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: fluent.migrate-0.10.tar.gz
  • Upload date:
  • Size: 22.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.9

File hashes

Hashes for fluent.migrate-0.10.tar.gz
Algorithm Hash digest
SHA256 532322b53c895142cf7c1702f95b54b9d3d128fb92eab38f6e8c8a80c447d8c2
MD5 b29f034d33934d5321f6c22557eca522
BLAKE2b-256 c4a60a592f81310865eab008782a34ac7a4b364e88b84d6d58a98a455361d218

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: fluent.migrate-0.10-py2.py3-none-any.whl
  • Upload date:
  • Size: 28.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.9

File hashes

Hashes for fluent.migrate-0.10-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ee1b4d827cff6d1df7f9b6a4b3eb78a75f1dd425e2e71b2013fd0dd411167b3e
MD5 ccb557dbdceaf5cb3f059fb3e57d7a9b
BLAKE2b-256 0894c3037c5c54cd01c6e7bbccf47396e951c17e0e6630a8b53ba86e18ea4242

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