diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 54da0736..b7a9af80 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -162,3 +162,27 @@ jobs: env: MDBOOK_BOOK__LANGUAGE: ${{ matrix.language }} run: mdbook test + + po-diff: + name: Translation diff + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Rust cache + uses: ./.github/workflows/setup-rust-cache + + - name: Install mdbook + uses: ./.github/workflows/install-mdbook + + - name: Copy latest version of translations + run: cp -r po old-po + + - name: Checkout base version + run: git checkout ${{ github.event.pull_request.base.sha }} + + - name: Translation diff + run: i18n-report diff old-po/ po/ > $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/install-mdbook/action.yml b/.github/workflows/install-mdbook/action.yml index 6c91bd39..b7de8aa2 100644 --- a/.github/workflows/install-mdbook/action.yml +++ b/.github/workflows/install-mdbook/action.yml @@ -29,7 +29,7 @@ runs: shell: bash - name: Install i18n-report - run: cargo install i18n-report --locked --version 0.1.0 + run: cargo install i18n-report --locked --version 0.2.0 shell: bash - name: Install mdbook-exerciser diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9370bc6e..53d547cf 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -55,14 +55,14 @@ jobs: done - name: Build translation report - run: i18n-report book/html/translation-report.html po/*.po + run: i18n-report report book/html/translation-report.html po/*.po - name: Build synced translation report run: | cp -r po synced-po MDBOOK_OUTPUT='{"xgettext": {"pot-file": "messages.pot", "granularity": 0}}' mdbook build -d synced-po for file in synced-po/*.po; do msgmerge --update $file synced-po/messages.pot ; done - i18n-report book/html/synced-translation-report.html synced-po/*.po + i18n-report report book/html/synced-translation-report.html synced-po/*.po - name: Setup Pages uses: actions/configure-pages@v5