build: improve the script to test for Windows installer languages.

We were only comparing the po list with the language list in the
gimp3264.iss. Nevertheless since we also generate the <code>.setup.isl
files, we should also verify generated files corresponds exactly to the
same list of languages.
This commit does it for meson and autotools build.

This is also how I fixed the meson list (cf. previous commit).
This commit is contained in:
Jehan 2021-06-18 20:27:33 +02:00
parent a6c44a7191
commit 602add8c45
1 changed files with 29 additions and 3 deletions

View File

@ -12,10 +12,36 @@ INSTALLER_LANGS=`echo "$INSTALLER_LANGS" | tr '\n\r' ' ' | sed 's/\<en\> //'`
PO_LANGS=`ls ${GIMP_TESTING_ABS_TOP_SRCDIR}/po-windows-installer/*.po |sed 's%.*/po-windows-installer/\([a-zA-Z_]*\).po%\1%'` PO_LANGS=`ls ${GIMP_TESTING_ABS_TOP_SRCDIR}/po-windows-installer/*.po |sed 's%.*/po-windows-installer/\([a-zA-Z_]*\).po%\1%'`
PO_LANGS=`echo "$PO_LANGS" | tr '\n\r' ' '` PO_LANGS=`echo "$PO_LANGS" | tr '\n\r' ' '`
if [ "$PO_LANGS" = "$INSTALLER_LANGS" ]; then if [ "$PO_LANGS" != "$INSTALLER_LANGS" ]; then
exit 0
else
echo "Error: languages listed in the Windows installer script do not match the .po files in po-windows-installer/." echo "Error: languages listed in the Windows installer script do not match the .po files in po-windows-installer/."
echo "- PO languages: $PO_LANGS"
echo "- Installer languages: $INSTALLER_LANGS"
echo "Please verify: build/windows/installer/gimp3264.iss" echo "Please verify: build/windows/installer/gimp3264.iss"
exit 1 exit 1
fi fi
AUTOTOOLS_LANGS=`grep '[a-zA-Z_]*:\[[a-zA-Z_]*\]:[A-Z0-9-]*' ${GIMP_TESTING_ABS_TOP_SRCDIR}/build/windows/installer/lang/Makefile.am | \
sed 's/^\t*\([a-zA-Z_]*\):.*$/\1/' |sort`
AUTOTOOLS_LANGS=`echo "$AUTOTOOLS_LANGS" | tr '\n\r' ' ' | sed 's/\<en\> //'`
if [ "$PO_LANGS" != "$AUTOTOOLS_LANGS" ]; then
echo "Error: languages listed in the autotools script do not match the .po files in po-windows-installer/."
echo "- PO languages: $PO_LANGS"
echo "- Autotools languages: $AUTOTOOLS_LANGS"
echo "Please verify: build/windows/installer/lang/Makefile.am"
exit 1
fi
MESON_LANGS=`grep "'code':" ${GIMP_TESTING_ABS_TOP_SRCDIR}/build/windows/installer/lang/meson.build | \
sed "s/^.*'code': *'\([^']*\)'.*$/\1/" |sort`
MESON_LANGS=`echo "$MESON_LANGS" | tr '\n\r' ' ' | sed 's/\<en\> //'`
if [ "$PO_LANGS" = "$MESON_LANGS" ]; then
exit 0
else
echo "Error: languages listed in the meson script do not match the .po files in po-windows-installer/."
echo "- PO languages: $PO_LANGS"
echo "- Meson languages: $MESON_LANGS"
echo "Please verify: build/windows/installer/lang/meson.build"
exit 1
fi