]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - check-translations.sh
improve the way the trace is done for shownames
[xonotic/xonotic-data.pk3dir.git] / check-translations.sh
index 51157a43e2e8853f3ace3680a045da63f2a7b8b3..fb1f68f32a64fecb6dd70b1334372defff54510c 100755 (executable)
@@ -16,6 +16,11 @@ for VM in menu csprogs; do
        } | xgettext -LC -k_ -f- --from-code utf-8 -o "$VM".dat.pot >&2
        for X in "$VM".dat.*.po; do
                [ -f "$X" ] || continue
+               for Y in ~/check-translations/"$X".*; do
+                       [ -f "$Y" ] || continue
+                       msgcat -F --use-first "$Y" "$X" > "$X".new
+                       mv "$X".new "$X"
+               done
                msgmerge -F -U "$X" "$VM".dat.pot >&2
                msgattrib --untranslated "$X" | grep . > "$X".untranslated || rm -f "$X".untranslated
                msgattrib --fuzzy "$X"        | grep . > "$X".fuzzy        || rm -f "$X".fuzzy
@@ -55,29 +60,40 @@ for VM in menu csprogs; do
                                        read -r yesno
                                        case "$yesno" in
                                                y)
-                                                       zip -9r "$X"-todo.zip "$X".untranslated "$X".fuzzy
+                                                       attach=
+                                                       if [ $nu -gt 0 ]; then
+                                                               attach="$attach $X.untranslated"
+                                                       fi
+                                                       if [ $nf -gt 0 ]; then
+                                                               attach="$attach $X.fuzzy"
+                                                       fi
                                                        {
                                                                cat <<EOF
 Hi,
 
-we need updates to the translations you made for Xonotic.
+as you provided us with translations in the past, we kindly ask you
+to update the translation to match changes in the Xonotic source. Can
+you please work on them and provide updates to us?
+
+If you do not wish to be contacted for translation updates any more,
+please tell us in a reply to this message.
 
 EOF
                                                                if [ $nu -gt 0 ]; then
                                                                        cat <<EOF
-The attached zip file contains a file
+Attached to this message is a file
 $X.untranslated
-with $nu yet to be translated messages. Please translate them and reply with
-the file containing the translations in the "msgstr" fields.
+with $nu yet to be translated messages. Please translate them and reply
+with the file containing the translations in the "msgstr" fields.
 
 EOF
                                                                fi
                                                                if [ $nf -gt 0 ]; then
                                                                        cat <<EOF
-The attached zip file contains a file
+Attached to this message is a file
 $X.fuzzy
-with $nf automatically generated translations. Please verify and/or fix them
-and reply with the file having been verified by you.
+with $nf automatically generated translations. Please verify and/or fix
+them and reply with the file having been verified by you.
 
 EOF
                                                                fi
@@ -86,14 +102,17 @@ Thanks in advance,
 
 Team Xonotic
 EOF
-                                                       } | mail \
+                                                       } | mutt \
+                                                               -e "set from=\"divVerent@xonotic.org\"" \
+                                                               -e "set use_from=yes" \
+                                                               -e "set use_envelope_from=yes" \
                                                                -s "Need update for translations: $X" \
-                                                               -a "$X"-todo.zip \
                                                                -c "$cc" \
                                                                -b "divVerent@xonotic.org" \
-                                                               -S from="divVerent@xonotic.org" \
+                                                               -a $attach -- \
                                                                "$to"
-EOF
+                                                       break
+                                                       ;;
                                                n)
                                                        break
                                                        ;;