c697a90088
Aligns with fluent.migrate 0.12.0, which mozilla-central updated to in bug 1812539. Depends on D184751 Differential Revision: https://phabricator.services.mozilla.com/D184752 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
fluent | ||
fluent.migratetb.egg-info | ||
LICENSE | ||
PKG-INFO | ||
README.md | ||
moz.yaml | ||
setup.cfg | ||
setup.py |
README.md
Fluent Migration Tools - Thunderbird Fork
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.
This is a fork for performing Thunderbird string migrations. Usage is slightly different than upsteam due to the use of a monorepo.
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
-
Clone this repo somewhere
-
pip install "/tb-fluent-migrate[hg]"
Alternatively, install right from the repo:
- pip install "fluent.migrate[hg] @ git+https://github.com/jfx2006/tb-fluent-migrate"
Usage
Migrations consist of recipes, which are applied to a localization repository, based on template files.
You can find recipes for Thunderbird in comm-central/python/l10n/tb_fluent_migrations/
,
the reference repository is comm-strings-quarantine or quarantine.
You apply those migrations to l10n repositories in comm-l10n.
The migrations are run as python modules, so you need to have their file location in PYTHONPATH
.
An example would look like
$ migrate-l10n --locale it --reference-dir comm-strings-quarantine --localization-dir comm-l10n bug_1802387_langpack_defines