jpayne@68: #!/bin/sh jpayne@68: # jpayne@68: # Copyright (C) 2001, 2005, 2010 Free Software Foundation, Inc. jpayne@68: # Written by Bruno Haible , 2001. jpayne@68: # jpayne@68: # This program is free software: you can redistribute it and/or modify jpayne@68: # it under the terms of the GNU General Public License as published by jpayne@68: # the Free Software Foundation; either version 3 of the License, or jpayne@68: # (at your option) any later version. jpayne@68: # jpayne@68: # This program is distributed in the hope that it will be useful, jpayne@68: # but WITHOUT ANY WARRANTY; without even the implied warranty of jpayne@68: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jpayne@68: # GNU General Public License for more details. jpayne@68: # jpayne@68: # You should have received a copy of the GNU General Public License jpayne@68: # along with this program. If not, see . jpayne@68: jpayne@68: # Print the team's address (to stdout) and output additional instructions jpayne@68: # (to stderr). jpayne@68: jpayne@68: projectsdir="$1" jpayne@68: progdir="$2" jpayne@68: catalog="$3" # e.g. "pt_BR" jpayne@68: language="$4" # e.g. "pt" jpayne@68: jpayne@68: url=`cat "$projectsdir/GNOME/teams.url"` jpayne@68: html=`"$progdir/urlget" "$url" "$projectsdir/GNOME/teams.html"` jpayne@68: sed_addnl='s,,\ jpayne@68: ,g' jpayne@68: sed_extract_address='s,^.*"/teams/'"$catalog"'">[^<>]*.*]*>\(.*\).*]*>.*.*,\1,p' jpayne@68: address=`echo "$html" | tr '\012' '|' | sed -e "$sed_addnl" | sed -n -e "$sed_extract_address"` jpayne@68: if test -n "$address"; then jpayne@68: (echo "Please consider joining your translation team, and visit" jpayne@68: echo " $address" jpayne@68: echo " https://l10n.gnome.org/" jpayne@68: ) 1>&2 jpayne@68: else jpayne@68: (echo "A translation team for your "`if test "$catalog" = "$language"; then echo "language ($language)"; else echo "local dialect ($catalog)"; fi` jpayne@68: echo "may not exist yet. Please visit" jpayne@68: echo " $url" jpayne@68: echo " https://l10n.gnome.org/" jpayne@68: echo "and decide whether you want to create a new translation team." jpayne@68: ) 1>&2 jpayne@68: address= jpayne@68: fi jpayne@68: exit 0