Migrating Strings From Legacy or Fluent Files¶
Firefox is a project localized in over 100 languages. As the code for existing features moves away from the old localization systems and starts using Fluent, we need to ensure that we don’t lose existing translations, which would have the adverse effect of forcing contributors to localize hundreds of strings from scratch.
Fluent Migration is a Python library designed to solve this specific problem: it allows to migrate translations from .properties and other legacy file formats, not only moving strings and transforming them as needed to adapt to the FTL syntax, but also replicating “blame” for each string in VCS.
The library also includes basic support for migrating existing Fluent messages without interpolations (e.g. variable replacements). The typical use cases would be messages moving as-is to a different file, or changes to the morphology of existing messages (e.g move content from an attribute to the value of the message).
How to Get Help¶
Writing migration recipes can be challenging for non trivial cases, and it can require extensive l10n knowledge to avoid localizability issues.
Don’t hesitate to reach out to the l10n-drivers for feedback, help to test or write the migration recipes:
Bryan Olsson (:bolsson)
Francesco Lodolo (:flod)
Eemeli Aro (:eemeli)