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 if [ x"$mode" = x"pot" ]; then
29 find qcsrc -type f -name \*.\* -not -name \*.po -not -name \*.txt
30 } | xgettext -LC -k_ -f- --from-code utf-8 -o common.pot >&2
33 if [ x"$mode" = x"po" ]; then
34 for X in common.*.po; do
35 [ -f "$X" ] || continue
36 if [ -n "$language" ]; then
37 if [ x"${X#*.dat.}" != x"$language.po" ]; then
41 if [ x"${X#*.dat.}" = x"en.po" ]; then
45 msgmerge -F -U "$X" common.pot >&2
46 msgattrib --untranslated "$X" | grep . > "$X".untranslated || rm -f "$X".untranslated
47 msgattrib --fuzzy "$X" | grep . > "$X".fuzzy || rm -f "$X".fuzzy
48 nu=$((`grep -c ^#: "$X".untranslated 2>/dev/null` + 0))
49 nf=$((`grep -c ^#: "$X".fuzzy 2>/dev/null` + 0))
52 for Y in ~/check-translations/"$X".*; do
53 [ -f "$Y" ] || continue
56 set fileencoding=utf-8
61 if ! msgcat "$Y" >/dev/null; then
62 echo "File $Y has syntax errors. Skipped."
65 msgcat -F --use-first "$Y" "$X" > "$X".new
72 msgmerge -F -U "$X" common.pot >&2
73 msgattrib --untranslated "$X" | grep . > "$X".untranslated || rm -f "$X".untranslated
74 msgattrib --fuzzy "$X" | grep . > "$X".fuzzy || rm -f "$X".fuzzy
75 nu=$((`grep -c ^#: "$X".untranslated 2>/dev/null` + 0))
76 nf=$((`grep -c ^#: "$X".fuzzy 2>/dev/null` + 0))
80 echo "TODO for translation $X:"
81 echo "Untranslated: $nu (was: $nu0)"
82 echo "Fuzzy: $nf (was: $nf0)"
83 ltr=`grep '^"Last-Translator: ' "$X" | cut -d ' ' -f 2- | cut -d '\\' -f 1 | egrep -v '<LL@li.org>|<EMAIL@ADDRESS>'`
84 ltm=`grep '^"Language-Team: ' "$X" | cut -d ' ' -f 2- | cut -d '\\' -f 1 | egrep -v '<LL@li.org>|<EMAIL@ADDRESS>'`
85 echo "Translators: $ltr, $ltm"
93 if [ x"$ltr" = x"$ltm" ]; then
100 if [ -n "$to" ]; then
103 if [ -n "$cc" ]; then
106 if [ -n "$to" ]; then
108 echo "Send mail? [y/n]"
113 if [ $nu -gt 0 ]; then
114 attach="$attach $X.untranslated"
116 if [ $nf -gt 0 ]; then
117 attach="$attach $X.fuzzy"
123 as you provided us with translations in the past, we kindly ask you
124 to update the translation to match changes in the Xonotic source. Can
125 you please work on them and provide updates to us?
127 For reference, the current version of the translation file is at:
128 http://git.xonotic.org/?p=xonotic/xonotic-data.pk3dir.git;a=blob;f=$X
130 If you do not wish to be contacted for translation updates any more,
131 please tell us in a reply to this message.
134 if [ $nu -gt 0 ]; then
136 Attached to this message is a file
138 with $nu yet to be translated messages. Please translate them and reply
139 with the file containing the translations in the "msgstr" fields.
143 if [ $nf -gt 0 ]; then
145 Attached to this message is a file
147 with $nf automatically generated translations. Please verify and/or fix
148 them and reply with the file having been verified by you.
158 -e "set from=\"divVerent@xonotic.org\"" \
159 -e "set use_from=yes" \
160 -e "set use_envelope_from=yes" \
161 -s "Need update for translations: $X" \
163 -b "admin@xonotic.org" \
175 echo "$X is complete!"
179 for X in common.*.po.disabled; do
180 [ -f "$X" ] || continue
181 if [ -n "$language" ]; then
182 if [ x"${X#*.dat.}" != x"$language.po" ]; then
186 msgmerge -F -U "$X" common.pot >/dev/null 2>&1