onebusaway-android
onebusaway-android copied to clipboard
Set up Transifex for translations
Summary:
OTSF now has a Transifex account that is actively being used for translations on iOS: https://www.transifex.com/open-transit-software-foundation/
We should do the same on Android.
Steps to reproduce:
Try to do a translation
Expected behavior:
Make it easy via Transifex
Observed behavior:
It's hard
I set up the push of strings to Transifex in a GitHub Action as part of this project - https://github.com/barbeau/gpstest/issues/526#issuecomment-925436677.
It uses a script: https://github.com/barbeau/gpstest/blob/master/scripts/push-to-transifex.sh
...that's triggered from the GitHub Action: https://github.com/barbeau/gpstest/blob/master/.github/workflows/transifex.yml
Here's the magic for authentication:
export TX_TOKEN=$TRANSIFEX_API_TOKEN
tx push -s --force --no-interactive
and this in the GitHub Action:
env:
TRANSIFEX_API_TOKEN: ${{ secrets.TRANSIFEX_API_TOKEN }}
Apparently the TRANSIFEX_API_TOKEN
GitHub secret for Transifex API token has to be set up as a "Repository" secret and not "Environmental" secret in the GitHub UI.
OBA iOS has this step automated too, but configured via Transifex to pull strings on GitHub PR merges. Might be a cleaner approach that doesn't require scripts.