Files
freeipa/po/Makefile.hack.in
T
Petr Spacek d40c376ccc Build: support strip-po target for translations
The target was added to top-level Makefile.am as well so the maintainer
does not need to jump between directories when doing Zanata pull/push
and strip-po.

https://fedorahosted.org/freeipa/ticket/6418

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
2016-11-22 16:14:50 +01:00

21 lines
667 B
Makefile

# Auxiliary target for translation maintainer:
# Strip untranslated strings and comments with code lines from the po files
# to make them smaller before storage in SCM.
DISTFILES.common.extra3 = Makefile.hack.in
MSGATTRIB = @MSGATTRIB@
.PHONY: strip-po
strip-po:
for po_file in $(POFILES); do \
$(MSGATTRIB) --translated --no-fuzzy --no-location $$po_file > $$po_file.tmp || exit 1; \
mv $$po_file.tmp $$po_file || exit 1; \
done
export FILES_TO_REMOVE=`find $(srcdir) -name '*.po' -empty` || exit 1; \
if [ "$$FILES_TO_REMOVE" != "" ]; then \
rm -v $$FILES_TO_REMOVE || exit 1; \
echo; echo Please remove the deleted files from LINGUAS!; echo; \
fi