summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2007-06-28 17:01:39 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2007-06-28 17:01:39 (GMT)
commit8a303aed5bb81fa418cd28c625325be9da552e0c (patch) (side-by-side diff)
tree7f9e022ddf857008c3fc445eeb205affc07fe3a0
parentfd924db52da2d3b199d6704254abef82f8965358 (diff)
downloadcflow-8a303aed5bb81fa418cd28c625325be9da552e0c.tar.gz
cflow-8a303aed5bb81fa418cd28c625325be9da552e0c.tar.bz2
Update for the change of the TP URL
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xbuild-aux/bootstrap30
1 files changed, 17 insertions, 13 deletions
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index 81a4882..b9c11f1 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -69,8 +69,9 @@ gnulib_files=
# Translation Project URL, for the registry of all projects
# and for the translation-team master directory.
-TP_URL='http://www.iro.umontreal.ca/translation/registry.cgi?domain='
-TP_PO_URL='http://www.iro.umontreal.ca/translation/teams/PO/'
+tp_url() {
+ echo "http://translationproject.org/domain/$1.html"
+}
extract_package_name='
/^AC_INIT(/{
@@ -242,29 +243,32 @@ get_translations() {
'')
echo "$0: wget not available; skipping translations";;
?*)
+ url=`tp_url $domain`
+ baseurl=`expr "$url" : '\(.*\)/.*'`
echo "$0: getting translations into $subdir for $domain..." &&
(cd $subdir && rm -f dummy `ls | sed -n '/\.gmo$/p; /\.po/p'`) &&
- $WGET_COMMAND -O "$subdir/$domain.html" "$TP_URL$domain" &&
-
- sed -n 's|.*"http://[^"]*/translation/teams/PO/\([^/"]*\)/'"$domain"'-\([^/"]*\)\.[^."]*\.po".*|\1.\2|p' <"$subdir/$domain.html" |
- sort -k 1,1 -k 2,2n -k2,2 -k3,3n -k3,3 -k4,4n -k4,4 -k5,5n -k5.5 |
- awk -F. '
- { if (lang && $1 != lang) print lang, ver }
- { lang = $1; ver = substr($0, index($0, ".") + 1) }
- END { if (lang) print lang, ver }
- ' | awk -v domain="$domain" -v subdir="$subdir" '
+ $WGET_COMMAND -O "$subdir/$domain.html" "$url" &&
+
+ sed -n 's|.*href="\(.*\)/\([^/][^/]*\)/'"$domain"'-\([^/"]*\)\.[^."]*\.po".*|\2:\3:\1|p' <"$subdir/$domain.html" |
+ sort -t: -k 1,1 -k 2,2n -k2,2 -k3,3n -k3,3 -k4,4n -k4,4 -k5,5n -k5.5 |
+ awk -F: '
+ { if (lang && $1 != lang) print lang, ver, $3 }
+ { lang = $1; ver = $2 }
+ END { if (lang) print lang, ver, $3 }
+ ' | awk -v domain="$domain" -v baseurl="$baseurl" -v subdir="$subdir" '
{
lang = $1
ver = $2
urlfmt = ""
- printf "{ $WGET_COMMAND -O %s/%s.po '\'"$TP_PO_URL"'/%s/%s-%s.%s.po'\'' &&\n", subdir, lang, lang, domain, ver, lang
+ printf "{ $WGET_COMMAND -O %s/%s.po %s/%s/%s/%s-%s.%s.po &&\n", subdir, lang, baseurl, $3, lang, domain, ver, lang
printf " msgfmt -c -o /dev/null %s/%s.po || {\n", subdir, lang
printf " echo >&2 '\'"$0"': omitting translation for %s'\''\n", lang
printf " rm -f %s/%s.po; }; } &&\n", subdir, lang
}
END { print ":" }
- ' | WGET_COMMAND="$WGET_COMMAND" sh;;
+ ' | WGET_COMMAND="$WGET_COMMAND" sh
+ ;;
esac &&
ls "$subdir"/*.po 2>/dev/null |
sed 's|.*/||; s|\.po$||' >"$subdir/LINGUAS" &&

Return to:

Send suggestions and report system problems to the System administrator.