Install gettext-0.18.1.1.tar.gz
[msysgit.git] / mingw / share / gettext / projects / TP / team-address
blob6d4624fad48995ae05e5225165e5774c0206dbea
1 #!/bin/sh
2 # Print the team's address (to stdout) and output additional instructions
3 # (to stderr).
4 projectsdir="$1"
5 progdir="$2"
6 catalog="$3" # e.g. "pt_BR"
7 language="$4" # e.g. "pt"
9 url=`cat "$projectsdir/TP/teams.url"`
10 sed_absolute_dotdot_urls="s,href=\"\\.\\./,href="`echo "$url" | sed -e 's,/[^/]*/[^/]*\$,/,'`",g"
11 html=`"$progdir/urlget" "$url" "$projectsdir/TP/teams.html" | sed -e "$sed_absolute_dotdot_urls"`
12 sed_addnl='s,</tr>,</tr>\
13 ,g'
14 address=`echo "$html" | tr '\012' '|' | sed -e "$sed_addnl" | sed -n -e "s,^.*<td>$catalog</td>[^<>]*<td>[^|]*</td>[^<>]*<td><a href=\"\\([^\"]*\\)\">[^<>]*</a></td>.*\$,\\1,p" | sed 1q`
15 if test -n "$address"; then
16 case "$address" in
17 mailto:*) address=`echo "$address" | sed -e 's,^mailto:,<,' -e 's,$,>,'` ;;
18 esac
19 (echo "Please visit your translation team's homepage at"
20 echo " "`echo "$html" | tr '\012' '|' | sed -e "$sed_addnl" | sed -n -e "s,^.*<td>$catalog</td>[^<>]*<td><a href=\"\\([^\"]*\\)\">[^<>]*</a></td>.*\$,\\1,p" | sed 1q`
21 echo " http://www.iro.umontreal.ca/contrib/po/HTML/teams.html"
22 echo " http://www.iro.umontreal.ca/contrib/po/HTML/translators.html"
23 echo " http://www.iro.umontreal.ca/contrib/po/HTML/index.html"
24 echo "and consider joining your translation team's mailing list"
25 echo " $address"
26 ) 1>&2
27 echo "$address"
28 exit 0
30 address=`echo "$html" | tr '\012' '|' | sed -e "$sed_addnl" | sed -n -e "s,^.*<td>$language</td>[^<>]*<td>[^|]*</td>[^<>]*<td><a href=\"\\([^\"]*\\)\">[^<>]*</a></td>.*\$,\\1,p" | sed 1q`
31 if test -n "$address"; then
32 case "$address" in
33 mailto:*) address=`echo "$address" | sed -e 's,^mailto:,<,' -e 's,$,>,'` ;;
34 esac
35 (echo "A translation team exists for your language ($language) but not for"
36 echo "your local dialect ($catalog). You can either join the existing"
37 echo "translation team for $language or create a new translation team for $catalog."
38 echo
39 echo "Please visit the existing translation team's homepage at"
40 echo " "`echo "$html" | tr '\012' '|' | sed -e "$sed_addnl" | sed -n -e "s,^.*<td>$language</td>[^<>]*<td><a href=\"\\([^\"]*\\)\">[^<>]*</a></td>.*\$,\\1,p" | sed 1q`
41 echo " http://www.iro.umontreal.ca/contrib/po/HTML/teams.html"
42 echo " http://www.iro.umontreal.ca/contrib/po/HTML/translators.html"
43 echo " http://www.iro.umontreal.ca/contrib/po/HTML/index.html"
44 echo "and consider joining the translation team's mailing list"
45 echo " $address"
46 echo
47 echo "If you want to create a new translation team for $catalog, please visit"
48 echo " http://www.iro.umontreal.ca/contrib/po/HTML/teams.html"
49 echo " http://www.iro.umontreal.ca/contrib/po/HTML/leaders.html"
50 echo " http://www.iro.umontreal.ca/contrib/po/HTML/index.html"
51 ) 1>&2
52 echo "$address"
53 exit 0
55 (echo "A translation team for your language ($language) does not exist yet."
56 echo "If you want to create a new translation team for $language"`test "$catalog" = "$language" || echo " or $catalog"`", please visit"
57 echo " http://www.iro.umontreal.ca/contrib/po/HTML/teams.html"
58 echo " http://www.iro.umontreal.ca/contrib/po/HTML/leaders.html"
59 echo " http://www.iro.umontreal.ca/contrib/po/HTML/index.html"
60 ) 1>&2
61 exit 0