[Po4a-commits] "po4a html-build-upload.sh,1.28,1.29"
Denis Barbier
barbier-guest at alioth.debian.org
Thu Jul 29 23:13:24 UTC 2010
Update of /cvsroot/po4a/po4a
In directory alioth:/tmp/cvs-serv29648
Modified Files:
html-build-upload.sh
Log Message:
Fix MultiViews so that es and pl do not need a -utf8 suffix
html-build-upload.sh: Fix links to man3 pages
Index: html-build-upload.sh
===================================================================
RCS file: /cvsroot/po4a/po4a/html-build-upload.sh,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- html-build-upload.sh 28 Jul 2010 06:01:41 -0000 1.28
+++ html-build-upload.sh 29 Jul 2010 23:13:22 -0000 1.29
@@ -29,6 +29,7 @@
rm -rf html.gen/
cp -a _build/po4a/man html.gen
+find html.gen/man3 html.gen/*/man3 -name \*.3 -exec mv {} {}pm \;
mkdir -p html.gen/en/
mv html.gen/man* html.gen/en/
mkdir html.gen/man
@@ -43,34 +44,15 @@
echo "Generate the web pages translations with po4a"
PERLLIB=lib ./po4a --previous -v --msgid-bugs-address po4a-devel at lists.alioth.debian.org --package-name po4a --package-version $libver po/html.cfg
-find html.gen \( -name '*.es' -o -name '*.pl' \) -exec mv {} {}-utf8 \;
-
-for lang in $(ls po/www/*.po)
+for lang in po/www/*.po
do
- lang=$(basename $lang)
- lang=${lang%.po}
- lang=${lang/pl/pl-utf8}
- lang=${lang/es/es-utf8}
+ lang=$(basename ${lang%.po})
for f in html.gen/*.$lang
do
sed -i -e "s/\.en\"; ?>/\.$lang\"; ?>/" $f
done
done
-echo "Generate the English man pages"
-find lib -name "*.pm" | while read file
-do
- name=$(basename $file)
- name=${name//.pm/}
- pod2man --utf8 --section=3 --release="Po4a Tools" --center="Po4a Tools" \
- $file html.gen/en/man3/Locale::Po4a::$name.3
-done
-for file in po4a po4a-gettextize po4a-normalize po4a-translate po4a-updatepo
-do
- pod2man --utf8 --section=1 --release="Po4a Tools" --center="Po4a Tools" \
- $file html.gen/en/man1/$file.1
-done
-
# Main page
#for lang in $LANGS ; do
# PERC=`percent_lang $lang`
@@ -84,8 +66,6 @@
for lang in en $LANGS ; do
wlang=$lang
- wlang=${wlang/pl/pl-utf8}
- wlang=${wlang/es/es-utf8}
echo Generate the $lang index
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
@@ -105,7 +85,7 @@
<table>" > html.gen/man/index.php.$wlang
for man in html.gen/en/man*/*
do
- man=$(echo $man | sed -e "s/^html.gen\/en\///")
+ man=${man#html.gen/en/}
man=${man%.gz}
man=${man/1p/1}
if ls html.gen/$lang/$man* > /dev/null 2>&1
@@ -141,14 +121,17 @@
man=${man%.gz}
fi
out=${man/1p/1}.php.$wlang
- out=$(echo $out | sed -e "s/html.gen\/$lang\//html.gen\/man\//")
+ out=html.gen/man/${out#html.gen/$lang/}
footer=footer_$(basename $out)
footer=${footer%.$wlang}
+ header2=header2.php.$wlang
+ [ -e html.gen/$header2 ] || header2=header2.php.en
man2html -r $man | sed -e '/Content-type: text.html/d' \
-e '/cgi-bin.man.man2html/d' \
-e 's/\.html"/\.php"/g' \
+ -e 's,/man3pm/,/man3/,g' \
-e "s/<HEAD>/<HEAD><link rel=\"stylesheet\" title=\"Default Style\" type=\"text\/css\" href=\"..\/..\/default.css\"><meta content=\"text\/html; charset=UTF-8\" http-equiv=\"Content-Type\">/" \
- -e "s/<BODY>/<BODY><? include \"..\/..\/header2.php.$wlang\"; ?><div id=\"content\">/" \
+ -e "s/<BODY>/<BODY><? include \"..\/..\/$header2\"; ?><div id=\"content\">/" \
-e "s/<\/BODY>/<\/div><? include \"$footer\"; ?><? include \"..\/..\/footer.php\"; ?><\/BODY>/" > $out
done
@@ -204,8 +187,6 @@
echo Extract the version
echo $libver > html.gen/version.php
-find html.gen \( -name '*.es' -o -name '*.pl' \) -exec mv {} {}-utf8 \;
-
get_language() {
# FIXME: use gettext
case $1 in
@@ -215,7 +196,7 @@
en)
echo -n "English"
;;
- "es-utf8")
+ es)
echo -n "español"
;;
fr)
@@ -224,7 +205,7 @@
it)
echo -n "Italiano"
;;
- "pl-utf8")
+ pl)
echo -n "polski"
;;
ja)
More information about the Po4a-commits
mailing list