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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fluent_migrate-0.13.3.tar.gz.
File metadata
- Download URL: fluent_migrate-0.13.3.tar.gz
- Upload date:
- Size: 24.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dafb8c7a4024e46aa2de359db7265f49fb4fb593fdb1d61b6b014a1a9f16ad5c
|
|
| MD5 |
982d31ff6c3c5f0d93bd272320e6d90c
|
|
| BLAKE2b-256 |
4a70b3538bbabff88436510fc9c5825a1ee95ca154f26bf6b3ac19fc324e61d6
|
File details
Details for the file fluent.migrate-0.13.3-py2.py3-none-any.whl.
File metadata
- Download URL: fluent.migrate-0.13.3-py2.py3-none-any.whl
- Upload date:
- Size: 28.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a190d5e76ea4a47061821d3688fb7eb9075916ab1439d838e2a54fe62305b80f
|
|
| MD5 |
e983b283a6342f23bab07f3d830579c9
|
|
| BLAKE2b-256 |
ce98d12595cca26573b658e4b150ed0ab70cdacb120361576f7d1d15cae516a4
|