forked from extern/shorewall_code
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:
parent
0c1263ad9e
commit
27161722bb
@ -621,6 +621,19 @@ if [ -n "${BUILDXML}${BUILDHTML}" ]; then
|
|||||||
list_search $b.htm $HTMFILES && b=$b.htm || b=$b.html
|
list_search $b.htm $HTMFILES && b=$b.htm || b=$b.html
|
||||||
f="shorewall-docs-html-$VERSION/$b"
|
f="shorewall-docs-html-$VERSION/$b"
|
||||||
list_search $1 $NOTOC && GENTOC="--stringparam generate.toc ''" || GENTOC=
|
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) ..."
|
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
|
do_or_die xsltproc --output $f --stringparam html.stylesheet html.css --stringparam ulink.target _self $GENTOC -param toc.section.depth 3 $STYLESHEET $file
|
||||||
|
@ -580,6 +580,19 @@ if [ -n "${BUILDXML}${BUILDHTML}" ]; then
|
|||||||
list_search $b.htm $HTMFILES && b=$b.htm || b=$b.html
|
list_search $b.htm $HTMFILES && b=$b.htm || b=$b.html
|
||||||
f="shorewall-docs-html-$VERSION/$b"
|
f="shorewall-docs-html-$VERSION/$b"
|
||||||
list_search $1 $NOTOC && GENTOC="--stringparam generate.toc ''" || GENTOC=
|
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) ..."
|
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
|
do_or_die xsltproc --output $f --stringparam html.stylesheet html.css --stringparam ulink.target _self $GENTOC -param toc.section.depth 3 $STYLESHEET $file
|
||||||
|
@ -95,9 +95,21 @@ while [ $# -gt 0 ]; do
|
|||||||
|
|
||||||
list_search $1 $NOTOC && GENTOC="--stringparam generate.toc ''" || GENTOC=
|
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) ..."
|
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"
|
filestocopy="$filestocopy $f"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
@ -95,6 +95,18 @@ while [ $# -gt 0 ]; do
|
|||||||
|
|
||||||
list_search $1 $NOTOC && GENTOC="--stringparam generate.toc ''" || GENTOC=
|
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) ..."
|
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 --param toc.section.depth 3 $STYLESHEET $1 ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user