From 71117b4543ded5594100624cfbb890b1d07237d3 Mon Sep 17 00:00:00 2001 From: Hannah von Reth Date: Fri, 25 Aug 2023 16:59:27 +0200 Subject: [PATCH] Use qt6 to generate the translations --- .github/workflows/translate.yml | 16 +++++++++++----- translations/Makefile | 32 -------------------------------- 2 files changed, 11 insertions(+), 37 deletions(-) delete mode 100644 translations/Makefile diff --git a/.github/workflows/translate.yml b/.github/workflows/translate.yml index 6988ad676cf..99367c43889 100644 --- a/.github/workflows/translate.yml +++ b/.github/workflows/translate.yml @@ -27,21 +27,27 @@ jobs: submodules: recursive ref: "4" + - name: install-deps + run: sudo apt install -y qt6-l10n-tools + - name: l10n-remove-old - run: bash .github/workflows/run-in-docker.sh rabits/qt:5.12-desktop "cd translations && make l10n-remove-old" + run: | + rm translations/*.ts + git checkout translations/client_en.ts - name: l10n-read - run: bash .github/workflows/run-in-docker.sh rabits/qt:5.12-desktop "cd translations && make 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' - run: bash .github/workflows/run-in-docker.sh owncloudci/transifex:latest "cd translations && make l10n-push" + # 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 && make l10n-pull" + run: bash .github/workflows/run-in-docker.sh owncloudci/transifex:latest "cd translations && tx pull --force --skip --all" - name: l10n-clean - run: bash .github/workflows/run-in-docker.sh owncloudci/transifex:latest "cd translations && make l10n-clean" + run: git checkout translations/.tx/config - name: update-repo-before-commit run: | diff --git a/translations/Makefile b/translations/Makefile deleted file mode 100644 index fa9c27a3801..00000000000 --- a/translations/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# -# Translation -#-------------------------------------- -# pull all changes push none, intended for local testing -.PHONY: dry -dry: l10n-remove-old l10n-read l10n-pull - -# remove outdated translations -.PHONY: l10n-remove-old -l10n-remove-old: - rm *.ts - git checkout client_en.ts - -# update the generated source translation -.PHONY: l10n-read -l10n-read: - cd .. && lupdate src -no-obsolete -ts translations/client_en.ts - -# push the changed from l10n-read -.PHONY: l10n-push -l10n-push: - tx push -s --skip - -# pull all translation from transifex -.PHONY: l10n-pull -l10n-pull: - tx pull --force --skip --all - -# tx might apply changes to .tx/config, we don't want that -.PHONY: l10n-clean -l10n-clean: - git checkout .tx/config