2007-04-13 11:45:05 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# mail a compressed version of the current translation to the Last-Translator
|
|
|
|
#
|
|
|
|
|
2011-01-11 20:10:07 +01:00
|
|
|
# Remove the colon to armor this script.
|
2007-04-13 11:45:05 +00:00
|
|
|
SENDMAIL=": /usr/sbin/sendmail"
|
|
|
|
|
2009-01-08 15:48:51 +00:00
|
|
|
LC_ALL=C
|
|
|
|
LC_CTYPE=C
|
|
|
|
|
2007-04-13 11:45:05 +00: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
|
|
|
|
ll=$(basename $file .po)
|
|
|
|
|
|
|
|
if ! msgfmt -vc $file 2>&1| egrep -q 'fuzzy|untranslated|error'; then
|
|
|
|
echo "$file: okay" >&2
|
|
|
|
continue;
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! echo "$addr" | grep -q @ ; then
|
|
|
|
echo "$file: no translator known" >&2
|
|
|
|
continue;
|
|
|
|
fi
|
|
|
|
|
2011-01-11 20:10:07 +01:00
|
|
|
echo "$file: sending to $addr" >&2
|
2007-04-13 11:45:05 +00:00
|
|
|
( 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
|
2011-01-11 20:10:07 +01:00
|
|
|
update your translation. Unfortunately there is not much time left;
|
|
|
|
we can only include updates we receive by XXXXXXXXXXXXXX UTC.
|
2007-04-13 11:45:05 +00: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
|
2011-01-12 15:06:53 +01:00
|
|
|
security problems. Please do *not to use the TP Robot* for GnuPG.
|
2007-04-13 11:45:05 +00:00
|
|
|
|
2011-01-11 20:10:07 +01:00
|
|
|
A release candidate for 2.0.xx is available at:
|
2008-12-10 10:57:47 +00:00
|
|
|
|
2011-01-11 20:10:07 +01:00
|
|
|
ftp://ftp.gnupg.org/gcrypt/alpha/gnupg/
|
|
|
|
ftp://ftp.gnupg.org/gcrypt/alpha/gnupg/
|
2008-12-10 10:57:47 +00:00
|
|
|
|
2007-04-13 11:45:05 +00: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 10:57:47 +00:00
|
|
|
pass this message on to another translator and drop a short note to
|
2007-04-13 11:45:05 +00:00
|
|
|
gnupg-hackers@gnupg.org .
|
|
|
|
|
|
|
|
|
2008-12-10 10:57:47 +00:00
|
|
|
Happy hacking,
|
2007-04-13 11:45:05 +00:00
|
|
|
|
|
|
|
Werner
|
|
|
|
|
|
|
|
|
|
|
|
--=-=-=
|
|
|
|
Content-Type: application/octet-stream
|
|
|
|
Content-Disposition: attachment; filename=gnupg-${file}.bz2
|
|
|
|
Content-Transfer-Encoding: base64
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
bzip2 <$file | mimencode
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "--=-=-=--"
|
|
|
|
echo ""
|
|
|
|
) | $SENDMAIL -oi "$addr"
|
|
|
|
|
|
|
|
done
|
|
|
|
|