]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - po/Makefile
Add target to incorporate translations from translations.org
[thirdparty/glibc.git] / po / Makefile
index 302c3b6db6c85972779f27d96ea8b36c6759b356..122db235912051cc8566c32383c4f8684a454dfa 100644 (file)
@@ -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