build: Check translations using a script

Use a bash script to check the translations as we used to do during
the autotools-based distcheck.
This commit is contained in:
Marco Trevisan (Treviño)
2020-01-27 21:23:10 +01:00
committed by Bastien Nocera
parent f5a2c21f90
commit 0e2bf7e804
2 changed files with 19 additions and 0 deletions

14
po/check-translations.sh Executable file
View File

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

View File

@ -1 +1,6 @@
i18n.gettext(meson.project_name(), preset: 'glib')
test('check-translations',
find_program('check-translations.sh'),
suite: ['dist'],
)