Add update-translations.sh script to fetch translations from weblate
This MR adds the update-translations.sh script.
This script allows to cleanly import weblate translation commit.
It performs the following:
- Check is the repository is clean
- Configure the weblate remote
- Fetch latest commits and create from them two branches
translation/updateandtranslation/next - Build translation completion statitics and select languages translated over 95%
- Parse all weblate commit and optimnize them:
- Check for invalid commits (non language or multi language commit)
- Drop non selected languages
- Regroup commit per languages
- Squashes commit from same author
- Rebase the optimized
translation/updatebranch - Update the AUTHORS file
- Rebase the
translation/nextbranch ontranslation/updatewith the reminder of weblate commits
After the script is run, translation/update is ready to be pushed to salsa for merging into live while translation/next can be used to resolve any conflict on weblate after merging.
On my tests, I managed to get the following optimization:
Out of 591 commits on top of live, 174 where rejected and 417 optimized into 36 commit.
Closes: #153 (closed).
Edited by Baptiste Beauplat