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 if [ x"${X#*.dat.}" = x"en.po" ]; then
62 msgmerge -F -U "$X" "$VM".dat.pot >&2
63 msgattrib --untranslated "$X" | grep . > "$X".untranslated || rm -f "$X".untranslated
64 msgattrib --fuzzy "$X" | grep . > "$X".fuzzy || rm -f "$X".fuzzy
65 nu=$((`grep -c ^#: "$X".untranslated 2>/dev/null` + 0))
66 nf=$((`grep -c ^#: "$X".fuzzy 2>/dev/null` + 0))
69 for Y in ~/check-translations/"$X".*; do
70 [ -f "$Y" ] || continue
73 set fileencoding=utf-8
78 if ! msgcat "$Y" >/dev/null; then
79 echo "File $Y has syntax errors. Skipped."
82 msgcat -F --use-first "$Y" "$X" > "$X".new
89 msgmerge -F -U "$X" "$VM".dat.pot >&2
90 msgattrib --untranslated "$X" | grep . > "$X".untranslated || rm -f "$X".untranslated
91 msgattrib --fuzzy "$X" | grep . > "$X".fuzzy || rm -f "$X".fuzzy
92 nu=$((`grep -c ^#: "$X".untranslated 2>/dev/null` + 0))
93 nf=$((`grep -c ^#: "$X".fuzzy 2>/dev/null` + 0))
97 echo "TODO for translation $X:"
98 echo "Untranslated: $nu (was: $nu0)"
99 echo "Fuzzy: $nf (was: $nf0)"
100 ltr=`grep '^"Last-Translator: ' "$X" | cut -d ' ' -f 2- | cut -d '\\' -f 1 | egrep -v '<LL@li.org>|<EMAIL@ADDRESS>'`
101 ltm=`grep '^"Language-Team: ' "$X" | cut -d ' ' -f 2- | cut -d '\\' -f 1 | egrep -v '<LL@li.org>|<EMAIL@ADDRESS>'`
102 echo "Translators: $ltr, $ltm"
110 if [ x"$ltr" = x"$ltm" ]; then
117 if [ -n "$to" ]; then
120 if [ -n "$cc" ]; then
123 if [ -n "$to" ]; then
125 echo "Send mail? [y/n]"
130 if [ $nu -gt 0 ]; then
131 attach="$attach $X.untranslated"
133 if [ $nf -gt 0 ]; then
134 attach="$attach $X.fuzzy"
140 as you provided us with translations in the past, we kindly ask you
141 to update the translation to match changes in the Xonotic source. Can
142 you please work on them and provide updates to us?
144 For reference, the current version of the translation file is at:
145 http://git.xonotic.org/?p=xonotic/xonotic-data.pk3dir.git;a=blob;f=$X
147 If you do not wish to be contacted for translation updates any more,
148 please tell us in a reply to this message.
151 if [ $nu -gt 0 ]; then
153 Attached to this message is a file
155 with $nu yet to be translated messages. Please translate them and reply
156 with the file containing the translations in the "msgstr" fields.
160 if [ $nf -gt 0 ]; then
162 Attached to this message is a file
164 with $nf automatically generated translations. Please verify and/or fix
165 them and reply with the file having been verified by you.
175 -e "set from=\"divVerent@xonotic.org\"" \
176 -e "set use_from=yes" \
177 -e "set use_envelope_from=yes" \
178 -s "Need update for translations: $X" \
180 -b "admin@xonotic.org" \
192 echo "$X is complete!"
196 for X in "$VM".dat.*.po.disabled; do
197 [ -f "$X" ] || continue
198 if [ -n "$language" ]; then
199 if [ x"${X#*.dat.}" != x"$language.po" ]; then
203 msgmerge -F -U "$X" "$VM".dat.pot >/dev/null 2>&1