Commit 515a8db5 authored by Salamandar's avatar Salamandar Committed by Bastien Nocera

build: Add script to check translations in po/LINGUAS

Replaces the shell in Makefile.am
parent a1e4ea79
......@@ -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
......
#!/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}"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment