ci: push translations on commit to master
This addresses #237. TL;DR Translation source strings are currently usually pushed on release, but that means translators never have a chance to fully translate any language. If source strings are pushed for every commit to the main branch (master) instead, translators would then actually be able to catch up before a release.
With this MR, once the TX_TOKEN
secret is also provided to CI, source strings would then be pushed to Transifex on commit to master.
Concerns
-
Opening a merge request for CI makes me feel uneasy, both because CI changes are usually kind of fragile (I tried the changes out on gitlab.com because of this), and also because touching the infrastructure as a new contributor to this project feels wrong.
If this MR isn't a reasonable approach, I still hope there is some change done such that translators have a non-zero amount of time to provide translations before a release, for example via a KDE-style string freeze or another implementation of pushing source strings regularly.
-
Perhaps the translation source string push should happen after the main build/test job so that commits that don't pass the tests don't trigger a source string push.
It seems unlikely, though, for a commit to not pass tests, land on master, and also simultaneously impact the extract source strings.
Testing these changes
I've tested this on a separate gitlab.com repository:
- The repository is current master (815b520e) plus two commits: d608dbca8450a5404c0b6f6de50779b00a2d036d (same commit as in this MR) and another commit to make the CI in the testing repository to be able to run on gitlab.com
- Merge requests do not run the new job, as expected (testing MR; pipeline result)
- A commit to
master
runs the new job, and is able to runtx
; it fails complaining about missing API token, as expected (commit; pipeline result)