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
- mailing list: https://lists.mozilla.org/listinfo/tools-l10n
- bugzilla: Open Bugs - New Bug
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
Hashes for fluent.migrate-0.7.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a1ebb5df97d2590e35b6fb8d665d6d2e20aac3e6962706854baefb7ac0002a0 |
|
MD5 | 1d4fe6200d36f31241bb1ebe03ece8fd |
|
BLAKE2b-256 | 4b67bf2400c2f6b7b6852bf7a3d38ef48fe8965254ed67284878840ff3117929 |