From: Simon Josefsson <simon@josefsson.org>
Date: Fri, 3 Mar 2006 14:57:13 +0000 (+0000)
Subject: * build-aux/maint.mk: Add refresh-po rule, based on ideas from
X-Git-Tag: cvs-readonly~2509
X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=b7211998647aa3613a0267c5cefcdeb135c4a5e6;p=gnulib.git

* build-aux/maint.mk: Add refresh-po rule, based on ideas from
libidn and bison.
---

diff --git a/ChangeLog b/ChangeLog
index 04fa38cb83..427d9767d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-03-03  Simon Josefsson  <jas@extundo.com>
+
+	* build-aux/maint.mk: Add refresh-po rule, based on ideas from
+	libidn and bison.
+
 2006-03-03  Simon Josefsson  <jas@extundo.com>
 
 	* build-aux/maint.mk: Add several syntax checks from CoreUtils.
diff --git a/build-aux/maint.mk b/build-aux/maint.mk
index 266b4cb839..4180930b42 100644
--- a/build-aux/maint.mk
+++ b/build-aux/maint.mk
@@ -107,6 +107,18 @@ syntax-check-rules := $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' $(ME))
 
 syntax-check: $(syntax-check-rules)
 
+# Update gettext files.
+PACKAGE ?= $(shell basename $(PWD))
+POURL = http://www.iro.umontreal.ca/translation/maint/$(PACKAGE)/
+PODIR ?= po
+refresh-po:
+	rm $(PODIR)/*.po && \
+	echo "$(ME): getting translations into po (please ignore the robots.txt ERROR 404)..." && \
+	wget --no-verbose --directory-prefix $(PODIR) --no-directories --recursive --level 1 --accept .po --accept .po.1 $(POURL) && \
+	echo 'en@boldquot' > $(PODIR)/LINGUAS && \
+	echo 'en@quot' >> $(PODIR)/LINGUAS && \
+	ls $(PODIR)/*.po | sed 's/.po//' | sed 's,$(PODIR)/,,' | sort >> $(PODIR)/LINGUAS
+
 INDENT_SOURCES ?= $(C_SOURCES)
 .PHONY: indent
 indent: