[SSSD] [PATCH] Warn on 'make update-po' if there are manpages not listed in po4a.cfg
Jakub Hrozek
jhrozek at redhat.com
Mon Apr 16 16:44:10 UTC 2012
https://fedorahosted.org/sssd/ticket/1219
-------------- next part --------------
>From 8ee23bfcc3106f92e0ccf5fa481cfb1a4bd88914 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Mon, 16 Apr 2012 16:34:53 +0200
Subject: [PATCH] Warn on 'make update-po' if there are manpages not listed in
po4a.cfg
https://fedorahosted.org/sssd/ticket/1219
---
src/man/Makefile.am | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/man/Makefile.am b/src/man/Makefile.am
index 8a6534cf177ecf3198a7970cc0ee76ec54965922..c15844e82378bf5b9abd835cdde25a3a70cf1a37 100644
--- a/src/man/Makefile.am
+++ b/src/man/Makefile.am
@@ -96,6 +96,9 @@ EXTRA_DIST += \
XML_DOC = $(wildcard $(srcdir)/*.xml) $(wildcard $(srcdir)/include/*.xml)
if HAVE_PO4A
+CFG_PAGES = $(addprefix $(srcdir)/, $(shell grep '\[type:docbook\]' $(PO4A_CONFIG) | awk '{print $$2}' | tr '\n' ' '))
+NONTRANSLATED_PAGES = $(filter-out $(CFG_PAGES), $(XML_DOC))
+
# FIXME: Use a stamp file until po4a supports them internally.
man.stamp: $(XML_DOC) $(POTFILE) $(PO4A_CONFIG)
@@ -104,6 +107,10 @@ man.stamp: $(XML_DOC) $(POTFILE) $(PO4A_CONFIG)
touch $@
update-po:
+ @if test x"$(NONTRANSLATED_PAGES)" != "x"; then \
+ echo "The following pages are not translated" $(NONTRANSLATED_PAGES); \
+ exit 1; \
+ fi
cd $(srcdir) && \
$(PO4A) $(PO4A_BUILD_OPTS) --force $(PO4A_CONFIG)
--
1.7.7.6
More information about the sssd-devel
mailing list