Print an error in CI if translation is incomplete

This commit is contained in:
Guillaume Meunier
2024-10-29 21:13:15 +01:00
parent 2c19d8698f
commit df52e290f7
+14 -12
View File
@@ -1,7 +1,5 @@
#!/bin/bash
set -e
cd $(dirname $0)/..
WIVRN_POT=$(mktemp)
@@ -22,6 +20,8 @@ do
if [ $? != 0 ]
then
RC=1
echo ::error file=$i::$i is not up to date
fi
done
@@ -29,19 +29,21 @@ rm $WIVRN_POT
for i in $(find dashboard -name "wivrn_*.ts")
do
cp $i $i.bak
lupdate -silent dashboard/*.{cpp,ui} -ts $i
mv $i $i.new
mv $i.bak $i
cp $i $i.bak
lupdate -silent dashboard/*.{cpp,ui} -ts $i
mv $i $i.new
mv $i.bak $i
diff -U 3 -I '.*<location.*/>' $i $i.new
diff -U 3 -I '.*<location.*/>' $i $i.new
if [ $? != 0 ]
then
RC=1
fi
if [ $? != 0 ]
then
RC=1
rm $i.new
echo ::error file=$i::$i is not up to date
fi
rm $i.new
done