diff --git a/.github/workflows/build-test-deploy.yaml b/.github/workflows/build-test-deploy.yaml index c4532c382..c3fceb466 100644 --- a/.github/workflows/build-test-deploy.yaml +++ b/.github/workflows/build-test-deploy.yaml @@ -172,6 +172,15 @@ jobs: docker_image_name: debian_old - name: Run build run: docker-compose run --rm debian_old ./.ci-scripts/build-qtox-linux.sh --build-type ${{ matrix.build_type }} --${{ matrix.features }} + translation-check: + name: Check for translatable strings + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install deps + run: sudo apt-get update && sudo apt-get install qttools5-dev + - name: Test for modified translatable strings + run: ./tools/update-translation-files.sh ALL && git diff --exit-code build-ubuntu: name: Ubuntu LTS runs-on: ubuntu-latest diff --git a/MAINTAINING.md b/MAINTAINING.md index 4788212e5..1a267a888 100644 --- a/MAINTAINING.md +++ b/MAINTAINING.md @@ -161,6 +161,9 @@ require a bit more attention & regular checking whether there are new translations, on the other, it lessened problems that were happening with "manual" way of providing translations. +New translable strings need to be generated into a form Weblate can consume +using `./tools/update-translation-files.sh ALL` and commiting the result. + To get translations into qTox: 1. Go to `https://hosted.weblate.org/projects/tox/qtox/#repository` and lock @@ -174,11 +177,7 @@ To get translations into qTox: - `translations/README.md` - `translations/i18n.pri` - `translations/translations.qrc` -5. To update translatable strings from qTox for Weblate, run - `./tools/update-translation-files.sh ALL` -6. Checkout a new branch with e.g. `git checkout -b update_weblate` and open - a Pull Request for it on Github. -7. After the Pull Request has been merged, `reset` Weblate to master and +5. After the Pull Request has been merged, `reset` Weblate to master and unlock it. # Releases diff --git a/tools/update-translation-files.sh b/tools/update-translation-files.sh index edcebf92a..d23fa9614 100755 --- a/tools/update-translation-files.sh +++ b/tools/update-translation-files.sh @@ -27,7 +27,6 @@ set -eu -o pipefail -readonly COMMIT_MSG="chore(i18n): update translation files for Weblate" readonly LUPDATE_CMD="lupdate src -no-obsolete -locations none -ts" if [[ "$@" = "ALL" ]] @@ -36,9 +35,6 @@ then do $LUPDATE_CMD "$translation" done - - git add translations/*.ts - git commit -m "$COMMIT_MSG" else $LUPDATE_CMD "$@" fi