home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / gettext / projects / TP / team-address next >
Encoding:
Text File  |  2006-08-18  |  3.0 KB  |  61 lines

  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"
  8.  
  9. url=`cat "$projectsdir/TP/teams.url"`
  10. html=`"$progdir/urlget" "$url" "$projectsdir/TP/teams.html"`
  11. sed_addnl='s,</tr>,</tr>\
  12. ,g'
  13. 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`
  14. if 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
  28. fi
  29. 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`
  30. if 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
  53. fi
  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
  60. exit 0
  61.