[postgis-tickets] [SCM] PostGIS branch master updated. 3.4.0rc1-46-g86e0710d3

git at osgeo.org git at osgeo.org
Wed Aug 23 09:36:39 PDT 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  86e0710d33e0693332d8acd5f8f3e29fccf2ff49 (commit)
      from  b1f7e19938afbedafa642bf3803b72fdb0af0ebd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 86e0710d33e0693332d8acd5f8f3e29fccf2ff49
Author: Sandro Santilli <strk at kbt.io>
Date:   Wed Aug 23 18:34:28 2023 +0200

    Add script to check all available translations are enabled
    
    And hook it to make check

diff --git a/GNUmakefile.in b/GNUmakefile.in
index 7e8b1a698..e6ba14332 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -65,7 +65,7 @@ clean-local:
 # TODO: drop 'test' target..
 test: check
 
-check: check-no-trailing-blanks check-unit docs-check check-news check-tests-enabled
+check: check-no-trailing-blanks check-unit docs-check check-news check-tests-enabled check-lang-enabled
 
 ifeq (@LIBLWGEOM_ONLY@,no)
 check: check-regress
@@ -262,6 +262,10 @@ check-regress: staged-install check-regress-deps
 check-tests-enabled:
 	$(top_srcdir)/utils/check_tests_enabled.sh $(top_srcdir)
 
+check-lang-enabled:
+	$(top_srcdir)/utils/check_lang_enabled.sh $(top_srcdir)
+
+
 check-regress-deps:
 ifeq (@TOPOLOGY@,topology)
 	$(MAKE) -C topology/test $@
diff --git a/utils/check_lang_enabled.sh b/utils/check_lang_enabled.sh
new file mode 100755
index 000000000..96146c887
--- /dev/null
+++ b/utils/check_lang_enabled.sh
@@ -0,0 +1,60 @@
+
+#!/bin/sh
+
+usage() {
+  echo "Usage: $0 [<sourcedir>]"
+}
+
+### COMMAND LINE PARSING
+RD= # Root source dir
+while [ $# -gt 0 ]; do
+  if [ "$1" = "--help" ]; then
+    usage
+    exit 0
+  elif [ -z "${RD}" ]; then
+    RD=$1
+  else
+    echo "ERROR: unrecognized extra argument $1" >&2
+    usage >&2
+    exit 1
+  fi
+  shift
+done
+
+if [ -z "${RD}" ]; then
+  RD=`dirname $0`/..
+fi
+test ${RD}/doc/po || {
+  echo "ERROR: Source dir ${RD} does not contain a doc/po directory" >&2
+  exit 1
+}
+
+ENABLED_TRANSLATIONS=$(grep ^translations ${RD}/doc/Makefile.in | cut -d= -f2)
+fail=0
+
+CORRECTLY_ENABLED=
+
+# Available languages are those for which we have at least a .po file
+for LANG in $(
+  find ${RD}/doc/po/ -name '*.po' | xargs dirname | sort -u | xargs -n 1 basename
+)
+do
+
+  # Check that the language dir has a Makefile.in
+  test -f ${RD}/doc/po/${LANG}/Makefile.in || {
+    echo "FAIL: ${RD}/doc/po/${LANG} is missing a Makefile.in"
+    fail=$((fail+1))
+    continue
+  }
+
+  echo "${ENABLED_TRANSLATIONS}" | grep -qw "${LANG}" || {
+    echo "FAIL: ${LANG} is not enabled in ${RD}/doc/Makefile.in (translations)"
+    fail=$((fail+1))
+    continue
+  }
+
+  echo "PASS: ${LANG} is correctly enabled"
+
+done
+
+exit $fail

-----------------------------------------------------------------------

Summary of changes:
 GNUmakefile.in              |  6 ++++-
 utils/check_lang_enabled.sh | 60 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 65 insertions(+), 1 deletion(-)
 create mode 100755 utils/check_lang_enabled.sh


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list