diff --git a/ChangeLog b/ChangeLog index 896231a0f1..d7c2d2e55b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2017-01-20 Siddhesh Poyarekar + + * po/Makefile (update-translations): New target. + 2017-01-19 Joseph Myers [BZ #21061] diff --git a/po/Makefile b/po/Makefile index 302c3b6db6..122db23591 100644 --- a/po/Makefile +++ b/po/Makefile @@ -109,3 +109,14 @@ linguas: $(pofiles:$(podir)/%=%) linguas.mo: $(pofiles:$(podir)/%.po=%.mo) endif + +# Update translations from the translation project. +TRANSLATIONS_URL = https://translationproject.org/latest/libc +WGET = wget + +update-translations: + $(WGET) -qO- $(TRANSLATIONS_URL) | sed -n 's|.*href="\([^"]\+po\)".*|\1|p' | \ + while read f; do \ + $(WGET) -O $(objdir)/$$f-tmp $(TRANSLATIONS_URL)/$$f && \ + mv -f $(objdir)/$$f-tmp $$f; \ + done