From 27161722bbf33d2f16ec9ccf4c69c12da9ff53e0 Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 8 Aug 2007 19:59:40 +0000 Subject: [PATCH] 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 --- tools/build/buildshorewall | 13 +++++++++++++ tools/build/makeshorewall | 13 +++++++++++++ tools/web/publish | 14 +++++++++++++- tools/web/publish-3.0 | 12 ++++++++++++ 4 files changed, 51 insertions(+), 1 deletion(-) diff --git a/tools/build/buildshorewall b/tools/build/buildshorewall index 95ef85709..7c378642a 100755 --- a/tools/build/buildshorewall +++ b/tools/build/buildshorewall @@ -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 diff --git a/tools/build/makeshorewall b/tools/build/makeshorewall index b4d936bf3..c447ca901 100755 --- a/tools/build/makeshorewall +++ b/tools/build/makeshorewall @@ -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 diff --git a/tools/web/publish b/tools/web/publish index 46ba18a9a..be9c2c159 100755 --- a/tools/web/publish +++ b/tools/web/publish @@ -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 ;; diff --git a/tools/web/publish-3.0 b/tools/web/publish-3.0 index 8939e5a51..77aeb912f 100755 --- a/tools/web/publish-3.0 +++ b/tools/web/publish-3.0 @@ -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