From patchwork Thu Jan 12 14:12:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 18883 Received: (qmail 30016 invoked by alias); 12 Jan 2017 14:12:57 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 30002 invoked by uid 89); 12 Jan 2017 14:12:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, SPF_NEUTRAL autolearn=no version=3.3.2 spammy=UD:libc.pot, libcpot, libc.pot, Hx-languages-length:1000 X-HELO: homiemail-a46.g.dreamhost.com From: Siddhesh Poyarekar To: libc-alpha@sourceware.org Subject: [PATCH v2] Add target to incorporate translations from translations.org Date: Thu, 12 Jan 2017 19:42:34 +0530 Message-Id: <1484230354-16293-1-git-send-email-siddhesh@sourceware.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. --- po/Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/po/Makefile b/po/Makefile index 302c3b6..122db23 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