2 # Print the team's address (to stdout) and output additional instructions
6 catalog
="$3" # e.g. "pt_BR"
7 language
="$4" # e.g. "pt"
9 url
=`cat "$projectsdir/KDE/teams.url"`
10 html
=`"$progdir/urlget" "$url" "$projectsdir/KDE/teams.html"`
11 # The HTML page says they are "presently switching from the 2-letter codes
12 # to the 3-letter codes". So it is safest to use the English name and
13 # translate ourselves...
15 af
) english
=Afrikaans
;;
17 az
) english
=Azerbaijani
;;
18 bg) english
=Bulgarian
;;
29 en_GB
) english
="British English";;
30 eo
) english
=Esperanto
;;
32 et
) english
=Estonian
;;
39 gl
) english
=Gallegan
;;
40 gu
) english
=Gujarati
;;
43 hr
) english
=Croatian
;;
44 hu
) english
=Hungarian
;;
45 id
) english
=Indonesian
;;
46 is
) english
=Icelandic
;;
48 ja
) english
=Japanese
;;
52 lt
) english
=Lithuanian
;;
55 mk
) english
=Macedonian
;;
59 no
) english
="Norwegian (Bokm";;
60 nn
) english
="Norwegian (Nynorsk)";;
63 pt
) english
=Portuguese
;;
64 pt_BR
) english
="Brazilian Portuguese";;
65 ro
) english
=Romanian
;;
68 sl
) english
=Slovenian
;;
75 uk
) english
=Ukrainian
;;
76 vi
) english
=Vietnamese
;;
77 # ??) english=Walloon;;
79 zh_CN
) english
="Simplified Chinese";;
80 zh_TW
) english
="Traditional Chinese";;
83 if test -n "$english"; then
84 (echo "Please consider joining your translation team, and visit"
85 sed_addnl
='s,</TR>,</TR>\
87 anchor
=`echo "$html" | tr '\012' '|' | sed -e "$sed_addnl" | sed -n -e 's,^.*<TR.*<A NAME="\([^"]*\)">.*>'"$english"'[^<>]*team<.*</TR>$,\1,p'`
88 if test -n "$anchor"; then
92 echo " http://i18n.kde.org/"
94 address1
=`echo "$html" | tr '\012' '|' | sed -n -e 's,^.*>'"$english"'[^<>]*team<\(.*\)$,\1,p' | sed -e "$sed_addnl" | sed -e 2q -e 1d | sed -n -e 's,^.*mailing list\(.*\)$,\1,p' | sed -e 's,</LI>.*,,' | sed -e 's,</A>.*,</A>,' | sed -n -e 's,^.*HREF="\([^"]*\)">[^<>]*</A>.*$,\1,p'`
96 mailto
:*) address1
=`echo "$address1" | sed -e 's,^mailto:,<,' -e 's,$,>,'` ;;
98 address1
=`echo "$address1" | sed -e 's,-request@,@,'`
99 address2
=`echo "$html" | tr '\012' '|' | sed -n -e 's,^.*>'"$english"'[^<>]*team<\(.*\)$,\1,p' | sed -e "$sed_addnl" | sed -e 2q -e 1d | sed -n -e 's,^.*web site\(.*\)$,\1,p' | sed -e 's,</LI>.*,,' | sed -e 's,</A>.*,</A>,' | sed -n -e 's,^.*HREF="\([^"]*\)">[^<>]*</A>.*$,\1,p'`
100 if test -n "$address1" && test -n "$address2"; then
101 address
="$address1 $address2"
103 address
="$address1$address2"
105 # address can be empty or contain 1 or more space separated URLs.
107 (echo "A translation team for your "`if test "$catalog" = "$language"; then echo "language ($language)"; else echo "local dialect ($catalog)"; fi`
108 echo "may not exist yet. Please visit"
110 echo " http://i18n.kde.org/"
111 echo "and decide whether you want to create a new translation team."