2003-03-23 23:26:55 +00:00
|
|
|
The documentation and its translations reside in subdirectories.
|
|
|
|
When building the documentation, the toplevel Makefile goes into
|
|
|
|
the subdirectories listed in the SUBDIRS variable and executes make
|
|
|
|
in each of those directories to create the HTML documentation
|
2003-10-21 09:31:04 +00:00
|
|
|
in subdirectories of the 'HTML' and 'HTML-single' directories.
|
2003-03-23 23:26:55 +00:00
|
|
|
|
2003-10-21 09:31:04 +00:00
|
|
|
IMPORTANT: Do NOT place sensitive files under 'HTML' or 'HTML-single'!
|
2003-03-23 23:26:55 +00:00
|
|
|
It is for generated documentation only.
|
|
|
|
The whole directory tree is wiped out by the Makefile
|
2003-10-21 10:26:00 +00:00
|
|
|
when running 'make distclean' or 'make clean'.
|
2003-03-23 23:26:55 +00:00
|
|
|
Also, subdirectories are wiped out one by one before
|
|
|
|
creating the HTML files.
|
|
|
|
|
|
|
|
Each subdirectory must have a Makefile. Its purpose is to include
|
|
|
|
the toplevel Makefile.inc file (with the rules to build the docs)
|
|
|
|
and add dependency information to the main target, $(HTMLDIR)/index.html.
|
|
|
|
The main target usually depends on all the XML and XSL files in the
|
|
|
|
subdirectory. (Note that the toplevel *.xsl files are added automatically
|
|
|
|
by Makefile.inc, so you do not have to list them.)
|
|
|
|
|
|
|
|
|
|
|
|
Adding new translations
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2006-05-09 13:49:15 +00:00
|
|
|
1) Create a new subdirectory and copy the XML files there. main.xml must not be
|
|
|
|
copied, it is autogenerated.
|
2003-10-21 01:32:34 +00:00
|
|
|
|
2003-03-23 23:26:55 +00:00
|
|
|
2) Make sure to create a 'Makefile' for the translation -- you can
|
|
|
|
use 'en/Makefile' as an example.
|
2003-10-21 01:32:34 +00:00
|
|
|
|
2006-12-17 08:41:25 +00:00
|
|
|
3) If you want to use a customized XSL stylesheet, create one and name it
|
2003-10-21 14:57:41 +00:00
|
|
|
'html-common.xsl'. Also create two additional XSL stylesheets
|
|
|
|
('html-single.xsl' and 'html-chunk.xsl'), with content such as this:
|
2003-10-20 09:56:48 +00:00
|
|
|
|
2003-10-21 14:57:41 +00:00
|
|
|
html-single.xsl:
|
2003-10-20 09:56:48 +00:00
|
|
|
|
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
|
version="1.0">
|
|
|
|
|
2003-10-21 14:57:41 +00:00
|
|
|
<xsl:import href="../html-single.xsl"/>
|
2003-10-20 09:56:48 +00:00
|
|
|
<xsl:include href="html-common.xsl"/>
|
|
|
|
|
|
|
|
</xsl:stylesheet>
|
|
|
|
|
|
|
|
html-chunk.xsl:
|
2006-05-09 13:49:15 +00:00
|
|
|
|
2003-10-20 09:56:48 +00:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
|
version="1.0">
|
|
|
|
|
|
|
|
<xsl:import href="../html-chunk.xsl"/>
|
|
|
|
<xsl:include href="html-common.xsl"/>
|
|
|
|
|
|
|
|
</xsl:stylesheet>
|
2003-03-23 23:26:55 +00:00
|
|
|
|
2003-10-15 20:54:38 +00:00
|
|
|
|
2003-10-16 12:04:12 +00:00
|
|
|
Note: You mustn't xsl:include or xsl:import chunk.xsl directly!
|
|
|
|
Including it can (and will) break building of documentation if chunk.xsl
|
|
|
|
is installed at a nonstandard location.
|
2003-10-21 01:32:34 +00:00
|
|
|
|
2006-12-17 08:41:25 +00:00
|
|
|
4) If you wish to change the output encoding of generated files, create
|
2003-10-21 01:32:34 +00:00
|
|
|
html-common.xsl as suggested in step 4) and add strings such as these
|
|
|
|
somewhere between the <xsl:stylesheet ...> and </xsl:stylesheet> tags
|
2003-10-20 09:56:48 +00:00
|
|
|
(please, pay attention to quotes):
|
2003-03-23 23:26:55 +00:00
|
|
|
|
2003-09-21 13:01:25 +00:00
|
|
|
<xsl:param name="chunker.output.encoding" select="'your_encoding'"/>
|
2003-10-20 09:56:48 +00:00
|
|
|
<xsl:output encoding="your_encoding"/>
|
|
|
|
|
2006-12-17 08:41:25 +00:00
|
|
|
5) If you are using your own HTML stylesheet, edit your Makefile and set
|
2003-10-21 01:32:34 +00:00
|
|
|
the HTML_STYLESHEET variable to its name. Please, don't call your HTML
|
|
|
|
stylesheet 'default.css'.
|
|
|
|
|
2006-12-17 08:41:25 +00:00
|
|
|
6) In each translated file after the <?xml ... ?> tag you must put a note
|
2006-12-17 08:42:37 +00:00
|
|
|
like <!-- synced with r2 -->, where 2 is the revision of corresponding
|
2003-09-22 08:24:37 +00:00
|
|
|
English file (see comment at the top of file).
|
2003-10-21 01:32:34 +00:00
|
|
|
|
2006-12-17 08:41:25 +00:00
|
|
|
7) While your translation isn't finished, you can change USE_SYMLINKS
|
2003-10-08 06:57:33 +00:00
|
|
|
to "yes" in your Makefile. This will help you testing your translation:
|
2005-06-20 08:51:22 +00:00
|
|
|
English files will be used instead of untranslated ones, when generating
|
2003-10-08 06:57:33 +00:00
|
|
|
HTML docs.
|
2003-09-22 08:24:37 +00:00
|
|
|
|
2003-03-23 23:26:55 +00:00
|
|
|
That's all, in theory.
|