From ba67c506f28dd9d74aa53b19a592e9fb7db50f9c Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 22 Apr 2025 08:54:54 -0700 Subject: [PATCH] ci: extract translation check to script so we can run standalone --- .github/scripts/check-translations.sh | 14 ++++++++++++++ .github/workflows/test.yml | 14 +------------- 2 files changed, 15 insertions(+), 13 deletions(-) create mode 100755 .github/scripts/check-translations.sh diff --git a/.github/scripts/check-translations.sh b/.github/scripts/check-translations.sh new file mode 100755 index 000000000..18d5cd67b --- /dev/null +++ b/.github/scripts/check-translations.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +old_pot=$(mktemp) +cp po/com.mitchellh.ghostty.pot "$old_pot" +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 + # Ignore untranslated entries + msgcmp --use-untranslated "$f" po/com.mitchellh.ghostty.pot; +done diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a4557703a..ae0861f6d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -757,19 +757,7 @@ jobs: 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 - # Ignore untranslated entries - msgcmp --use-untranslated "$f" po/com.mitchellh.ghostty.pot; - done + run: nix develop -c .github/scripts/check-translations.sh blueprint-compiler: if: github.repository == 'ghostty-org/ghostty'