No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / projects / KDE / team-address
blob96d247b6077ea425d3ba0398c6223399c7b8832b
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/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...
14 case "$catalog" in
15 af) english=Afrikaans;;
16 ar) english=Arabic;;
17 az) english=Azerbaijani;;
18 bg) english=Bulgarian;;
19 bn) english=Bengali;;
20 bo) english=Tibetan;;
21 br) english=Breton;;
22 bs) english=Bosnian;;
23 ca) english=Catalan;;
24 cs) english=Czech;;
25 cy) english=Welsh;;
26 da) english=Danish;;
27 de) english=German;;
28 el) english=Greek;;
29 en_GB) english="British English";;
30 eo) english=Esperanto;;
31 es) english=Spanish;;
32 et) english=Estonian;;
33 eu) english=Basque;;
34 fa) english=Farsi;;
35 fi) english=Finnish;;
36 fo) english=Faroese;;
37 fr) english=French;;
38 ga) english=Irish;;
39 gl) english=Gallegan;;
40 gu) english=Gujarati;;
41 he) english=Hebrew;;
42 hi) english=Hindi;;
43 hr) english=Croatian;;
44 hu) english=Hungarian;;
45 id) english=Indonesian;;
46 is) english=Icelandic;;
47 it) english=Italian;;
48 ja) english=Japanese;;
49 km) english=Khmer;;
50 ko) english=Korean;;
51 ku) english=Kurdish;;
52 lt) english=Lithuanian;;
53 lv) english=Latvian;;
54 mi) english=Maori;;
55 mk) english=Macedonian;;
56 mr) english=Marathi;;
57 mt) english=Maltese;;
58 nl) english=Dutch;;
59 no) english="Norwegian (Bokm";;
60 nn) english="Norwegian (Nynorsk)";;
61 oc) english=Occitan;;
62 pl) english=Polish;;
63 pt) english=Portuguese;;
64 pt_BR) english="Brazilian Portuguese";;
65 ro) english=Romanian;;
66 ru) english=Russian;;
67 sk) english=Slovak;;
68 sl) english=Slovenian;;
69 sr) english=Serbian;;
70 sv) english=Swedish;;
71 ta) english=Tamil;;
72 tg) english=Tajik;;
73 th) english=Thai;;
74 tr) english=Turkish;;
75 uk) english=Ukrainian;;
76 vi) english=Vietnamese;;
77 # ??) english=Walloon;;
78 xh) english=Xhosa;;
79 zh_CN) english="Simplified Chinese";;
80 zh_TW) english="Traditional Chinese";;
81 *) english=;;
82 esac
83 if test -n "$english"; then
84 (echo "Please consider joining your translation team, and visit"
85 sed_addnl='s,</TR>,</TR>\
86 ,g'
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
89 echo " $url#$anchor"
91 echo " $url"
92 echo " http://i18n.kde.org/"
93 ) 1>&2
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'`
95 case "$address1" in
96 mailto:*) address1=`echo "$address1" | sed -e 's,^mailto:,<,' -e 's,$,>,'` ;;
97 esac
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"
102 else
103 address="$address1$address2"
105 # address can be empty or contain 1 or more space separated URLs.
106 else
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"
109 echo " $url"
110 echo " http://i18n.kde.org/"
111 echo "and decide whether you want to create a new translation team."
112 ) 1>&2
113 address=
115 exit 0