Skip to content

Update translations #933

Update translations

Update translations #933

Workflow file for this run

name: "Update translations"
on:
workflow_dispatch:
schedule:
- cron: "0 3 * * *"
permissions: {}
defaults:
run:
shell: pwsh
jobs:
update-translations:
permissions:
# for git push
contents: write
runs-on: ubuntu-latest
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
ref: "5"
- name: install-deps
run: sudo apt install -y qt6-l10n-tools
- name: l10n-remove-old
run: |
rm translations/*.ts
git checkout translations/client_en.ts
- name: l10n-read
run: /usr/lib/qt6/bin/lupdate src -no-obsolete -ts translations/client_en.ts
- name: l10n-push
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
# we need to use a different docker image for those two, this appears to be a bit tricky with github actions out of the box
run: bash .github/workflows/run-in-docker.sh owncloudci/transifex:latest "cd translations && tx push -s --skip"
- name: l10n-pull
run: bash .github/workflows/run-in-docker.sh owncloudci/transifex:latest "cd translations && tx pull --force --skip --all"
- name: l10n-clean
run: git checkout translations/.tx/config
- name: update-repo-before-commit
run: |
git status
git add translations/client_*.ts
git status
git stash
git pull --ff-only origin
- name: commit and push
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
run: |
if(git stash list) {
git stash pop
install -d -m 0700 ~/.ssh
Set-Content -Value "${{ secrets.DEPLOYMENT_SSH_KEY }}" -Path ~/.ssh/id_ed25519
chmod 0600 ~/.ssh/id_ed25519
git config user.name "ownClouders"
git config user.email "[email protected]"
git add translations/
git commit -m "[tx] updated client translations from transifex [skip ci]"
git push [email protected]:owncloud/client.git
}