2
.. i18n: How to translate the Open Object Documentation in your language
3
.. i18n: ===============================================================
5
How to translate the Open Object Documentation in your language
6
===============================================================
14
.. i18n: You should be able to build the untranslated documentation. So `Sphinx
15
.. i18n: <http://sphinx.pocoo.org>`_ should be installed on your system and you should
16
.. i18n: know how to use it.
18
You should be able to build the untranslated documentation. So `Sphinx
19
<http://sphinx.pocoo.org>`_ should be installed on your system and you should
22
.. i18n: If this is not the case, please read the `Community Guide's related section
23
.. i18n: <http://doc.openerp.com/contribute/documentation_process.html#building-the-documentation>`_.
25
If this is not the case, please read the `Community Guide's related section
26
<http://doc.openerp.com/contribute/documentation_process.html#building-the-documentation>`_.
28
.. i18n: You can download the sources of the documentation from launchpad:
30
You can download the sources of the documentation from launchpad:
32
.. i18n: bzr branch lp:openobject-doc
34
bzr branch lp:openobject-doc
36
.. i18n: Understanding the directory structure
37
.. i18n: -------------------------------------
39
Understanding the directory structure
40
-------------------------------------
42
.. i18n: We are supposing that **<openobject-doc>** is the root of the Open Object
43
.. i18n: documentation bazaar branch.
45
We are supposing that **<openobject-doc>** is the root of the Open Object
46
documentation bazaar branch.
48
.. i18n: The *untranslated sources* are located in **<openobject-doc>/source**.
50
The *untranslated sources* are located in **<openobject-doc>/source**.
52
.. i18n: The translated documentation will be located in **<openobject-doc>>/i18n/<lang>/source**.
54
The translated documentation will be located in **<openobject-doc>>/i18n/<lang>/source**.
56
.. i18n: For example, the documentation in french will be
57
.. i18n: located in **<openobject-doc>/i18n/fr/source** and it will be built
58
.. i18n: in **<openobject-doc>/i18n/fr/build/html** for example.
60
For example, the documentation in french will be
61
located in **<openobject-doc>/i18n/fr/source** and it will be built
62
in **<openobject-doc>/i18n/fr/build/html** for example.
70
.. i18n: .. csv-table::
71
.. i18n: :header: "Directory", "Description"
74
.. i18n: <openobject-doc>/source,untranslated sources
75
.. i18n: <openobject-doc>/i18n/<lang>/source,translated sources
76
.. i18n: <openobject-doc>/i18n/<lang>/build/html,translated documentation in html
79
:header: "Directory", "Description"
82
<openobject-doc>/source,untranslated sources
83
<openobject-doc>/i18n/<lang>/source,translated sources
84
<openobject-doc>/i18n/<lang>/build/html,translated documentation in html
86
.. i18n: Creating the translation directory structure
87
.. i18n: --------------------------------------------
89
Creating the translation directory structure
90
--------------------------------------------
92
.. i18n: Use the **make** command (with target **i18n**) to create the translation
93
.. i18n: templates. You'll need to pass the language as an additional parameter to the *make* command.
95
Use the **make** command (with target **i18n**) to create the translation
96
templates. You'll need to pass the language as an additional parameter to the *make* command.
98
.. i18n: For example, supposing you want to translate the documentation in french: ::
100
.. i18n: make i18n LANG=fr
102
For example, supposing you want to translate the documentation in french: ::
106
.. i18n: This command will do several things:
108
This command will do several things:
110
.. i18n: * create these directories, if they does not exist yet:
114
.. i18n: * i18n/fr/source
115
.. i18n: * i18n/fr/build
117
.. i18n: * copy files in *i18n/fr/* required for the html build:
122
.. i18n: * create the *translation templates* based on the untranslated restructured text files. They will be created in *i18n/fr/source*
124
.. i18n: * copy all the other necessary files (images for example)
126
* create these directories, if they does not exist yet:
133
* copy files in *i18n/fr/* required for the html build:
138
* create the *translation templates* based on the untranslated restructured text files. They will be created in *i18n/fr/source*
140
* copy all the other necessary files (images for example)
142
.. i18n: Translation templates
143
.. i18n: ---------------------
145
Translation templates
146
---------------------
148
.. i18n: The template structure for a given file is very simple. Each text section is
149
.. i18n: prepended by the original context. Here is a title, for example: ::
151
.. i18n: .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
152
.. i18n: .. i18n: Open Object Documentation
153
.. i18n: .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
155
The template structure for a given file is very simple. Each text section is
156
prepended by the original context. Here is a title, for example: ::
158
.. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
159
.. i18n: Open Object Documentation
160
.. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
162
.. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
163
.. i18n: Open Object Documentation
164
.. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
166
%%%%%%%%%%%%%%%%%%%%%%%%%
167
Open Object Documentation
168
%%%%%%%%%%%%%%%%%%%%%%%%%
170
.. i18n: The context is a commented section starting with **.. i18n:**. It helps you
171
.. i18n: understand the section in its context. It also helps you remember the original
174
The context is a commented section starting with **.. i18n:**. It helps you
175
understand the section in its context. It also helps you remember the original
178
.. i18n: And here is the translated section: ::
180
.. i18n: .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
181
.. i18n: .. i18n: Open Object Documentation
182
.. i18n: .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
184
And here is the translated section: ::
186
.. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
187
.. i18n: Open Object Documentation
188
.. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
190
.. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
191
.. i18n: Documentation sur Open Object
192
.. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
194
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
195
Documentation sur Open Object
196
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
198
.. i18n: Managing source changes
199
.. i18n: -----------------------
201
Managing source changes
202
-----------------------
204
.. i18n: If someone adds or changes something in the documentation, that section will
205
.. i18n: have to be retranslated but all the other sections will hopefully keep their
206
.. i18n: translation.
208
If someone adds or changes something in the documentation, that section will
209
have to be retranslated but all the other sections will hopefully keep their
212
.. i18n: When you will get the documentation changes with bzr pull (for example), the
213
.. i18n: new sections and some changed sections will be reset to the untranslated text
214
.. i18n: when you will rebuild the translation with *make i18n LANG=fr*.
216
When you will get the documentation changes with bzr pull (for example), the
217
new sections and some changed sections will be reset to the untranslated text
218
when you will rebuild the translation with *make i18n LANG=fr*.
220
.. i18n: Building the documentation in your language
221
.. i18n: -------------------------------------------
223
Building the documentation in your language
224
-------------------------------------------
226
.. i18n: That is very simple because the directory and file structure is exactly the
227
.. i18n: same as the original structure: ::
234
That is very simple because the directory and file structure is exactly the
235
same as the original structure: ::
242
.. i18n: For example, in *i18n/fr*, you just have to do a simple *make*::
246
For example, in *i18n/fr*, you just have to do a simple *make*::
250
.. i18n: And the html documentation will be built in *i18n/fr/build/html*.
252
And the html documentation will be built in *i18n/fr/build/html*.
254
.. i18n: Uploading to Launchpad
255
.. i18n: ----------------------
257
Uploading to Launchpad
258
----------------------
260
.. i18n: Once you have translated a few pages, you should commit back to launchpad.
261
.. i18n: To do this, your launchpad account must be subscribed in the
262
.. i18n: `openobject-community group <http://https://launchpad.net/~openerp-community>`_.
264
Once you have translated a few pages, you should commit back to launchpad.
265
To do this, your launchpad account must be subscribed in the
266
`openobject-community group <http://https://launchpad.net/~openerp-community>`_.
268
.. i18n: To upload your modifications, you should commit on launchpad:
270
To upload your modifications, you should commit on launchpad:
272
.. i18n: bzr add YOUR_NEW_FILES_OR_DIR
276
bzr add YOUR_NEW_FILES_OR_DIR
286
.. i18n: At the moment, this script is in alpha status and has not been thoroughly
287
.. i18n: tested. It should work but expect some bugs to pop up at unexpected times.
288
.. i18n: Contact oli AT openerp.com if you notice some troubles.
290
At the moment, this script is in alpha status and has not been thoroughly
291
tested. It should work but expect some bugs to pop up at unexpected times.
292
Contact oli AT openerp.com if you notice some troubles.