-for f in common.*.po; do
- lang=${f%.po}
- lang=${lang#common.}
- tcurfile=translations/xonotic.commonpot/$lang..po
- goldfile=translations/xonotic.commonpot/$lang..po.orig
- gnewfile=common.$lang.po
- if [ -f "$tcurfile" ]; then
- git show "$mergebase":"$gnewfile" > "$goldfile"
- msgmerge -F -U "$tcurfile" common.pot
- msgmerge -F -U "$goldfile" common.pot
- msgmerge -F -U "$gnewfile" common.pot
- if diff -u "$goldfile" "$gnewfile" >/dev/null; then
- # no change on git, changed on tx only
- msgmerge -F -U "$tcurfile" common.pot
- cp "$tcurfile" "$gnewfile"
- else
- if ! diff -u "$goldfile" "$gnewfile" | patch "$tcurfile"; then
- while :; do
- vim -o "$tcurfile.rej" "$tcurfile"
- echo "OK?"
- read -r OK || exit 1
- [ x"$OK" != x"y" ] || break
- done
- rm -f "$tcurfile.rej"
+if $sync_po; then
+ # Then pull the rest.
+ tx pull -f -a
+
+ for f in common.*.po; do
+ lang=${f%.po}
+ lang=${lang#common.}
+ case "$lang" in
+ de_CH)
+ continue
+ ;;
+ esac
+ tcurfile=translations/xonotic.commonpot/$lang..po
+ goldfile=translations/xonotic.commonpot/$lang..po.orig
+ gnewfile=common.$lang.po
+ if [ -f "$tcurfile" ]; then
+ git show "$mergebase":"$gnewfile" > "$goldfile"
+ msgmerge -N -F -U "$tcurfile" common.pot
+ msgmerge -N -F -U "$goldfile" common.pot
+ msgmerge -N -F -U "$gnewfile" common.pot
+ if diff -u "$goldfile" "$gnewfile" >/dev/null; then
+ # no change on git, changed on tx only
+ msgmerge -N -F -U "$tcurfile" common.pot
+ cp "$tcurfile" "$gnewfile"
+ else
+ if ! diff -u "$goldfile" "$gnewfile" | patch "$tcurfile"; then
+ if [ -z "$BATCH" ]; then
+ while :; do
+ vim -o "$tcurfile.rej" "$tcurfile"
+ echo "OK?"
+ read -r OK || exit 1
+ [ x"$OK" != x"y" ] || break
+ done
+ rm -f "$tcurfile.rej"
+ fi
+ fi
+ msgmerge -N -F -U "$tcurfile" common.pot
+ cp "$tcurfile" "$gnewfile"