Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/gettext/projects/TP/team-address @ 68:5028fdace37b
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 16:23:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
67:0e9998148a16 | 68:5028fdace37b |
---|---|
1 #!/bin/sh | |
2 # | |
3 # Copyright (C) 2001, 2007, 2019 Free Software Foundation, Inc. | |
4 # Written by Bruno Haible <bruno@clisp.org>, 2001. | |
5 # | |
6 # This program is free software: you can redistribute it and/or modify | |
7 # it under the terms of the GNU General Public License as published by | |
8 # the Free Software Foundation; either version 3 of the License, or | |
9 # (at your option) any later version. | |
10 # | |
11 # This program is distributed in the hope that it will be useful, | |
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 # GNU General Public License for more details. | |
15 # | |
16 # You should have received a copy of the GNU General Public License | |
17 # along with this program. If not, see <https://www.gnu.org/licenses/>. | |
18 | |
19 # Print the team's address (to stdout) and output additional instructions | |
20 # (to stderr). | |
21 | |
22 projectsdir="$1" | |
23 progdir="$2" | |
24 catalog="$3" # e.g. "pt_BR" | |
25 language="$4" # e.g. "pt" | |
26 | |
27 url=`cat "$projectsdir/TP/teams.url"` | |
28 url_parent=`echo "$url" | sed -e 's,/[^/]*\$,/,'` | |
29 url_grandparent=`echo "$url" | sed -e 's,/[^/]*/[^/]*\$,/,'` | |
30 sed_absolute_dotdot_urls="s,href=\"\\.\\./,href=${url_grandparent},g" | |
31 html=`"$progdir/urlget" "$url" "$projectsdir/TP/teams.html" | sed -e "$sed_absolute_dotdot_urls"` | |
32 sed_addnl='s,</tr>,</tr>\ | |
33 ,g' | |
34 address=`echo "$html" | tr '\012' '|' | sed -e "$sed_addnl" | sed -n -e "s,^.*<td>$catalog</td>[^<>]*<td><a href=\"\\([^\"]*\\)\">[^<>]*</a></td>.*\$,\\1,p" | sed 1q` | |
35 if test -n "$address"; then | |
36 case "$address" in | |
37 mailto:*) address=`echo "$address" | sed -e 's,^mailto:,<,' -e 's,$,>,'` ;; | |
38 esac | |
39 (echo "Please visit your translation team's homepage at" | |
40 echo " ${url_parent}"`echo "$html" | tr '\012' '|' | sed -e "$sed_addnl" | sed -n -e "s,^.*<td><a href=\"\\([^\"]*\\)\">[^<>]*</a></td>[^<>]*<td>$catalog</td>.*\$,\\1,p" | sed 1q` | |
41 echo " https://translationproject.org/team/index.html" | |
42 echo " https://translationproject.org/html/translators.html" | |
43 echo " https://translationproject.org/html/welcome.html" | |
44 echo "and consider joining your translation team's mailing list" | |
45 echo " $address" | |
46 ) 1>&2 | |
47 echo "$address" | |
48 exit 0 | |
49 fi | |
50 address=`echo "$html" | tr '\012' '|' | sed -e "$sed_addnl" | sed -n -e "s,^.*<td>$language</td>[^<>]*<td><a href=\"\\([^\"]*\\)\">[^<>]*</a></td>.*\$,\\1,p" | sed 1q` | |
51 if test -n "$address"; then | |
52 case "$address" in | |
53 mailto:*) address=`echo "$address" | sed -e 's,^mailto:,<,' -e 's,$,>,'` ;; | |
54 esac | |
55 (echo "A translation team exists for your language ($language) but not for" | |
56 echo "your local dialect ($catalog). You can either join the existing" | |
57 echo "translation team for $language or create a new translation team for $catalog." | |
58 echo | |
59 echo "Please visit the existing translation team's homepage at" | |
60 echo " ${url_parent}"`echo "$html" | tr '\012' '|' | sed -e "$sed_addnl" | sed -n -e "s,^.*<td><a href=\"\\([^\"]*\\)\">[^<>]*</a></td>[^<>]*<td>$language</td>.*\$,\\1,p" | sed 1q` | |
61 echo " https://translationproject.org/team/index.html" | |
62 echo " https://translationproject.org/html/translators.html" | |
63 echo " https://translationproject.org/html/welcome.html" | |
64 echo "and consider joining the translation team's mailing list" | |
65 echo " $address" | |
66 echo | |
67 echo "If you want to create a new translation team for $catalog, please visit" | |
68 echo " https://translationproject.org/team/index.html" | |
69 echo " https://translationproject.org/html/leaders.html" | |
70 echo " https://translationproject.org/html/welcome.html" | |
71 ) 1>&2 | |
72 echo "$address" | |
73 exit 0 | |
74 fi | |
75 (echo "A translation team for your language ($language) does not exist yet." | |
76 echo "If you want to create a new translation team for $language"`test "$catalog" = "$language" || echo " or $catalog"`", please visit" | |
77 echo " https://translationproject.org/team/index.html" | |
78 echo " https://translationproject.org/html/leaders.html" | |
79 echo " https://translationproject.org/html/welcome.html" | |
80 ) 1>&2 | |
81 exit 0 |