From 0e2bf7e804c6236c56302d33015af93cf85d2b3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 27 Jan 2020 21:23:10 +0100 Subject: [PATCH] build: Check translations using a script Use a bash script to check the translations as we used to do during the autotools-based distcheck. --- po/check-translations.sh | 14 ++++++++++++++ po/meson.build | 5 +++++ 2 files changed, 19 insertions(+) create mode 100755 po/check-translations.sh diff --git a/po/check-translations.sh b/po/check-translations.sh new file mode 100755 index 0000000..9754168 --- /dev/null +++ b/po/check-translations.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +po_dir=$(dirname $0) + +for i in $po_dir/*.po ; do + if ! grep -q `basename $i | sed 's,.po,,'` $po_dir/LINGUAS; then + echo '**********************************'; + echo '***' `basename $i | sed 's,.po,,'` missing from po/LINGUAS '***' ; + echo '**********************************'; + exit 1; + fi; +done; + +exit 0 diff --git a/po/meson.build b/po/meson.build index e9b77d7..ce0906a 100644 --- a/po/meson.build +++ b/po/meson.build @@ -1 +1,6 @@ i18n.gettext(meson.project_name(), preset: 'glib') + +test('check-translations', + find_program('check-translations.sh'), + suite: ['dist'], +)