2002-06-29 15:46:34 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# mail a compressed version of the current translation to the Last-Translator
|
|
|
|
#
|
|
|
|
|
2002-09-11 17:25:47 +02:00
|
|
|
# remove the colon to armor this script.
|
|
|
|
SENDMAIL=": /usr/sbin/sendmail"
|
2002-06-29 15:46:34 +02:00
|
|
|
|
|
|
|
for file in *.po; do
|
2004-10-26 21:32:44 +02:00
|
|
|
addr=$(head -100 $file | awk '/^# ?Designated-Translator:/ { printf "%s", $0; exit 0}' | sed 's/.*\(<.*>\).*/\1/')
|
|
|
|
if [ -z "$addr" ]; then
|
2002-06-29 15:46:34 +02:00
|
|
|
addr=$(awk '/Last-Translator:/ { printf "%s", $0; exit 0}' $file | sed 's/.*\(<.*>\).*/\1/')
|
2004-10-26 21:32:44 +02:00
|
|
|
fi
|
2002-06-29 15:46:34 +02:00
|
|
|
ll=$(basename $file .po)
|
|
|
|
|
|
|
|
if ! msgfmt -vc $file 2>&1| egrep -q 'fuzzy|untranslated|error'; then
|
|
|
|
echo "$file: okay" >&2
|
|
|
|
continue;
|
|
|
|
fi
|
|
|
|
|
2002-09-11 17:25:47 +02:00
|
|
|
if ! echo "$addr" | grep -q @ ; then
|
2002-06-29 15:46:34 +02:00
|
|
|
echo "$file: no translator known" >&2
|
|
|
|
continue;
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "$file: sending to $addr"
|
|
|
|
( cat <<EOF
|
|
|
|
From: translations@gnupg.org
|
|
|
|
To: $addr
|
2004-10-26 21:32:44 +02:00
|
|
|
Mail-Followup-To: translations@gnupg.org
|
2002-06-29 15:46:34 +02:00
|
|
|
Subject: GnuPG translation ($ll)
|
|
|
|
Mime-Version: 1.0
|
|
|
|
Content-Type: multipart/mixed; boundary="=-=-="
|
|
|
|
|
|
|
|
--=-=-=
|
|
|
|
|
|
|
|
Hi!
|
|
|
|
|
2005-07-26 17:41:04 +02:00
|
|
|
We are preparing for a new 1.4 release of GnuPG and like you to ask to
|
|
|
|
update your translation.
|
2004-10-26 21:32:44 +02:00
|
|
|
|
|
|
|
Please find attached the very latest version of the PO file for your
|
2005-07-26 17:41:04 +02:00
|
|
|
GnuPG translation ($file).
|
2002-09-11 15:41:09 +02:00
|
|
|
|
|
|
|
IMHO it is important to have a basic understanding of GnuPG's
|
|
|
|
functionality to do a correct translation. A false translation might
|
2004-10-26 21:32:44 +02:00
|
|
|
lead to security problems. Furthermore the TP Robot is not able to
|
2005-07-26 17:41:04 +02:00
|
|
|
handle more than one version of a project (we have 1.2, 1.4 and also
|
|
|
|
1.9) and thus I'd ask you *not to use the TP Robot* for GnuPG.
|
2002-06-29 15:46:34 +02:00
|
|
|
|
|
|
|
Output of msgfmt is:
|
|
|
|
$(msgfmt --check --statistics $file 2>&1 | head)
|
|
|
|
|
|
|
|
If you are not able to continue the translation work, I suggest to
|
2004-10-26 21:32:44 +02:00
|
|
|
pass this message on to another translator and drop a a short note to
|
|
|
|
gnupg-hackers@gnupg.org .
|
|
|
|
|
2002-06-29 15:46:34 +02:00
|
|
|
|
|
|
|
Thanks,
|
|
|
|
|
|
|
|
Werner
|
|
|
|
|
|
|
|
|
|
|
|
--=-=-=
|
|
|
|
Content-Type: application/octet-stream
|
|
|
|
Content-Disposition: attachment; filename=gnupg-${file}.gz
|
|
|
|
Content-Transfer-Encoding: base64
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
gzip <$file | mimencode
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "--=-=-=--"
|
|
|
|
echo ""
|
|
|
|
) | $SENDMAIL -oi "$addr"
|
|
|
|
|
|
|
|
done
|
2004-10-26 21:32:44 +02:00
|
|
|
|