~ubuntu-branches/ubuntu/precise/gnupg2/precise-proposed

« back to all changes in this revision

Viewing changes to scripts/mail-to-translators

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Mueller
  • Date: 2005-03-29 10:30:32 UTC
  • Revision ID: james.westby@ubuntu.com-20050329103032-sj42n2ain3ipx310
Tags: upstream-1.9.15
ImportĀ upstreamĀ versionĀ 1.9.15

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=$(head -100 $file | awk '/^# ?Designated-Translator:/ { printf "%s", $0; exit 0}' | sed 's/.*\(<.*>\).*/\1/')
 
10
    if [ -z "$addr" ]; then
 
11
    addr=$(awk '/Last-Translator:/ { printf "%s", $0; exit 0}' $file | sed 's/.*\(<.*>\).*/\1/')
 
12
    fi
 
13
    ll=$(basename $file .po)    
 
14
 
 
15
    if ! msgfmt -vc $file 2>&1| egrep -q 'fuzzy|untranslated|error'; then
 
16
        echo "$file: okay" >&2
 
17
        continue;
 
18
    fi    
 
19
 
 
20
    if ! echo "$addr" | grep -q @ ; then
 
21
        echo "$file: no translator known" >&2
 
22
        continue;
 
23
    fi
 
24
 
 
25
    echo "$file: sending to $addr"
 
26
    ( cat <<EOF
 
27
From: translations@gnupg.org
 
28
To: $addr
 
29
Mail-Followup-To: translations@gnupg.org
 
30
Subject: GnuPG translation ($ll)
 
31
Mime-Version: 1.0
 
32
Content-Type: multipart/mixed; boundary="=-=-="
 
33
 
 
34
--=-=-=
 
35
 
 
36
Hi!
 
37
 
 
38
We are preparing for the 1.4 release of GnuPG and like you to ask to
 
39
start with the translation.  The recent release 1.3.91
 
40
(ftp://ftp.gnupg.org/gcrypt/alpha/gnupg/gnupg-1.3.91.tar.bz2) won't be
 
41
the last one before 1.4 and experience has shown that we will still
 
42
need to change some strings on the way to 1.4.  However due to a lot
 
43
of fuzzy entries and about 110 new strings it would be good to start
 
44
translating right now but wait with sending the translation back.  We
 
45
will tell when we think that we are ready and provide a new POT file
 
46
for merging with your current translation.
 
47
 
 
48
Please find attached the very latest version of the PO file for your
 
49
GnuPG translation ($file) from 1.3.91.
 
50
 
 
51
IMHO it is important to have a basic understanding of GnuPG's
 
52
functionality to do a correct translation.  A false translation might
 
53
lead to security problems.  Furthermore the TP Robot is not able to
 
54
handle more than one version of a project (we have 1.2, 1.3 and also
 
55
1.9) and thus I'd ask you *not to use the TP Robot* for 1.3.x or
 
56
1.4.x.
 
57
 
 
58
Output of msgfmt is:
 
59
$(msgfmt --check --statistics $file 2>&1 | head)
 
60
 
 
61
If you are not able to continue the translation work, I suggest to
 
62
pass this message on to another translator and drop a a short note to
 
63
gnupg-hackers@gnupg.org .
 
64
 
 
65
 
 
66
Thanks,
 
67
 
 
68
  Werner
 
69
 
 
70
 
 
71
--=-=-=
 
72
Content-Type: application/octet-stream
 
73
Content-Disposition: attachment; filename=gnupg-${file}.gz
 
74
Content-Transfer-Encoding: base64
 
75
 
 
76
EOF
 
77
 
 
78
gzip <$file | mimencode 
 
79
 
 
80
echo ""
 
81
echo "--=-=-=--"
 
82
echo ""
 
83
    ) | $SENDMAIL -oi "$addr"
 
84
 
 
85
done
 
86