From e60960e560a45f4f732dd1066af5ba71c04e60ea Mon Sep 17 00:00:00 2001 From: Daniel Albers Date: Mon, 23 Jan 2012 00:12:38 +0100 Subject: [PATCH] new file: po/pull-from-transifex.sh Updates translations via `tx` and commits --- po/pull-from-transifex.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 po/pull-from-transifex.sh diff --git a/po/pull-from-transifex.sh b/po/pull-from-transifex.sh new file mode 100755 index 00000000..cbefc820 --- /dev/null +++ b/po/pull-from-transifex.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +tx pull && +git add po/*.po && ( + translators=$(while read mode pofile; do + translator=$(perl -ne 's/^"Last-Translator: (.*?)(?:\\n)?"$/\1/ && print $1;' ${pofile}) + lang=${pofile%.po} + lang=${lang#po/} + echo " - ${lang}: ${translator}" + done < <(git status --porcelain po/*.po | egrep '^[AM] ')) + + git commit -m "Update translations from Transifex + +Many thanks to: +${translators}" po/*.po +) -- 2.20.1