2 changes=`git status -s | grep "^ M"`
3 check=`echo "$changes" | grep -v /po/`
4 if [ "$check" != "" ]; then
5 echo "Non i18n updates would be committed"
9 if [[ `echo $changes | grep de_DE` != "" ]]; then
11 translator="Carsten Kurz"
12 elif [[ `echo $changes | grep nl_NL` != "" ]]; then
14 translator="Rob van Nieuwkerk"
15 elif [[ `echo $changes | grep es_ES` != "" ]]; then
17 translator="Manuel AC"
18 elif [[ `echo $changes | grep sv_SE` != "" ]]; then
20 translator="Adam Klotblixt"
21 elif [[ `echo $changes | grep fr_FR` != "" ]]; then
23 translator="Thierry Journet"
24 elif [[ `echo $changes | grep ru_RU` != "" ]]; then
26 translator="Igor Voytovich"
27 elif [[ `echo $changes | grep uk_UA` != "" ]]; then
29 translator="Igor Voytovich"
31 echo "Unknown language"
37 tag="$date Carl Hetherington <cth@carlh.net>"
38 msg="Updated $language translation from $translator."
40 echo "$tag" > /tmp/$$.changelog
41 echo "" >> /tmp/$$.changelog
42 echo -e "\t* $msg" >> /tmp/$$.changelog
43 echo "" >> /tmp/$$.changelog
45 if [[ `head -n 1 ChangeLog` == "$tag" ]]; then
47 tail -n +3 ChangeLog > /tmp/$$.trimmed
48 mv /tmp/$$.trimmed ChangeLog
51 cat /tmp/$$.changelog | cat - ChangeLog > /tmp/$$.joined
53 mv /tmp/$$.joined ChangeLog
59 if [ "$yes" == "y" ]; then
60 git commit -a -m "$msg"