ci: extract translation check to script so we can run standalone

pull/7137/head
Mitchell Hashimoto 2025-04-22 08:54:54 -07:00
parent 1c62ddffc4
commit ba67c506f2
No known key found for this signature in database
GPG Key ID: 523D5DC389D273BC
2 changed files with 15 additions and 13 deletions

14
.github/scripts/check-translations.sh vendored Executable file
View File

@ -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

View File

@ -757,19 +757,7 @@ jobs:
skipPush: true skipPush: true
useDaemon: false # sometimes fails on short jobs useDaemon: false # sometimes fails on short jobs
- name: check translations - name: check translations
run: | run: nix develop -c .github/scripts/check-translations.sh
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
blueprint-compiler: blueprint-compiler:
if: github.repository == 'ghostty-org/ghostty' if: github.repository == 'ghostty-org/ghostty'