pull-trans: fix "Added translation" commits

The weblate commits now take two forms:

	Translated using Weblate ($LANG)
	Added translation using Weblate ($LANG)

Adapt the regex to reflect both, avoiding the latter form from screwing
everything up.
This commit is contained in:
Daniel Martí 2016-06-08 23:25:54 +01:00
parent 99a488dc18
commit 5052266450

View File

@ -26,7 +26,7 @@ ref="${REMOTE}/${REMOTE_BRANCH}"
diff="HEAD...$ref -- */values-*/strings.xml" diff="HEAD...$ref -- */values-*/strings.xml"
authors=$(git log --format="%s %an" $diff | \ authors=$(git log --format="%s %an" $diff | \
sed 's/Translated using Weblate (\(.*\)) \(.*\)/\2||\1/' | sort -f -u | column -s '||' -t) sed 's/.* using Weblate (\(.*\)) \(.*\)/\2||\1/' | sort -f -u | column -s '||' -t)
git diff $diff | git apply git diff $diff | git apply