7 echo "Sorry, you are not supposed to use this script."
8 echo "This script is solely for use by the Xonotic Core Team."
9 echo "Unauthorized use of it can cause HIGHLY annoying merge"
15 for VM in menu csprogs; do
25 find qcsrc/"$VMD" -type f -not -name \*.po -not -name \*.txt
26 find qcsrc/common -type f -not -name \*.po -not -name \*.txt
27 find qcsrc/server -type f -name w_\*.qc
28 } | xgettext -LC -k_ -f- --from-code utf-8 -o "$VM".dat.pot >&2
29 for X in "$VM".dat.*.po; do
30 [ -f "$X" ] || continue
31 for Y in ~/check-translations/"$X".*; do
32 [ -f "$Y" ] || continue
33 msgcat -F --use-first "$Y" "$X" > "$X".new
36 msgmerge -F -U "$X" "$VM".dat.pot >&2
37 msgattrib --untranslated "$X" | grep . > "$X".untranslated || rm -f "$X".untranslated
38 msgattrib --fuzzy "$X" | grep . > "$X".fuzzy || rm -f "$X".fuzzy
39 nu=$((`grep -c ^#: "$X".untranslated` + 0))
40 nf=$((`grep -c ^#: "$X".fuzzy` + 0))
43 echo "TODO for translation $X:"
44 echo "Untranslated: $nu"
46 ltr=`grep '^"Last-Translator: ' "$X" | cut -d ' ' -f 2- | cut -d '\\' -f 1 | egrep -v '<LL@li.org>|<EMAIL@ADDRESS>'`
47 ltm=`grep '^"Language-Team: ' "$X" | cut -d ' ' -f 2- | cut -d '\\' -f 1 | egrep -v '<LL@li.org>|<EMAIL@ADDRESS>'`
48 echo "Translators: $ltr, $ltm"
56 if [ x"$ltr" = x"$ltm" ]; then
71 echo "Send mail? [y/n]"
76 if [ $nu -gt 0 ]; then
77 attach="$attach $X.untranslated"
79 if [ $nf -gt 0 ]; then
80 attach="$attach $X.fuzzy"
86 as you provided us with translations in the past, we kindly ask you
87 to update the translation to match changes in the Xonotic source. Can
88 you please work on them and provide updates to us?
90 If you do not wish to be contacted for translation updates any more,
91 please tell us in a reply to this message.
94 if [ $nu -gt 0 ]; then
96 Attached to this message is a file
98 with $nu yet to be translated messages. Please translate them and reply
99 with the file containing the translations in the "msgstr" fields.
103 if [ $nf -gt 0 ]; then
105 Attached to this message is a file
107 with $nf automatically generated translations. Please verify and/or fix
108 them and reply with the file having been verified by you.
118 -e "set from=\"divVerent@xonotic.org\"" \
119 -e "set use_from=yes" \
120 -e "set use_envelope_from=yes" \
121 -s "Need update for translations: $X" \
123 -b "divVerent@xonotic.org" \
136 for X in "$VM".dat.*.po.disabled; do
137 [ -f "$X" ] || continue
138 msgmerge -F -U "$X" "$VM".dat.pot >/dev/null 2>&1