This repository contains scripts and workflows for the management of Mozilla's l10n terminology.
Script for comparing tbx files between Pontoon and Smartling. Returns terms unique to each glossary. See here for details.
Script for merging Pontoon glossary tbx files with Smartling. See here for details.
The automation periodically checks Pontoon terminology for any new terms or translations that have been added. If new terms are found, the workflow will fail then a pull request will be created.
The pull request commits the latest tbx files from Pontoon into the terminology
folder. This folder contains terminology files that reflect the current state of the Smartling glossary. The new terms/translations should be synced with Smartling using the TBX Merge script before the Pull Request is merged. Once Smartling is updated and the Pull Request merged, the two repos' status can be considered in-sync.
-
Terminology Update Check:
Automatically runs 2 times a month. If the workflow fails it means some locales have updated/added terms. A Pull Request will be created with the changes to pertinent files. -
Export Smartling glossary
Go to Smartling and export main glossary. See details on how to do this here.
- Select
TBX V2 Core
- Choose
Select displayed results
to export all languages
- Copy the downloaded file to your working folder, run tbx_merge.py script
Example:
python ./terminology_management/scripts/tbx_merge/tbx_merge.py --locales ./terminology_management/scripts/tbx_merge/locales.txt --id-format smartling --smartling ./smartling.tbx
-
Import
smartling_merge_glossary.tbx
into Smartling
Compare the import information (locales, number of terms changed) that appears in Smartling to what appears in step 1. If everything appears OK, complete the import. After import complete, spot check that terms have been added successfully. -
Merge pull request and delete branch
-
Manually run workflow to confirm PR in sync
Run the workflow again.
It is possible more terms were added between when the PR was created and when you did the sync. In that case, git is not in sync with Smartling, and you should merge the second PR generated after confirming that only terms added during step 4 are included in the PR.