diff --git a/docs/en-US/Developers_Guide.xml b/docs/en-US/Developers_Guide.xml index 6c09354f6a8..e753f9bcb33 100644 --- a/docs/en-US/Developers_Guide.xml +++ b/docs/en-US/Developers_Guide.xml @@ -50,6 +50,7 @@ + diff --git a/docs/en-US/building-documentation.xml b/docs/en-US/building-documentation.xml new file mode 100644 index 00000000000..484826604fa --- /dev/null +++ b/docs/en-US/building-documentation.xml @@ -0,0 +1,40 @@ + + +%BOOK_ENTITIES; +]> + + + +
+ Building &PRODUCT; Documentation + To build a specific guide, go to the source tree of the documentation in /docs and identify the guide you want to build. + Currenlty there are four guides plus the release notes, all defined in publican configuration files: + + publican-adminguide.cfg + publican-devguide.cfg + publican-installation.cfg + publican-plugin-niciranvp.cfg + publican-release-notes.cfg + + To build the Developer guide for example, do the following: + publican build --config=publican-devguide.cfg --formats=pdf --langs=en-US + A pdf file will be created in tmp/en-US/pdf, you may choose to build the guide in a different format like html. In that case just replace the format value. + +
diff --git a/docs/en-US/building-translation.xml b/docs/en-US/building-translation.xml new file mode 100644 index 00000000000..659c55ffc5e --- /dev/null +++ b/docs/en-US/building-translation.xml @@ -0,0 +1,75 @@ + + +%BOOK_ENTITIES; +]> + + + +
+ Translating &PRODUCT; Documentation + Now that you know how to build the documentation with Publican, let's move on to building it in different languages. Publican helps us + build the documentation in various languages by using Portable Object Template (POT) files and Portable Objects (PO) files for each language. + + The POT files are generated by parsing all the DocBook files in the language of origin, en-US for us, and creating a long list of strings + for each file that needs to be translated. The translation can be done by hand directly in the PO files of each target language or via the + transifex service. + + + Transifex is a free service to help translate documents and organize distributed teams + of translators. Anyone interested in helping with the translation should get an account on Transifex + + + Three &PRODUCT; projects exist on Transifex. It is recommended to tour those projects to become familiar with Transifex: + + https://www.transifex.com/projects/p/ACS_DOCS/ + https://www.transifex.com/projects/p/ACS_Runbook/ + https://www.transifex.com/projects/p/CloudStackUI/ + + + + + The pot directory should already exist in the source tree. If you want to build an up to date translation, you might have to update it to include any pot file that was not previously generated. + To register new resources on transifex, you will need to be an admin of the transifex &PRODUCT; site. Send an email to the developer list if you want access. + + First we need to generate the .pot files for all the DocBook xml files needed for a particular guide. This is well explained at the publican website in a section on + how to prepare a document for translation. + The basic command to execute to build the pot files for the developer guide is: + publican update_pot --config=publican-devguide.cfg + This will create a pot directory with pot files in it, one for each corresponding xml files needed to build the guide. Once genereated, all pots files need to be configured for translation using transifex this is best done by using the transifex client that you can install with the following command (For RHEL and its derivatives): + yum install transifex-client + The transifex client is also available via PyPi and you can install it like this: + easy_install transifex-client + Once you have installed the transifex client you can run the settx.sh script in the docs directory. This will create the .tx/config file used by transifex to push and pull all translation strings. + All the resource files need to be uploaded to transifex, this is done with the transifex client like so: + tx push -s + Once the translators have completed translation of the documentation, the translated strings can be pulled from transifex like so: + tx pull -a + If you wish to push specific resource files or pull specific languages translation strings, you can do so with the transifex client. A complete documentation of + the client is available on the client website + When you pull new translation strings a directory will be created corresponding to the language of the translation. This directory will contain PO files that will be used by Publican to create the documentation in that specific language. For example assuming that you pull the French translation whose language code is fr-FR, you will build the documentation with publican: + publican build --config=publican-devguide.cfg --formats=html --langs=fr-FR + + + Some languages like Chinese or Japanese will not render well in pdf format and html should be used. + + + + +
diff --git a/docs/en-US/installing-publican.xml b/docs/en-US/installing-publican.xml new file mode 100644 index 00000000000..9f180aad375 --- /dev/null +++ b/docs/en-US/installing-publican.xml @@ -0,0 +1,46 @@ + + +%BOOK_ENTITIES; +]> + + + +
+ Installing Publican + &PRODUCT; documentation is built using publican. This section describes how to install publican on your own machine so that you can build the documentation guides. + + The &PRODUCT; documentation source code is located under /docs + Publican documentation itself is also very useful. + + On RHEL and RHEL derivatives, install publican with the following command: + yum install publican publican-doc + On Ubuntu, install publican with the following command: + apt-get install publican publican-doc + For other distribution refer to the publican documentation listed above. For latest versions of OSX you may have to install from source and tweak it to your own setup. + Once publican is installed, you need to setup the so-called &PRODUCT; brand defined in the docs/publican-&PRODUCT; directory. + To do so, enter the following commands: + + sudo cp -R publican-cloudstack /usr/share/publican/Common_Content/cloudstack + + If this fails or you later face errors related to the brand files, see the publican documentation. + With publican installed and the &PRODUCT; brand files in place, you should be able to build any documentation guide. + + +
diff --git a/docs/en-US/translating-documentation.xml b/docs/en-US/translating-documentation.xml new file mode 100644 index 00000000000..afe27658f1a --- /dev/null +++ b/docs/en-US/translating-documentation.xml @@ -0,0 +1,38 @@ + + +%BOOK_ENTITIES; +]> + + + +
+ Translating &PRODUCT; Documentation + + There are two ways to translate the documentation: + + + Directly using the Transifex website and using their user interface. + Using the Transifex client and pushing your translated strings to the website. + + + Once a translation is complete, a site admin will pull the translated strings within the &PRODUCT; repository, build the documenation and publish it. + For instructions on how to use the Transifex website see http://sebgoa.blogspot.ch/2012/11/translating-apache-cloudstack-docs-with.html + For instructions on how to use the Transifex client to translate from the command line see http://sebgoa.blogspot.ch/2012/12/using-transifex-client-to-translate.html +
diff --git a/docs/en-US/working-with-documentation.xml b/docs/en-US/working-with-documentation.xml new file mode 100644 index 00000000000..67748427299 --- /dev/null +++ b/docs/en-US/working-with-documentation.xml @@ -0,0 +1,32 @@ + + +%BOOK_ENTITIES; +]> + + + + + Preparing and Building &PRODUCT; Documentation + This chapter describes how to install publican, how to write new documentation and build a guide as well as how to build a translated version of the documentation using transifex + + + + + diff --git a/docs/en-US/writing-new-documentation.xml b/docs/en-US/writing-new-documentation.xml new file mode 100644 index 00000000000..340900e3c60 --- /dev/null +++ b/docs/en-US/writing-new-documentation.xml @@ -0,0 +1,100 @@ + + +%BOOK_ENTITIES; +]> + + + +
+ Writing &PRODUCT; Documentation + &PRODUCT; documentation is written in DocBook xml format. Each guide defined with a publican configuration file refers to a DocBook book. + These books are defined in xml files in docs/en-US, for instance if we look at the Developers guide, its configuration file contains: + + xml_lang: en-US + type: Book + docname: Developers_Guide + brand: cloudstack + chunk_first: 1 + chunk_section_depth: 1 + + The docname key gives you the basename of the DocBook file located in the en-US directory that contains the description of the book. + Looking closely at Developers_Guide.xml we see that it contains book tags and several references to other xml files. These are the chapters of the book, currently they are: + + + + + + + + + + + + + + ]]> + + All these xml files are written in DocBook format. + + DocBook format is well documented, refer to the documentation for any questions about DocBook tags + + When writing documentation, you therefore need to located the book,chapter and section of the content you want to write/correct. + Or create a new book,chapter,section. + You will then learn much more about DocBook tagging. In order to write this chapter about documentation, I added the working-with-documentation.xmlfile describing a chapter in the Developer book and I created several sections within that chapter like so: + + + Preparing and Building &PRODUCT; Documentation + This chapter describes how to install publican, how to write new documentation and build a guide as well as how to build a translated version of the documentation using transifex + + + + + + ]]> + + + Note the id witin the chapter tag, it represents the basename of the xml file describing the chapter. + For translation purposes it is important that this basename be less than 50 characters long. + + This chapter also refers to xml files which contains each section. While you could embed the sections directly in the chapter file and as a matter of fact also write the chapters within a single book file. Breaking things up in smaller files at the granularity of the section, allows us to re-use any section to build different books. + For completeness here is an example of a section: + + + Building &PRODUCT; Documentation + To build a specific guide, go to the source tree of the documentation in /docs and identify the guide you want to build. + Currenlty there are four guides plus the release notes, all defined in publican configuration files: + + publican-adminguide.cfg + publican-devguide.cfg + publican-installation.cfg + publican-plugin-niciranvp.cfg + publican-release-notes.cfg + + To build the Developer guide for example, do the following: + publican build --config=publican-devguide.cfg --formats=pdf --langs=en-US + A pdf file will be created in tmp/en-US/pdf, you may choose to build the guide in a different format like html. In that case just replace the format value. +
+ ]]> + + Happy Publicaning and DocBooking. +