2007-04-13 13:45:05 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# mail a compressed version of the current translation to the Last-Translator
|
|
|
|
#
|
|
|
|
|
|
|
|
# remove the colon to armor this script.
|
|
|
|
SENDMAIL=": /usr/sbin/sendmail"
|
|
|
|
|
2009-01-08 16:48:51 +01:00
|
|
|
LC_ALL=C
|
|
|
|
LC_CTYPE=C
|
|
|
|
|
2007-04-13 13:45:05 +02:00
|
|
|
for file in *.po; do
|
|
|
|
addr=$(head -100 $file | awk '/^# ?Designated-Translator:/ { printf "%s", $0; exit 0}' | sed 's/.*\(<.*>\).*/\1/')
|
|
|
|
if [ -z "$addr" ]; then
|
|
|
|
addr=$(awk '/Last-Translator:/ { printf "%s", $0; exit 0}' $file | sed 's/.*\(<.*>\).*/\1/')
|
|
|
|
fi
|
2014-01-09 19:14:09 +01:00
|
|
|
ll=$(basename $file .po)
|
2007-04-13 13:45:05 +02:00
|
|
|
|
|
|
|
if ! msgfmt -vc $file 2>&1| egrep -q 'fuzzy|untranslated|error'; then
|
|
|
|
echo "$file: okay" >&2
|
|
|
|
continue;
|
2014-01-09 19:14:09 +01:00
|
|
|
fi
|
2007-04-13 13:45:05 +02:00
|
|
|
|
|
|
|
if ! echo "$addr" | grep -q @ ; then
|
|
|
|
echo "$file: no translator known" >&2
|
|
|
|
continue;
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "$file: sending to $addr"
|
|
|
|
( cat <<EOF
|
|
|
|
From: translations@gnupg.org
|
|
|
|
To: $addr
|
|
|
|
Mail-Followup-To: translations@gnupg.org
|
|
|
|
Subject: GnuPG 2.0 translation ($ll)
|
|
|
|
Date: $(date -R)
|
|
|
|
Mime-Version: 1.0
|
|
|
|
Content-Type: multipart/mixed; boundary="=-=-="
|
|
|
|
|
|
|
|
--=-=-=
|
|
|
|
|
|
|
|
Hi!
|
|
|
|
|
|
|
|
We are preparing for a new 2.0 release of GnuPG and like you to ask to
|
2014-01-09 19:14:09 +01:00
|
|
|
update your translation.
|
2007-04-13 13:45:05 +02:00
|
|
|
|
|
|
|
Please find attached the very latest version of the PO file for your
|
|
|
|
GnuPG translation ($file).
|
|
|
|
|
|
|
|
It is important to have a basic understanding of GnuPG's functionality
|
|
|
|
to do a correct translation. A false translation might lead to
|
|
|
|
security problems. Furthermore the TP Robot is not able to handle
|
|
|
|
more than one version of a project (we maintain 1.4 and 2.0) and thus
|
|
|
|
I'd ask you *not to use the TP Robot* for GnuPG.
|
|
|
|
|
2008-12-10 11:57:47 +01:00
|
|
|
The release candidate for 2.0.10 is available at:
|
|
|
|
|
|
|
|
ftp://ftp.gnupg.org/gcrypt/alpha/gnupg/gnupg-2.0.10rc1.tar.bz2
|
|
|
|
ftp://ftp.gnupg.org/gcrypt/alpha/gnupg/gnupg-2.0.10rc1.tar.bz2.sig
|
|
|
|
|
2007-04-13 13:45:05 +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
|
2008-12-10 11:57:47 +01:00
|
|
|
pass this message on to another translator and drop a short note to
|
2007-04-13 13:45:05 +02:00
|
|
|
gnupg-hackers@gnupg.org .
|
|
|
|
|
|
|
|
|
2008-12-10 11:57:47 +01:00
|
|
|
Happy hacking,
|
2007-04-13 13:45:05 +02:00
|
|
|
|
|
|
|
Werner
|
|
|
|
|
|
|
|
|
|
|
|
--=-=-=
|
|
|
|
Content-Type: application/octet-stream
|
|
|
|
Content-Disposition: attachment; filename=gnupg-${file}.bz2
|
|
|
|
Content-Transfer-Encoding: base64
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
2014-01-09 19:14:09 +01:00
|
|
|
bzip2 <$file | mimencode
|
2007-04-13 13:45:05 +02:00
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "--=-=-=--"
|
|
|
|
echo ""
|
|
|
|
) | $SENDMAIL -oi "$addr"
|
|
|
|
|
|
|
|
done
|