diff options
author | Anton Tananaev <anton@traccar.org> | 2022-07-16 09:37:48 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-07-16 09:37:48 -0700 |
commit | ff6c50664389095457e8643475c70b880f819c0f (patch) | |
tree | e2fcce82bbbdd037fef50e06f96e1355b3f3c9bb | |
parent | 21c137d5be6c16ae461ee557de1b1b444e4d6db2 (diff) | |
download | trackermap-web-ff6c50664389095457e8643475c70b880f819c0f.tar.gz trackermap-web-ff6c50664389095457e8643475c70b880f819c0f.tar.bz2 trackermap-web-ff6c50664389095457e8643475c70b880f819c0f.zip |
Action for translation
-rw-r--r-- | .github/workflows/translation.yml | 30 | ||||
-rwxr-xr-x | tools/translate.py | 2 |
2 files changed, 30 insertions, 2 deletions
diff --git a/.github/workflows/translation.yml b/.github/workflows/translation.yml new file mode 100644 index 00000000..cd4afb49 --- /dev/null +++ b/.github/workflows/translation.yml @@ -0,0 +1,30 @@ +name: Update Translations + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.x' + - run: pip install transifex-python + - name: Update translations + env: + TRANSIFEX_TOKEN: ${{ secrets.TRANSIFEX_TOKEN }} + run: ./tools/translate.sh -t "$TRANSIFEX_TOKEN" + - name: Commit changes + run: | + git config --global user.name 'Traccar Bot' + git config --global user.email 'support@traccar.org' + git commit -am "Update localization files" + git remote set-url origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}" + git push diff --git a/tools/translate.py b/tools/translate.py index 43e90849..86e09640 100755 --- a/tools/translate.py +++ b/tools/translate.py @@ -1,7 +1,5 @@ #!/usr/local/bin/python3 -# pip3 install --upgrade transifex-python - import os import optparse import requests |