diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-04-11 16:02:52 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-04-11 16:02:52 +0100 |
| commit | bf0cef8e6a616cb08af62ef3049c1aaf44a4e1f7 (patch) | |
| tree | 5605e119942605b0ffeb8e284af32f1db7acb47f /hacks | |
| parent | 2efc9ef53d6b64f80d626dd80ea91970eec367da (diff) | |
Add a couple of bits.
Diffstat (limited to 'hacks')
| -rw-r--r-- | hacks/i18nup | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/hacks/i18nup b/hacks/i18nup new file mode 100644 index 000000000..37ec57d14 --- /dev/null +++ b/hacks/i18nup @@ -0,0 +1,46 @@ +#!/bin/bash +changes=`git status -s | grep "^ M"` +check=`echo "$changes" | grep -v /po/` +if [ "$check" != "" ]; then + echo "Non i18n updates would be committed" + exit 1 +fi + +if [[ `echo $changes | grep de_DE` != "" ]]; then + language="de_DE" + translator="Carsten Kurz" +elif [[ `echo $changes | grep nl_NL` != "" ]]; then + language="nl_NL" + translator="Rob van Nieuwkerk" +else + echo "Unknown language" + exit 1 +fi + +date=`date +%Y-%m-%d` + +tag="$date Carl Hetherington <cth@carlh.net>" +msg="Updated $language translation from $translator." + +echo "$tag" > /tmp/$$.changelog +echo "" >> /tmp/$$.changelog +echo -e "\t* $msg" >> /tmp/$$.changelog +echo "" >> /tmp/$$.changelog + +if [[ `head -n 1 ChangeLog` == "$tag" ]]; then + echo "Trimming!" + tail -n +3 ChangeLog > /tmp/$$.trimmed + mv /tmp/$$.trimmed ChangeLog +fi + +cat /tmp/$$.changelog | cat - ChangeLog > /tmp/$$.joined +rm /tmp/$$.changelog +mv /tmp/$$.joined ChangeLog + +git diff + +echo "OK?" +read yes +if [ "$yes" == "y" ]; then + git commit -a -m "$msg" +fi |
