diff options
author | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2017-01-20 12:24:46 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2017-01-20 12:32:46 +0530 |
commit | 56009aa33c735d66f19d8382b6ef7c6addc24ec0 (patch) | |
tree | 36a583805c3a6258e5d9a4bb79afff65f0915ce9 /po/Makefile | |
parent | Restore clock_* librt exports for MicroBlaze (bug 21061). (diff) | |
download | glibc-56009aa33c735d66f19d8382b6ef7c6addc24ec0.tar.gz glibc-56009aa33c735d66f19d8382b6ef7c6addc24ec0.tar.bz2 glibc-56009aa33c735d66f19d8382b6ef7c6addc24ec0.zip |
Add target to incorporate translations from translations.org
Add a convenience target for maintainers to download and incorporate
translation updates from translations.org. Invoke as follows:
make -r PARALLELMFLAGS="" -C ../po objdir=`pwd` update-translations
similar to generating libc.pot.
* po/Makefile (update-translations): New target.
Diffstat (limited to 'po/Makefile')
-rw-r--r-- | po/Makefile | 11 |
1 files changed, 11 insertions, 0 deletions
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 |