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 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 2>/dev/null` + 0))
62 nf=$((`grep -c ^#: "$X".fuzzy 2>/dev/null` + 0))
65 for Y in ~/check-translations/"$X".*; do
66 [ -f "$Y" ] || continue
67 if ! msgcat "$Y" >/dev/null; then
68 echo "File $Y has syntax errors. Skipped."
73 set fileencoding=utf-8
78 msgcat -F --use-first "$Y" "$X" > "$X".new
85 msgmerge -F -U "$X" "$VM".dat.pot >&2
86 msgattrib --untranslated "$X" | grep . > "$X".untranslated || rm -f "$X".untranslated
87 msgattrib --fuzzy "$X" | grep . > "$X".fuzzy || rm -f "$X".fuzzy
88 nu=$((`grep -c ^#: "$X".untranslated 2>/dev/null` + 0))
89 nf=$((`grep -c ^#: "$X".fuzzy 2>/dev/null` + 0))
93 echo "TODO for translation $X:"
94 echo "Untranslated: $nu (was: $nu0)"
95 echo "Fuzzy: $nf (was: $nf0)"
96 ltr=`grep '^"Last-Translator: ' "$X" | cut -d ' ' -f 2- | cut -d '\\' -f 1 | egrep -v '<LL@li.org>|<EMAIL@ADDRESS>'`
97 ltm=`grep '^"Language-Team: ' "$X" | cut -d ' ' -f 2- | cut -d '\\' -f 1 | egrep -v '<LL@li.org>|<EMAIL@ADDRESS>'`
98 echo "Translators: $ltr, $ltm"
106 if [ x"$ltr" = x"$ltm" ]; then
113 if [ -n "$to" ]; then
116 if [ -n "$cc" ]; then
119 if [ -n "$to" ]; then
121 echo "Send mail? [y/n]"
126 if [ $nu -gt 0 ]; then
127 attach="$attach $X.untranslated"
129 if [ $nf -gt 0 ]; then
130 attach="$attach $X.fuzzy"
136 as you provided us with translations in the past, we kindly ask you
137 to update the translation to match changes in the Xonotic source. Can
138 you please work on them and provide updates to us?
140 If you do not wish to be contacted for translation updates any more,
141 please tell us in a reply to this message.
144 if [ $nu -gt 0 ]; then
146 Attached to this message is a file
148 with $nu yet to be translated messages. Please translate them and reply
149 with the file containing the translations in the "msgstr" fields.
153 if [ $nf -gt 0 ]; then
155 Attached to this message is a file
157 with $nf automatically generated translations. Please verify and/or fix
158 them and reply with the file having been verified by you.
168 -e "set from=\"divVerent@xonotic.org\"" \
169 -e "set use_from=yes" \
170 -e "set use_envelope_from=yes" \
171 -s "Need update for translations: $X" \
173 -b "admin@xonotic.org" \
187 for X in "$VM".dat.*.po.disabled; do
188 [ -f "$X" ] || continue
189 if [ -n "$language" ]; then
190 if [ x"${X#*.dat.}" != x"$language.po" ]; then
194 msgmerge -F -U "$X" "$VM".dat.pot >/dev/null 2>&1