From 8a7962585069d7b0ff7e8d87ce094f07c16b3cd4 Mon Sep 17 00:00:00 2001 From: Petr Spacek Date: Tue, 15 Nov 2016 16:43:58 +0100 Subject: Build: integrate translation system tests again The Makefile test targets were lost when gettextize infrastructure was introduced. Now it is re-added in its modernized form which counts with generated .pot files. ipatests/i18n.py is now explicitly setting character encoding in files it generates. According to gettext manual chapter "Filling in the Header Entry" the Content-Type header is language-specific so it does not make sense to fill it in in .pot file. https://fedorahosted.org/freeipa/ticket/6418 Reviewed-By: Martin Basti Reviewed-By: Christian Heimes Reviewed-By: Lukas Slebodnik --- po/Makefile.hack.in | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'po') diff --git a/po/Makefile.hack.in b/po/Makefile.hack.in index 362d3a45a..2f2522be4 100644 --- a/po/Makefile.hack.in +++ b/po/Makefile.hack.in @@ -4,6 +4,7 @@ DISTFILES.common.extra3 = Makefile.hack.in +IPA_TEST_I18N = @top_srcdir@/ipatests/i18n.py MSGATTRIB = @MSGATTRIB@ .PHONY: strip-po @@ -20,3 +21,17 @@ strip-po: clean: mostlyclean rm -f *~ + +# linters +test-gettext: $(DOMAIN).pot + $(IPA_TEST_I18N) --test-gettext + +validate-pot: + $(IPA_TEST_I18N) --show-strings --validate-pot $(DOMAIN).pot + +validate-po: + $(IPA_TEST_I18N) --show-strings --validate-po $(POFILES) + +# forcefully re-generate .pot file and test it +validate-src-strings: $(DOMAIN).pot-update + $(MAKE) validate-pot -- cgit