root/branches/new_fx_rack_and_sample_fun/data/doc/README.DOCUMENTATION.txt @ 1036

Revision 1036, 11.5 KB (checked in by wolke, 4 years ago)

merge 986:1035 from trunk

RevLine 
[998]1------------------------------------------------------------------------------
2                       H Y D R O G E N          Drum machine
3------------------------------------------------------------------------------
4
5HYDROGEN DOCUMENTATION
6======================
7
8Contents:
9
101. Overview
112. Tools, Supported Platforms, and Releases
123. Translators
134. Documentors
145. Developers
156. XML and Validation
167. INSTALL.txt Changelog
17
181. Overview
19-----------
20
21Hydrogen documentation is maintained in DocBook 4.0 (XML) and
22translated to HTML before release.  Different translations are managed
23through GNU gettext PO files.  When the documentation is generated,
24the PO files and the master documentation are merged to create the doc
25for that specific language.
26
27This document is split up into the three types of people who may want
28to contribute to Hydrogen documentation:  Translators, Documentors,
29and Developers.  A section is devoted to each one, individually.
30
31This document assumes that you don't know much, and tries to give you
32pointers to the stuff you need to know.
33
342. Tools, Supported Platforms, and Releases
35-------------------------------------------
36
37The following tools are used to maintain and process the
38documentation.  Depending on what you're working on, you may not need
39all (or any) of these.
40
41    xml2po - Creates and updates the translation templates (*.pot) and
42    translation files (*.po) based on the original DocBook source.[1]
43
44    po2xml - Merges the master DocBook source with a translation file
45    (*.po) to create a translated DocBook file.[1]
46
47    xmlto - Converts DocBook files to HTML.  (Note that xmlto can
48    convert DocBook to much more than just HTML.)[2]
49
50    xmllint - Used to validate the DocBook files against the DocBook
51    DTD.[3]
52
53    make - GNU's make utility.
54
55As it happens, these tools are all very easy to install on Linux,
56being a part of the core toolchains for KDE, Gnome, Debian, etc.
57However, these tools are not as easy to set up on non-Linux platforms.
58Furthermore, it is undesireable to add these to the list of build
59dependencies for Hydrogen.
60
61Therefore, these files will be processed before making a release of
62Hydrogen, and the generated HTML output will become a part of the
63distribution.
64
65[1] xml2po and po2xml are part of poxml, which is in the KDE SDK.
[1036]66    http://www.kde.org/.  The Makefile is set up for the KDE3 version.
[998]67[2] xmlto is a convenient front-end to an XSLT processor.
68    http://cyberelk.net/tim/software/xmlto/
69[3] xmllint is part of libxml http://xmlsoft.org/
70
713. Translators
72--------------
73
74To translate documentation for Hydrogen you will need:
75
76    * To understand XML, and enough DocBook to be dangerous.
77
78    * A PO-file editor.  (Note that a text editor works fine, but a
79      translation assistant like KBabel is better.)
80
81    * To be able to read and understand English.
82
83If you don't have all the tools listed in Section 2, that's OK.  Ask
84the Hydrogen Developer list and someone there can process files for
85you.
86
87To make a new translation of the Hydrogen manual or tutorial, simply
88copy the template and get started:
89
90    $ cp manual.pot manual_ja.po
91
92Note that the _ZZ is added, and ZZ is the IANA abbreviation code for
93that language.  (E.g. 'ja' is for 'Japanese.')  The registry for the
94codes is located here:
95
96    http://www.iana.org/assignments/language-subtag-registry
97
98If a translation already exists, but needs to be updated, you can
99update the .po file like this:
100
101    $ touch manual.docbook
102    $ make manual_es.po
103
104You can either see the changes using 'diff' or your translation
105editor.
106
107When you want to check your translation (and view it in HTML), this
108can be done like this:
109
110    $ make manual_ja.html
111
112NOTICE:  Before creating the HTML file, the document will be
113validated.  If the document does not validate, you will have to alter
114your translation file so that the output is a valid DocBook document.
115For more information on Validation, see Section 6.
116
117RULES AND GUIDELINES FOR TRANSLATING:
118
119    * No new content.  New content must be first added to the master
120      (English) manual, and then translated to all the other manuals.
121
122    * Maintain the DocBook XML structure as closely as possible.  Do
123      not add sections, divide paragraphs, or alter the markup
124      significantly.
125
126    * The English translation uses a little humor to try to keep the
127      reading interesting.  When this happens, the language and idioms
128      being used are very cultural.  Please do *NOT* translate the
129      words literally.  Instead, please translate the ideas to your
[1011]130      culture as you see fit.  We've asked the Documentors to mark
131      when this is happening so that you don't miss the joke.  This
132      should show up in the PO file.
[998]133
[1011]134    * If your culture doesn't like American-style informal writing,
135      please feel free to make a humor-less translation.
136
[998]137    * Submit translations to the Hydrogen Developers list
138      (hydrogen-devel@lists.sourceforge.net)
139
1404. Documentors
141--------------
142
143The master Hydrogen Manual and Tutorial are in English.  All new
144content and major revisions shall be done there first.  In order to
145work on the documentation, you will need:
146
147    * To know and understand XML and DocBook well.
148
149    * To know and understand Hydrogen well enough to *ask*
150      *questions*.
151
152    * An XML editor (note: any text editor will do).
153
154    * An XML validator (e.g. xmllint, xsltproc, Xalan)
155
156    * A way to create PNG images.  (e.g. GIMP, PhotoShop)
157
[1011]158What you write is pretty much your own style.  Please *do* keep the
159text interesting to read by using wit and a more familiar
160conversational style.  If you are using an English pun or expression
161that is intended to convey humor, please mark it so that the
162translator gets the joke:
163
164    <!-- TRANSLATORS: "Have your squash and eat it, too." This
165    combines a well-known cliche ("Have your cake and eat it, too.")
166    and a pun on the word "squash."  In English, "squash" is a
167    vegetable (and not a very popular one) and "squash" is also a verb
168    meaning "to flatten in a destructive way."  For example: "I
169    squashed the bug to kill it." -->
170
171(Ahem, don't ask me how I came up with that one.....)
172
[998]173Before submitting (or committing) your changes, please make sure that
174your documents validate (see Section 6 below).  Some guidelines:
175
176    * Use double-quotes for all attributes.
177          Good:   <foo id="bar"/>
178          Bad:    <foo id='bar'/>
179      Reason:  po2xml chokes on them.
180
181    * Please make good use of <xref> tags for internal links within
182      the document.
183
184    * Since we're using <xref>'s -- if you change an id=".."
185      attribute, make sure that you change all its references, too.
186      If you create a broken link, the document won't validate.
187
188    * Do not make reference to specific section numbers, figure
189      numbers, or titles (e.g. "See section 2.1.3 The Menu Bar").
190      Instead, use <xref> tags so that this text will be generated for
191      you.
192
193    * For italics, you do not need to set the role="italic" attribute,
194      since that is the default.  To get boldface, you must use
195      role="bold".
196          Example:  <emphasis role="bold">really</emphasis>
197          Bad:      <emphasis rold="italic">might</emphasis>
198
199    * For web links, don't write the URL twice.  The processor will do
200      that for you, and it makes it more readable.
201          Good:     <ulink url="http://www.google.com"/>
202          Bad:      <ulink url="http://www.google.com">http://www.google.com</ulink>
203
204    * Don't worry about typesetting in the DocBook documents.  That's
205      what XSL and CSS stylesheets are for.  Get the content done, and
206      then worry about formatting.  Don't get distracted by stuff like
207      section indents or relative font sizes.
208
209    * However, *do* worry about typesetting on pre-formatted tags like
210      <screen> and <code> and <literallayout>.  Extra spaces and
211      indents in the source document *will* carry through all the way
212      to the final document.
213
2145. Developers
215-------------
216
[1036]217Since we don't want to add xmlto, poxml, xmllint, and the DocBook
218DTD's to our normal build requirements: All HTML files need to be
219generated and committed before releasing.  After the release, the
220generated HTML files can (and should) be deleted.  Do not commit the
221generated DocBook documents.
222
[998]223If you are preparing a Hydrogen release, you must have all the tools
[1036]224listed above so that you can process the documents.  You may also need
225to understand DocBook enough to help a translator with validation
226issues.  (See Section 6 below.)
[998]227
[1036]228The reason for doing it this way is that (as of this writing) xmlto,
229poxml, xmllint, and DocBook are not very portable across Linux, Mac,
230and Windows.  Nor or they even very portable across different Linux
231distributions.  However, the tools are fairly stable on Debian/Ubuntu
232-- which most of the current developers are using.
233
[998]2346. XML and Validation
235---------------------
236
237You've probably written HTML before, and found it pretty easy.  HTML
238is an application of something bigger called SGML.  However, SGML very
239difficult to implement reliably.  ("Best viewed on Netscape
240Navigator(TM)!!")  Because of this, XML was developed as a replacement
241to SGML.  To read more about XML, check out the Wikipedia article:
242
243    http://en.wikipedia.org/wiki/XML
244
245It's very much like HTML except that:
246
247    * The tags are case sensitive.  <IMG> and <img> are the same in
248      HTML, but in XML they are considered different.
249
250    * Closing tags are not optional.  In HTML you could start a
251      paragraph with a <P>, and then start a new one by putting
252      another <P>.  The closing tag </P> is implied.  In XML, you must
253      include the closing tag:
254
255          <p>"Knock, knock."</p>
256          <p>"Who's there?"</p>
257
258    * Empty tags are like this:  <br/>.  (In HTML they didn't have the
259      forward slash.)
260
261If a document follows all the rules of XML, it is called
262"Well-Formed."  For example, the following is a well-formed XML
263document:
264
265    <?xml version='1.0' encoding='UTF-8'?>
266    <ijustmadethistagup>
267       <because>It's</because><ok/> to <make it="up">as</make>
268       you go</ijustmadethistagup>
269
270But the following is *NOT* a well-formed XML document:
271
272    <?xml version='1.0' encoding='UTF-8'?>
273    <ijustmadethistagup>
274       <because>It's <ok/> to <make it=up>as</make>
275       you go</ijustmadethistagup>
276
277(Can you find the errors?  If you get stumped, feed it to a
278validator.)
279
280While it's imperative that documents be well-formed, many documents
281(such as DocBook) have a specific structure that must be maintained.
282For example, in HTML you should only have paragraphs inside of the
283body:
284
285    <body>
286       <p>I am the very model of a modern
287        major general.</p>
288    </body>
289
290But, if I do this, it will still be well-formed XML:
291
292    <p>
293       <body>I am the <happy>very</happy> model of a modern
294        major general.</body>
295    </p>
296
297It is not, however, a Valid HTML document.  The W3C published a DTD
298(Document Type Definition) for HTML that clearly specifies that the
299former is OK and the latter is degenerate.
300
301When a document is checked against the DTD, it is said to be "Valid"
302or "Validated" if it passes all the requirements of the DTD.
303
304Validation is important, because our DocBook source files are going to
305be _processed_ by several automatic tools.  These tools know the
306structure of DocBook, and are able to generate output based on that.
307However, if we feed them an invalid document, the tools may process
308the data -- but they probably won't process it *right*.
309
3107. README.DOCUMENTATION.txt Changelog
311-------------------------------------
312
3132009-04-09 Gabriel M. Beddingfield <gabriel@teuton.org>
314        * Create README.DOCUMENTATION.txt
Note: See TracBrowser for help on using the browser.