Commit 29eead15 authored by Tobias Quathamer's avatar Tobias Quathamer

Enable a check for wrong encodings of .po files

parent fd9a787c
......@@ -13,7 +13,7 @@ DISTCLEANFILES = $(pkgconfig_DATA)
.PHONY: release
release: distcheck
release: check distcheck
rm -f iso-codes-$(VERSION).tar.gz.sig
rm -f iso-codes-$(VERSION).tar.bz2.sig
gpg --detach-sign iso-codes-$(VERSION).tar.gz
......
......@@ -31,4 +31,6 @@ MOSTLYCLEANFILES = \
$(mofiles) \
$(tab_DATA)
check-local: check-content
include $(top_srcdir)/rules.make
......@@ -21,4 +21,6 @@ EXTRA_DIST = \
MOSTLYCLEANFILES = \
$(mofiles)
check-local: check-content
include $(top_srcdir)/rules.make
......@@ -20,4 +20,6 @@ EXTRA_DIST = \
MOSTLYCLEANFILES = \
$(mofiles)
check-local: check-content
include $(top_srcdir)/rules.make
......@@ -32,4 +32,6 @@ MOSTLYCLEANFILES = \
$(mofiles) \
$(tab_DATA)
check-local: check-content
include $(top_srcdir)/rules.make
......@@ -21,4 +21,6 @@ EXTRA_DIST = \
MOSTLYCLEANFILES = \
$(mofiles)
check-local: check-content
include $(top_srcdir)/rules.make
......@@ -2,6 +2,18 @@
%.mo: %.po
$(MSGFMT) --verbose --check $< -o $@
.PHONY: check-content
check-content:
@grep "Content-Type" *po | grep -v "UTF-8" && touch found-non-utf.stamp || true
@if [ -e found-non-utf.stamp ]; then \
echo "*********"; \
echo "* Error *"; \
echo "*********"; \
echo "At least one file is not encoded in UTF-8. Please check."; \
rm -f found-non-utf.stamp; \
false; \
fi
localedir = $(datadir)/locale
install-data-hook: $(mofiles)
......
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