[gimp/gimp-2-10] build: improve the script to test for Windows installer languages.



commit e8074641459131cf447593283ffeacf70b5e31fd
Author: Jehan <jehan girinstud io>
Date:   Fri Jun 18 20:27:33 2021 +0200

    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).
    
    (cherry picked from commit 602add8c4555995514b2965a7312eb9c7ca821a2
    except that I removed the comparison with meson files)

 build/windows/installer/lang/test-installer-langs.sh | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/build/windows/installer/lang/test-installer-langs.sh 
b/build/windows/installer/lang/test-installer-langs.sh
index 795e2c7990..7e9dc5844b 100755
--- a/build/windows/installer/lang/test-installer-langs.sh
+++ b/build/windows/installer/lang/test-installer-langs.sh
@@ -12,10 +12,22 @@ 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=`echo "$PO_LANGS" | tr '\n\r' ' '`
 
-if [ "$PO_LANGS" = "$INSTALLER_LANGS" ]; then
-  exit 0
-else
+if [ "$PO_LANGS" != "$INSTALLER_LANGS" ]; then
   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"
   exit 1
 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]