| 1 |
Metadata-Version: 2.1 |
| 2 |
Name: fluent.migrate |
| 3 |
Version: 0.13.2 |
| 4 |
Summary: Toolchain to migrate legacy translation to Fluent. |
| 5 |
Home-page: https://github.com/mozilla/fluent-migrate |
| 6 |
Author: Mozilla |
| 7 |
Author-email: [email protected] |
| 8 |
License: APL 2 |
| 9 |
Keywords: fluent,localization,l10n |
| 10 |
Classifier: Development Status :: 3 - Alpha |
| 11 |
Classifier: Intended Audience :: Developers |
| 12 |
Classifier: License :: OSI Approved :: Apache Software License |
| 13 |
Classifier: Operating System :: POSIX |
| 14 |
Classifier: Programming Language :: Python :: 3.8 |
| 15 |
Classifier: Programming Language :: Python :: 3.9 |
| 16 |
Classifier: Programming Language :: Python :: 3.10 |
| 17 |
Classifier: Programming Language :: Python :: 3.11 |
| 18 |
Classifier: Programming Language :: Python :: 3.12 |
| 19 |
Description-Content-Type: text/markdown |
| 20 |
License-File: LICENSE |
| 21 |
Requires-Dist: compare-locales<10.0,>=9.0.1 |
| 22 |
Requires-Dist: fluent.syntax<0.20,>=0.19.0 |
| 23 |
Provides-Extra: hg |
| 24 |
Requires-Dist: python-hglib; extra == "hg" |
| 25 |
|
| 26 |
Fluent Migration Tools |
| 27 |
====================== |
| 28 |
|
| 29 |
Programmatically create Fluent files from existing content in both legacy |
| 30 |
and Fluent formats. Use recipes written in Python to migrate content for each |
| 31 |
of your localizations. |
| 32 |
|
| 33 |
`migrate-l10n` is a CLI script which uses the `fluent.migrate` module under |
| 34 |
the hood to run migrations on existing translations. |
| 35 |
|
| 36 |
`validate-l10n-recipe` is a CLI script to test a migration recipe for common |
| 37 |
errors, without trying to apply it. |
| 38 |
|
| 39 |
Installation |
| 40 |
------------ |
| 41 |
|
| 42 |
Install from PyPI: |
| 43 |
|
| 44 |
pip install fluent.migrate[hg] |
| 45 |
|
| 46 |
If you only want to use the `MigrationContext` API, you can drop the |
| 47 |
requirement on `python-hglib`: |
| 48 |
|
| 49 |
pip install fluent.migrate |
| 50 |
|
| 51 |
Usage |
| 52 |
----- |
| 53 |
|
| 54 |
Migrations consist of _recipes_, which are applied to a _localization repository_, based on _template files_. |
| 55 |
You can find recipes for Firefox in `mozilla-central/python/l10n/fluent_migrations/`, |
| 56 |
the reference repository is [gecko-strings](https://hg.mozilla.org/l10n/gecko-strings/) or _quarantine_. |
| 57 |
You apply those migrations to l10n repositories in [l10n-central](https://hg.mozilla.org/l10n-central/), or to `gecko-strings` for testing. |
| 58 |
|
| 59 |
The migrations are run as python modules, so you need to have their file location in `PYTHONPATH`. |
| 60 |
|
| 61 |
An example would look like |
| 62 |
|
| 63 |
$ migrate-l10n --lang it --reference-dir gecko-strings --localization-dir l10n-central/it bug_1451992_preferences_sitedata bug_1451992_preferences_translation |