4 # .tx/merge-base - changed whenever translations get merged
6 mergebase=`git log --pretty=oneline -1 .tx/merge-base | cut -d ' ' -f 1`
10 # First upload our current .pot.
11 mkdir -p translations/xonotic.commonpot/
12 cp common.pot translations/xonotic.commonpot/en..po
18 for f in common.*.po; do
21 tcurfile=translations/xonotic.commonpot/$lang..po
22 goldfile=translations/xonotic.commonpot/$lang..po.orig
23 gnewfile=common.$lang.po
24 if [ -f "$tcurfile" ]; then
25 git show "$mergebase":"$gnewfile" > "$goldfile"
26 msgmerge -F -U "$tcurfile" common.pot
27 msgmerge -F -U "$goldfile" common.pot
28 msgmerge -F -U "$gnewfile" common.pot
29 if diff -u "$goldfile" "$gnewfile" >/dev/null; then
30 # no change on git, changed on tx only
31 msgmerge -F -U "$tcurfile" common.pot
32 cp "$tcurfile" "$gnewfile"
34 if ! diff -u "$goldfile" "$gnewfile" | patch "$tcurfile"; then
36 vim -o "$tcurfile.rej" "$tcurfile"
39 [ x"$OK" != x"y" ] || break
43 msgmerge -F -U "$tcurfile" common.pot
44 cp "$tcurfile" "$gnewfile"
48 msgmerge -F -U "$gnewfile" common.pot
49 cp "$gnewfile" "$tcurfile"
52 for f in translations/xonotic.commonpot/*..po; do
54 lang=${lang#translations/xonotic.commonpot/}
55 [ x"$lang" != x"en" ] || continue
56 tcurfile=translations/xonotic.commonpot/$lang..po
57 gnewfile=common.$lang.po
58 if ! [ -f "$gnewfile" ]; then
61 cp "$tcurfile" "$gnewfile"