Supporters update.
[dcpomatic.git] / hacks / i18nup
1 #!/bin/bash
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"
6   exit 1
7 fi
8
9 if [[ `echo $changes | grep de_DE` != "" ]]; then
10   language="de_DE"
11   translator="Carsten Kurz"
12 elif [[ `echo $changes | grep nl_NL` != "" ]]; then
13   language="nl_NL"
14   translator="Rob van Nieuwkerk"
15 elif [[ `echo $changes | grep es_ES` != "" ]]; then
16   language="es_ES"
17   translator="Manuel AC"
18 elif [[ `echo $changes | grep sv_SE` != "" ]]; then
19   language="sv_SE"
20   translator="Adam Klotblixt"
21 elif [[ `echo $changes | grep fr_FR` != "" ]]; then
22   language="fr_FR"
23   translator="Thierry Journet"
24 elif [[ `echo $changes | grep ru_RU` != "" ]]; then
25   language="ru_RU"
26   translator="Igor Voytovich"
27 elif [[ `echo $changes | grep uk_UA` != "" ]]; then
28   language="uk_UA"
29   translator="Igor Voytovich"
30 elif [[ `echo $changes | grep cs_CZ` != "" ]]; then
31   language="cs_CZ"
32   translator="Tomáš Begeni"
33 elif [[ `echo $changes | grep pt_BR` != "" ]]; then
34   language="pt_BR"
35   translator="Max M. Fuhlendorf"
36 elif [[ `echo $changes | grep zh_CN` != "" ]]; then
37   language="zh_CN"
38   translator="Rov (若文)"
39 elif [[ `echo $changes | grep da_DK` != "" ]]; then
40   language="da_DK"
41   translator="Anders Uhl Pedersen"
42 elif [[ `echo $changes | grep pl_PL` != "" ]]; then
43   language="pl_PL"
44   translator="Mike Mazur"
45 elif [[ `echo $changes | grep it_IT` != "" ]]; then
46   language="it_IT"
47   translator="Riccardo Mantani"
48 elif [[ `echo $changes | grep sl_SI` != "" ]]; then
49   language="sl_SI"
50   translator="Martin Srebotnjak"
51 elif [[ `echo $changes | grep hu_HU` != "" ]]; then
52   language="hu_HU"
53   translator="Áron Németh"
54 elif [[ `echo $changes | grep fa_IR` != "" ]]; then
55   language="fa_IR"
56   translator="Soleyman Rahmani"
57 else
58   echo "Unknown language"
59   exit 1
60 fi
61
62 msg="Updated $language translation from $translator."
63
64 git diff
65
66 echo "OK?"
67 read yes
68 if [ "$yes" == "y" ]; then
69     git commit -a -m "$msg"
70 fi