2
How to translate the Open Object Documentation in your language
3
===============================================================
8
You should be able to build the untranslated documentation. So `Sphinx
9
<http://sphinx.pocoo.org>`_ should be installed on your system and you should
12
If this is not the case, please read the `Community Guide's related section
13
<http://doc.openerp.com/contribute/documentation_process.html#building-the-documentation>`_.
15
You can download the sources of the documentation from launchpad:
17
bzr branch lp:openobject-doc
20
Understanding the directory structure
21
-------------------------------------
23
We are supposing that **<openobject-doc>** is the root of the Open Object
24
documentation bazaar branch.
26
The *untranslated sources* are located in **<openobject-doc>/source**.
28
The translated documentation will be located in **<openobject-doc>>/i18n/<lang>/source**.
30
For example, the documentation in french will be
31
located in **<openobject-doc>/i18n/fr/source** and it will be built
32
in **<openobject-doc>/i18n/fr/build/html** for example.
38
:header: "Directory", "Description"
41
<openobject-doc>/source,untranslated sources
42
<openobject-doc>/i18n/<lang>/source,translated sources
43
<openobject-doc>/i18n/<lang>/build/html,translated documentation in html
45
Creating the translation directory structure
46
--------------------------------------------
48
Use the **make** command (with target **i18n**) to create the translation
49
templates. You'll need to pass the language as an additional parameter to the *make* command.
51
For example, supposing you want to translate the documentation in french: ::
55
This command will do several things:
57
* create these directories, if they does not exist yet:
64
* copy files in *i18n/fr/* required for the html build:
69
* create the *translation templates* based on the untranslated restructured text files. They will be created in *i18n/fr/source*
71
* copy all the other necessary files (images for example)
77
The template structure for a given file is very simple. Each text section is
78
prepended by the original context. Here is a title, for example: ::
80
.. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
81
.. i18n: Open Object Documentation
82
.. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
84
%%%%%%%%%%%%%%%%%%%%%%%%%
85
Open Object Documentation
86
%%%%%%%%%%%%%%%%%%%%%%%%%
88
The context is a commented section starting with **.. i18n:**. It helps you
89
understand the section in its context. It also helps you remember the original
92
And here is the translated section: ::
94
.. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
95
.. i18n: Open Object Documentation
96
.. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
98
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
99
Documentation sur Open Object
100
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
102
Managing source changes
103
-----------------------
105
If someone adds or changes something in the documentation, that section will
106
have to be retranslated but all the other sections will hopefully keep their
109
When you will get the documentation changes with bzr pull (for example), the
110
new sections and some changed sections will be reset to the untranslated text
111
when you will rebuild the translation with *make i18n LANG=fr*.
113
Building the documentation in your language
114
-------------------------------------------
116
That is very simple because the directory and file structure is exactly the
117
same as the original structure: ::
124
For example, in *i18n/fr*, you just have to do a simple *make*::
128
And the html documentation will be built in *i18n/fr/build/html*.
130
Uploading to Launchpad
131
----------------------
133
Once you have translated a few pages, you should commit back to launchpad.
134
To do this, your launchpad account must be subscribed in the
135
`openobject-community group <http://https://launchpad.net/~openerp-community>`_.
137
To upload your modifications, you should commit on launchpad:
139
bzr add YOUR_NEW_FILES_OR_DIR
146
At the moment, this script is in alpha status and has not been thoroughly
147
tested. It should work but expect some bugs to pop up at unexpected times.
148
Contact oli AT openerp.com if you notice some troubles.