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