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 if [ x"$VM" = x"csprogs" ]; then
42 find qcsrc/server -type f -name w_\*.qc
43 elif [ x"$VM" = x"menu" ]; then
44 find qcsrc/server -type f -name w_\*.qc | xargs grep ^REGISTER_WEAPON > weapons.qc.tmp
47 } | xgettext -LC -k_ -f- --from-code utf-8 -o "$VM".dat.pot >&2
50 if [ x"$mode" = x"po" ]; then
51 for X in "$VM".dat.*.po; do
52 [ -f "$X" ] || continue
53 if [ -n "$language" ]; then
54 if [ x"${X#*.dat.}" != x"$language.po" ]; then
58 for Y in ~/check-translations/"$X".*; do
59 [ -f "$Y" ] || continue
61 set fileencoding=utf-8
66 msgcat -F --use-first "$Y" "$X" > "$X".new
69 msgmerge -F -U "$X" "$VM".dat.pot >&2
70 msgattrib --untranslated "$X" | grep . > "$X".untranslated || rm -f "$X".untranslated
71 msgattrib --fuzzy "$X" | grep . > "$X".fuzzy || rm -f "$X".fuzzy
72 nu=$((`grep -c ^#: "$X".untranslated` + 0))
73 nf=$((`grep -c ^#: "$X".fuzzy` + 0))
76 echo "TODO for translation $X:"
77 echo "Untranslated: $nu"
79 ltr=`grep '^"Last-Translator: ' "$X" | cut -d ' ' -f 2- | cut -d '\\' -f 1 | egrep -v '<LL@li.org>|<EMAIL@ADDRESS>'`
80 ltm=`grep '^"Language-Team: ' "$X" | cut -d ' ' -f 2- | cut -d '\\' -f 1 | egrep -v '<LL@li.org>|<EMAIL@ADDRESS>'`
81 echo "Translators: $ltr, $ltm"
89 if [ x"$ltr" = x"$ltm" ]; then
102 if [ -n "$to" ]; then
104 echo "Send mail? [y/n]"
109 if [ $nu -gt 0 ]; then
110 attach="$attach $X.untranslated"
112 if [ $nf -gt 0 ]; then
113 attach="$attach $X.fuzzy"
119 as you provided us with translations in the past, we kindly ask you
120 to update the translation to match changes in the Xonotic source. Can
121 you please work on them and provide updates to us?
123 If you do not wish to be contacted for translation updates any more,
124 please tell us in a reply to this message.
127 if [ $nu -gt 0 ]; then
129 Attached to this message is a file
131 with $nu yet to be translated messages. Please translate them and reply
132 with the file containing the translations in the "msgstr" fields.
136 if [ $nf -gt 0 ]; then
138 Attached to this message is a file
140 with $nf automatically generated translations. Please verify and/or fix
141 them and reply with the file having been verified by you.
151 -e "set from=\"divVerent@xonotic.org\"" \
152 -e "set use_from=yes" \
153 -e "set use_envelope_from=yes" \
154 -s "Need update for translations: $X" \
156 -b "admin@xonotic.org" \
170 for X in "$VM".dat.*.po.disabled; do
171 [ -f "$X" ] || continue
172 if [ -n "$language" ]; then
173 if [ x"${X#*.dat.}" != x"$language.po" ]; then
177 msgmerge -F -U "$X" "$VM".dat.pot >/dev/null 2>&1