diff options
author | Olivier Hallot <olivier.hallot@libreoffice.org> | 2017-10-31 11:14:57 -0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@libreoffice.org> | 2017-11-01 17:19:02 +0100 |
commit | 788f70916eaa53d89775c5998a4d19235ed19f4a (patch) | |
tree | 740dc836b87e8a7a3139f91abb93d71387ae215b /help3xsl/online_transform.xsl | |
parent | 305f83a24245f6e8889a33bab2f8d4657b8b2767 (diff) |
Refactor new help builder script into smaller pieces
Add 4 smaller bash scripts for building new help, for
better management
Scripts use the following parameters
workDir: $(WORKDIR)
lang: $(LANG)
productVersion: 6.0
and put results in
$(WORKDIR)/HelpTargetHTML
./get_hid2file.sh $productVersion $workDir
Creates hid2file.js that maps HID into HTML page
uses get_url.xsl transform
./get_bookmark.sh $lang $productVersion $workDir
Creates the index file 'bookmarks.js' based on
<bookmark_values> tag in all localized XHP files.
Visible in Index tab of the HTML page
Uses get_bookmark.xsl transform.
./get_html.sh $lang $productVersion $workDir $local $fileTree
Creates the HTML pages from localized XHP files
local: is local or website (yes/no)
If local="yes", the filetree should be $(installDir)
else (i.e. website), root file tree should be '/'
fileTree: is root file tree for $local=yes
If local = yes, then language selector, PIWIK probe
and global search services are removed.
Uses: online_transform.xsl transform
./get_tree.sh $lang $productVersion $workDir
Creates the contents.js from localized TREE files
Visible in Contents tab of the HTML page
Uses get_tree.xsl transform
./get_media.sh $lang $productVersion $workDir
Copy several auxiliary files for navigation
Copy HC2 media files
Copy galaxy icon theme for HTML pages
* minor change in file name hid2file.js
Added 2 more small scripts to show how to build local and online
./makelocal.sh
./makeonline.sh
Languages depends on the languages available in
$(WORKDIR)/HelpTranslatePartTarget/, and includes qtz.
will handle special case of en-US later
Change-Id: I0b7fdf5e1460070413eb2303f8d69b2b85a40c3e
Reviewed-on: https://gerrit.libreoffice.org/44114
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'help3xsl/online_transform.xsl')
-rw-r--r-- | help3xsl/online_transform.xsl | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl index 2c1acefdac..6496714215 100644 --- a/help3xsl/online_transform.xsl +++ b/help3xsl/online_transform.xsl @@ -31,12 +31,15 @@ <xsl:param name="productversion"/> <xsl:param name="local" /> <xsl:param name="fileTree"/> +<xsl:param name="root"/> +<xsl:param name="Language"/> + <xsl:param name="productname" select="'LibreOffice'"/> <xsl:param name="System" select="'WIN'"/> <xsl:param name="imgtheme" select="''"/> <xsl:param name="Id" /> -<xsl:param name="Language"/> -<xsl:param name="root"/> + + <!-- General Usage --> <xsl:variable name="am" select="'&'"/> @@ -56,7 +59,7 @@ <!-- Installation --> <xsl:variable name="online" select="$local!='yes'"/> -<xsl:variable name="install" select="concat('file://',$fileTree)"/> +<xsl:variable name="install" select="$fileTree"/> <!-- meta data variables from the help file --> <xsl:variable name="filename" select="/helpdocument/meta/topic/filename"/> @@ -112,14 +115,7 @@ </xsl:variable> <html lang="{$lang}"> <head> - <xsl:choose> - <xsl:when test="$online"> - <base href="/"/> - </xsl:when> - <xsl:otherwise> - <base href="{$install}"/> - </xsl:otherwise> - </xsl:choose> + <base href="{$install}"/> <meta http-equiv="Content-type" content="text/html; charset=utf-8"/> <title><xsl:value-of select="$titleL10N"/></title> <link rel="shortcut icon" href="{$productversion}/media/navigation/favicon.ico" /> |