~ubuntu-branches/ubuntu/oneiric/gnupg2/oneiric-updates

« back to all changes in this revision

Viewing changes to scripts/mail-to-translators

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Viehmann
  • Date: 2008-10-04 10:25:53 UTC
  • mfrom: (5.1.15 intrepid)
  • Revision ID: james.westby@ubuntu.com-20081004102553-fv62pp8dsitxli47
Tags: 2.0.9-3.1
* Non-maintainer upload.
* agent/gpg-agent.c: Deinit the threading library before exec'ing
  the command to run in --daemon mode. And because that still doesn't
  restore the sigprocmask, do that manually. Closes: #499569

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
# mail a compressed version of the current translation to the Last-Translator
3
 
#
4
 
 
5
 
# remove the colon to armor this script.
6
 
SENDMAIL=": /usr/sbin/sendmail"
7
 
 
8
 
for file in *.po; do
9
 
    addr=$(awk '/Last-Translator:/ { printf "%s", $0; exit 0}' $file | sed 's/.*\(<.*>\).*/\1/')
10
 
    ll=$(basename $file .po)    
11
 
 
12
 
    if ! msgfmt -vc $file 2>&1| egrep -q 'fuzzy|untranslated|error'; then
13
 
        echo "$file: okay" >&2
14
 
        continue;
15
 
    fi    
16
 
 
17
 
    if ! echo "$addr" | grep -q @ ; then
18
 
        echo "$file: no translator known" >&2
19
 
        continue;
20
 
    fi
21
 
 
22
 
    echo "$file: sending to $addr"
23
 
    ( cat <<EOF
24
 
From: translations@gnupg.org
25
 
To: $addr
26
 
Subject: GnuPG translation ($ll)
27
 
Mime-Version: 1.0
28
 
Content-Type: multipart/mixed; boundary="=-=-="
29
 
 
30
 
--=-=-=
31
 
 
32
 
Hi!
33
 
 
34
 
Please find attached the latest version of the PO file for your GnuPG
35
 
translation ($file).  I would appreciate if you can fix any remaining
36
 
fuzzy or untranslated entries.  If you need access to the code
37
 
please use http://cvs.gnupg.org or get the latest snapshot at
38
 
ftp://ftp.gnupg.org/gcrypt/alpha/gnupg/gnupg-1.1.92.tar.gz
39
 
 
40
 
IMHO it is important to have a basic understanding of GnuPG's
41
 
functionality to do a correct translation.  A false translation might
42
 
need to security problems.  This is the reason why I prefer to contact
43
 
you directly and not to work only with the TP Robot.
44
 
 
45
 
Output of msgfmt is:
46
 
$(msgfmt --check --statistics $file 2>&1 | head)
47
 
 
48
 
If you are not able to continue the translation work, I suggest to
49
 
pass this message on to another translator and drop me a short note.
50
 
 
51
 
Thanks,
52
 
 
53
 
  Werner
54
 
 
55
 
 
56
 
--=-=-=
57
 
Content-Type: application/octet-stream
58
 
Content-Disposition: attachment; filename=gnupg-${file}.gz
59
 
Content-Transfer-Encoding: base64
60
 
 
61
 
EOF
62
 
 
63
 
gzip <$file | mimencode 
64
 
 
65
 
echo ""
66
 
echo "--=-=-=--"
67
 
echo ""
68
 
    ) | $SENDMAIL -oi "$addr"
69
 
 
70
 
done