Use localized XSL stylesheets for Russian and French Documents

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@7086 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-08-08 19:59:40 +00:00
parent 0c1263ad9e
commit 27161722bb
4 changed files with 51 additions and 1 deletions

View File

@ -621,6 +621,19 @@ if [ -n "${BUILDXML}${BUILDHTML}" ]; then
list_search $b.htm $HTMFILES && b=$b.htm || b=$b.html
f="shorewall-docs-html-$VERSION/$b"
list_search $1 $NOTOC && GENTOC="--stringparam generate.toc ''" || GENTOC=
case $file in
*_ru.xml)
LANGUAGE="--stringparam l10n.gentext.default.language ru"
;;
*_fr.xml)
LANGUAGE="--stringparam l10n.gentext.default.language ru"
;;
*)
LANGUAGE=
;;
esac
report "Converting $DIR/$file from XML to HTML ($DIR/$f) ..."
do_or_die xsltproc --output $f --stringparam html.stylesheet html.css --stringparam ulink.target _self $GENTOC -param toc.section.depth 3 $STYLESHEET $file

View File

@ -580,6 +580,19 @@ if [ -n "${BUILDXML}${BUILDHTML}" ]; then
list_search $b.htm $HTMFILES && b=$b.htm || b=$b.html
f="shorewall-docs-html-$VERSION/$b"
list_search $1 $NOTOC && GENTOC="--stringparam generate.toc ''" || GENTOC=
case $file in
*_ru.xml)
LANGUAGE="--stringparam l10n.gentext.default.language ru"
;;
*_fr.xml)
LANGUAGE="--stringparam l10n.gentext.default.language ru"
;;
*)
LANGUAGE=
;;
esac
report "Converting $DIR/$file from XML to HTML ($DIR/$f) ..."
do_or_die xsltproc --output $f --stringparam html.stylesheet html.css --stringparam ulink.target _self $GENTOC -param toc.section.depth 3 $STYLESHEET $file

View File

@ -95,9 +95,21 @@ while [ $# -gt 0 ]; do
list_search $1 $NOTOC && GENTOC="--stringparam generate.toc ''" || GENTOC=
case $1 in
*_ru.xml)
LANGUAGE="--stringparam l10n.gentext.default.language ru"
;;
*_fr.xml)
LANGUAGE="--stringparam l10n.gentext.default.language ru"
;;
*)
LANGUAGE=
;;
esac
echo "Converting $1 from XML to HTML ($b) ..."
if xmllint --valid --noout $1 && xsltproc --output $f --stringparam html.stylesheet html.css --stringparam ulink.target _self $GENTOC --param toc.section.depth 3 $STYLESHEET $1 ; then
if xmllint --valid --noout $1 && xsltproc --output $f --stringparam html.stylesheet html.css --stringparam ulink.target _self $GENTOC $LANGUAGE --param toc.section.depth 3 $STYLESHEET $1 ; then
filestocopy="$filestocopy $f"
fi
;;

View File

@ -95,6 +95,18 @@ while [ $# -gt 0 ]; do
list_search $1 $NOTOC && GENTOC="--stringparam generate.toc ''" || GENTOC=
case $1 in
*_ru.xml)
LANGUAGE="--stringparam l10n.gentext.default.language ru"
;;
*_fr.xml)
LANGUAGE="--stringparam l10n.gentext.default.language fr"
;;
*)
LANGUAGE=
;;
esac
echo "Converting $1 from XML to HTML ($b) ..."
if xmllint --valid --noout $1 && xsltproc --output $f --stringparam html.stylesheet html.css --stringparam ulink.target _self $GENTOC --param toc.section.depth 3 $STYLESHEET $1 ; then