diff options
-rw-r--r-- | Makefile.am | 11 | ||||
-rwxr-xr-x | po/check_translations.sh | 16 |
2 files changed, 19 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am index 0360e89e..1ff15338 100644 --- a/Makefile.am +++ b/Makefile.am @@ -36,7 +36,8 @@ EXTRA_DIST = \ $(man_MANS) \ $(ITS_FILES) \ shared-mime-info.pc.in \ - data/freedesktop_generate.sh + data/freedesktop_generate.sh \ + po/check_translations.sh CLEANFILES = freedesktop.org.xml po/stamp-it @@ -137,13 +138,7 @@ else endif check-translations: - @export RET=0 ; for i in $(top_srcdir)/po/*.po ; do \ - if ! grep -q ^`basename $$i | sed 's,.po,,'`$$ $(top_srcdir)/po/LINGUAS ; then \ - echo '***' `basename $$i | sed 's,.po,,'` missing from po/LINGUAS '***' ; \ - RET=1; \ - fi; \ - done; \ - if [ $$RET == 1 ] ; then exit 1; fi + $(top_srcdir)/po/check_translations.sh update-translations: po/shared-mime-info.pot @tx pull --all --force --skip diff --git a/po/check_translations.sh b/po/check_translations.sh new file mode 100755 index 00000000..76562cb2 --- /dev/null +++ b/po/check_translations.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Go to po directory +cd "$(dirname "${0}")" || exit 1 + +RET=0 + +for i in *.po; do + lang="$(basename "${i}" | sed 's,.po,,')" + if ! grep -q ^"${lang}" "LINGUAS"; then + echo "*** Language ${lang} is missing from LINGUAS ***" + RET=1 + fi +done + +exit "${RET}" |