<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>7.4. Translating CloudStack Documentation</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta name="generator" content="publican 2.8" /><meta name="package" content="Apache_CloudStack-Developers_Guide-4.1.0-it-IT-1-" /><script type="text/javascript" src="../../../../../toc.js"></script><script type="text/javascript">
              addID('Apache_CloudStack');
              
	      addID('Apache_CloudStack.4.1.0');
              
              addID('Apache_CloudStack.4.1.0.books');
	      addID('Apache_CloudStack.4.1.0.Developers_Guide');
              </script><link rel="home" href="index.html" title="Manuale dello Sviluppatore CloudStack" /><link rel="up" href="working-with-documentation.html" title="Capitolo 7. Preparing and Building CloudStack Documentation" /><link rel="prev" href="writing-new-documentation.html" title="7.3. Writing CloudStack Documentation" /><link rel="next" href="tools.html" title="Capitolo 8. Tools" /></head><body class="toc_embeded "><div id="tocdiv" class="toc"><iframe id="tocframe" class="toc" src="../../../../toc.html">This is an iframe, to view it upgrade your browser or enable iframe display.</iframe></div><p id="title"><a class="left" href="http://cloudstack.apache.org"><img src="Common_Content/images/image_left.png" alt="Product Site" /></a><a class="right" href="http://cloudstack.apache.org/docs"><img src="Common_Content/images/image_right.png" alt="Documentation Site" /></a></p><ul class="docnav"><li class="previous"><a accesskey="p" href="writing-new-documentation.html"><strong>Indietro</strong></a></li><li class="next"><a accesskey="n" href="tools.html"><strong>Avanti</strong></a></li></ul><div xml:lang="it-IT" class="section" id="building-translation" lang="it-IT"><div class="titlepage"><div><div><h2 class="title" id="building-translation">7.4. Translating CloudStack Documentation</h2></div></div></div><div class="para">
		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.
	</div><div class="para">
		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.
	</div><div class="note"><div class="admonition_header"><h2>Nota</h2></div><div class="admonition"><div class="para">
			<a href="http://www.transifex.com">Transifex</a> 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
		</div><div class="para">
			Three CloudStack projects exist on Transifex. It is recommended to tour those projects to become familiar with Transifex: 
			<div class="itemizedlist"><ul><li class="listitem"><div class="para">
						<a href="https://www.transifex.com/projects/p/ACS_DOCS/">https://www.transifex.com/projects/p/ACS_DOCS/</a>
					</div></li><li class="listitem"><div class="para">
						<a href="https://www.transifex.com/projects/p/ACS_Runbook/">https://www.transifex.com/projects/p/ACS_Runbook/</a>
					</div></li><li class="listitem"><div class="para">
						<a href="https://www.transifex.com/projects/p/CloudStack_UI/">https://www.transifex.com/projects/p/CloudStackUI/</a>
					</div></li></ul></div>

		</div></div></div><div class="warning"><div class="admonition_header"><h2>Avvertimento</h2></div><div class="admonition"><div class="para">
			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.
		</div><div class="para">
			To register new resources on transifex, you will need to be an admin of the transifex CloudStack site. Send an email to the developer list if you want access.
		</div></div></div><div class="para">
		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 <a href="http://rlandmann.fedorapeople.org/pug/sect-Users_Guide-Preparing_a_document_for_translation.html">prepare</a> a document for translation.
	</div><div class="para">
		The basic command to execute to build the pot files for the developer guide is:
	</div><pre class="programlisting">publican update_pot --config=publican-devguide.cfg</pre><div class="para">
		This will create a pot directory with pot files in it, one for each corresponding xml files needed to build the guide. Once generated, 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):
	</div><pre class="programlisting">yum install transifex-client</pre><div class="para">
		The transifex client is also available via PyPi and you can install it like this:
	</div><pre class="programlisting">easy_install transifex-client</pre><div class="para">
		Once you have installed the transifex client you can run the <span class="emphasis"><em>settx.sh</em></span> script in the <span class="emphasis"><em>docs</em></span> directory. This will create the <span class="emphasis"><em>.tx/config</em></span> file used by transifex to push and pull all translation strings.
	</div><div class="para">
		All the resource files need to be uploaded to transifex, this is done with the transifex client like so:
	</div><pre class="programlisting">tx push -s</pre><div class="para">
		Once the translators have completed translation of the documentation, the translated strings can be pulled from transifex like so:
	</div><pre class="programlisting">tx pull -a</pre><div class="para">
		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 <a href="http://help.transifex.com/features/client/">client</a> website
	</div><div class="para">
		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:
	</div><pre class="programlisting">publican build --config=publican-devguide.cfg --formats=html --langs=fr-FR</pre><div class="warning"><div class="admonition_header"><h2>Avvertimento</h2></div><div class="admonition"><div class="para">
			Some languages like Chinese or Japanese will not render well in pdf format and html should be used.
		</div></div></div><div xml:lang="it-IT" class="section" id="translating-documentation" lang="it-IT"><div class="titlepage"><div><div><h3 class="title" id="translating-documentation">7.4.1. Translating CloudStack Documentation</h3></div></div></div><div class="para">
		There are two ways to translate the documentation:
	</div><div class="para">
		<div class="itemizedlist"><ul><li class="listitem"><div class="para">
					Directly using the Transifex website and using their user interface.
				</div></li><li class="listitem"><div class="para">
					Using the Transifex client and pushing your translated strings to the website.
				</div></li></ul></div>

	</div><div class="para">
		Once a translation is complete, a site admin will pull the translated strings within the CloudStack repository, build the documentation and publish it.
	</div><div class="para">
		For instructions on how to use the Transifex website see <a href="http://sebgoa.blogspot.ch/2012/11/translating-apache-cloudstack-docs-with.html">http://sebgoa.blogspot.ch/2012/11/translating-apache-cloudstack-docs-with.html</a>
	</div><div class="para">
		For instructions on how to use the Transifex client to translate from the command line see <a href="http://sebgoa.blogspot.ch/2012/12/using-transifex-client-to-translate.html">http://sebgoa.blogspot.ch/2012/12/using-transifex-client-to-translate.html</a>
	</div></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="writing-new-documentation.html"><strong>Indietro</strong>7.3. Writing CloudStack Documentation</a></li><li class="up"><a accesskey="u" href="#"><strong>Risali</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Partenza</strong></a></li><li class="next"><a accesskey="n" href="tools.html"><strong>Avanti</strong>Capitolo 8. Tools</a></li></ul></body></html>
