Port yuzu-emu/yuzu#9058: "New transifex client needs migrating to" (#6389)

* Translations: new transifex client

Currently we're using the python client which uses an API that they
state will sunset Nov 30, 2022.

`tx push -s` actually appears to work properly, some of the other
commands require tweaking, like instead of suggesting `tx pull -a` in
dist/languages we need to suggest `tx pull -t -a`

* Set TX_TOKEN for transifex client

I did some tests on my own fork, and we're writing to ~/.transifexrc but
the client can't seem to read that file. maybe issue with $HOME or
something.

Workaround is to set TX_TOKEN environment variable and now the pesky
~/.transifexrc file is not needed.

---------

Co-authored-by: Kyle Kienapfel <Docteh@users.noreply.github.com>
This commit is contained in:
GPUCode 2023-04-01 08:02:37 +03:00 committed by GitHub
parent f96047f182
commit 215a099c4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 10 deletions

View File

@ -1,14 +1,5 @@
#!/bin/bash -e
# Setup RC file for tx
cat << EOF > ~/.transifexrc
[https://www.transifex.com]
hostname = https://www.transifex.com
username = api
password = $TRANSIFEX_API_TOKEN
EOF
set -x
cat << 'EOF' > /usr/bin/tx

View File

@ -218,10 +218,11 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Update Translation
run: ./.ci/transifex/docker.sh
env:
TRANSIFEX_API_TOKEN: ${{ secrets.TRANSIFEX_API_TOKEN }}
TX_TOKEN: ${{ secrets.TRANSIFEX_API_TOKEN }}
release:
runs-on: ubuntu-latest
needs: [build, android, macos-universal, source, windows]