From 5851bad4a00c20012329ce25af2dcf6d003e0625 Mon Sep 17 00:00:00 2001 From: Leah Amelia Chen Date: Wed, 26 Feb 2025 17:16:21 +0100 Subject: [PATCH] ci: add check that ensures POT files are up to date --- .github/workflows/test.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e64b2c4d8..a5366646b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,6 +25,7 @@ jobs: - prettier - alejandra - typos + - translations - test-pkg-linux - test-debian-12 steps: @@ -593,6 +594,42 @@ jobs: - name: typos check run: nix develop -c typos + translations: + if: github.repository == 'ghostty-org/ghostty' + runs-on: namespace-profile-ghostty-sm + timeout-minutes: 60 + env: + ZIG_LOCAL_CACHE_DIR: /zig/local-cache + ZIG_GLOBAL_CACHE_DIR: /zig/global-cache + steps: + - uses: actions/checkout@v4 # Check out repo so we can lint it + - name: Setup Cache + uses: namespacelabs/nscloud-cache-action@v1.2.0 + with: + path: | + /nix + /zig + - uses: cachix/install-nix-action@v30 + with: + nix_path: nixpkgs=channel:nixos-unstable + - uses: cachix/cachix-action@v15 + with: + name: ghostty + authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" + skipPush: true + useDaemon: false # sometimes fails on short jobs + - name: check translations + run: | + old_pot=$(mktemp) + cp po/com.mitchellh.ghostty.pot "$old_pot" + nix develop -c zig build update-translations + + # Compare previous POT to current POT + msgcmp "$old_pot" po/com.mitchellh.ghostty.pot --use-untranslated + + # Compare all other POs to current POT + for f in po/*.po; do msgcmp "$f" po/com.mitchellh.ghostty.pot; done + test-pkg-linux: strategy: fail-fast: false