14 echo "Sorry, you are not supposed to use this script."
15 echo "This script is solely for use by the Xonotic Core Team."
16 echo "Unauthorized use of it can cause HIGHLY annoying merge"
27 for VM in menu csprogs; do
37 if [ x"$mode" = x"pot" ]; then
39 find qcsrc/"$VMD" -type f -not -name \*.po -not -name \*.txt
40 find qcsrc/common -type f -not -name \*.po -not -name \*.txt
41 find qcsrc/server -type f -name w_\*.qc
42 } | xgettext -LC -k_ -f- --from-code utf-8 -o "$VM".dat.pot >&2
45 if [ x"$mode" = x"po" ]; then
46 for X in "$VM".dat.*.po; do
47 [ -f "$X" ] || continue
48 if [ -n "$language" ]; then
49 if [ x"${X#*.dat.}" != x"$language.po" ]; then
53 for Y in ~/check-translations/"$X".*; do
54 [ -f "$Y" ] || continue
55 msgcat -F --use-first "$Y" "$X" > "$X".new
58 msgmerge -F -U "$X" "$VM".dat.pot >&2
59 msgattrib --untranslated "$X" | grep . > "$X".untranslated || rm -f "$X".untranslated
60 msgattrib --fuzzy "$X" | grep . > "$X".fuzzy || rm -f "$X".fuzzy
61 nu=$((`grep -c ^#: "$X".untranslated` + 0))
62 nf=$((`grep -c ^#: "$X".fuzzy` + 0))
65 echo "TODO for translation $X:"
66 echo "Untranslated: $nu"
68 ltr=`grep '^"Last-Translator: ' "$X" | cut -d ' ' -f 2- | cut -d '\\' -f 1 | egrep -v '<LL@li.org>|<EMAIL@ADDRESS>'`
69 ltm=`grep '^"Language-Team: ' "$X" | cut -d ' ' -f 2- | cut -d '\\' -f 1 | egrep -v '<LL@li.org>|<EMAIL@ADDRESS>'`
70 echo "Translators: $ltr, $ltm"
78 if [ x"$ltr" = x"$ltm" ]; then
93 echo "Send mail? [y/n]"
98 if [ $nu -gt 0 ]; then
99 attach="$attach $X.untranslated"
101 if [ $nf -gt 0 ]; then
102 attach="$attach $X.fuzzy"
108 as you provided us with translations in the past, we kindly ask you
109 to update the translation to match changes in the Xonotic source. Can
110 you please work on them and provide updates to us?
112 If you do not wish to be contacted for translation updates any more,
113 please tell us in a reply to this message.
116 if [ $nu -gt 0 ]; then
118 Attached to this message is a file
120 with $nu yet to be translated messages. Please translate them and reply
121 with the file containing the translations in the "msgstr" fields.
125 if [ $nf -gt 0 ]; then
127 Attached to this message is a file
129 with $nf automatically generated translations. Please verify and/or fix
130 them and reply with the file having been verified by you.
140 -e "set from=\"divVerent@xonotic.org\"" \
141 -e "set use_from=yes" \
142 -e "set use_envelope_from=yes" \
143 -s "Need update for translations: $X" \
145 -b "divVerent@xonotic.org" \
159 for X in "$VM".dat.*.po.disabled; do
160 [ -f "$X" ] || continue
161 if [ -n "$language" ]; then
162 if [ x"${X#*.dat.}" != x"$language.po" ]; then
166 msgmerge -F -U "$X" "$VM".dat.pot >/dev/null 2>&1