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 #!/bin/bash
set -e
cd $(dirname $0)/.. cd $(dirname $0)/..
WIVRN_POT=$(mktemp) WIVRN_POT=$(mktemp)
@@ -22,6 +20,8 @@ do
if [ $? != 0 ] if [ $? != 0 ]
then then
RC=1 RC=1
echo ::error file=$i::$i is not up to date
fi fi
done done
@@ -29,19 +29,21 @@ rm $WIVRN_POT
for i in $(find dashboard -name "wivrn_*.ts") for i in $(find dashboard -name "wivrn_*.ts")
do do
cp $i $i.bak cp $i $i.bak
lupdate -silent dashboard/*.{cpp,ui} -ts $i lupdate -silent dashboard/*.{cpp,ui} -ts $i
mv $i $i.new mv $i $i.new
mv $i.bak $i mv $i.bak $i
diff -U 3 -I '.*<location.*/>' $i $i.new diff -U 3 -I '.*<location.*/>' $i $i.new
if [ $? != 0 ] if [ $? != 0 ]
then then
RC=1 RC=1
fi
rm $i.new echo ::error file=$i::$i is not up to date
fi
rm $i.new
done done