From 215a099c4fdbcfd82f7009b4c173dc3720e60ac0 Mon Sep 17 00:00:00 2001 From: GPUCode <47210458+GPUCode@users.noreply.github.com> Date: Sat, 1 Apr 2023 08:02:37 +0300 Subject: [PATCH] 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 --- .ci/transifex/docker.sh | 9 --------- .github/workflows/ci.yml | 3 ++- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.ci/transifex/docker.sh b/.ci/transifex/docker.sh index c8c023a7e..d0857142d 100755 --- a/.ci/transifex/docker.sh +++ b/.ci/transifex/docker.sh @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0e58c8a7..67a00dfaf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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]