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
File details
Details for the file fluent_migrate-0.13.1.tar.gz
.
File metadata
- Download URL: fluent_migrate-0.13.1.tar.gz
- Upload date:
- Size: 24.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf50ab6b75f678aac2566102c3ae98f693a2e3e4fb2bb6cb5dd2089a37c6fe92 |
|
MD5 | 3081c351cc8428fb1bacdef2e92056c1 |
|
BLAKE2b-256 | 667ec2d4c47457fe90a86d87bb4afcf7c15dd45520bc4e611f5275abe1a258df |
File details
Details for the file fluent.migrate-0.13.1-py2.py3-none-any.whl
.
File metadata
- Download URL: fluent.migrate-0.13.1-py2.py3-none-any.whl
- Upload date:
- Size: 29.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a65c1b2ce780f4e0e510c2d482944c5fe4502ea0e1338b2cd25ed1c58df2e4d |
|
MD5 | 31e473e310aa41af00682feb3ed8980a |
|
BLAKE2b-256 | f0250fcfd424787c7f3695784221cc4dae3fd51eb11f871d01f4460714c9a49a |