2
.. i18n: .. _documentation_translation:
4
.. i18n: OpenERP Documentation Translation
5
.. i18n: =================================
8
.. _documentation_translation:
10
OpenERP Documentation Translation
11
=================================
20
.. i18n: You should be able to build the untranslated documentation. So `Sphinx
21
.. i18n: <http://sphinx.pocoo.org>`_ should be installed on your system and you should
22
.. i18n: know how to use it.
25
You should be able to build the untranslated documentation. So `Sphinx
26
<http://sphinx.pocoo.org>`_ should be installed on your system and you should
29
.. i18n: If this is not the case, please read about :ref:`building_documentation` in the
30
.. i18n: Community Guide.
33
If this is not the case, please read about :ref:`building_documentation` in the
36
.. i18n: You can download the sources of the documentation from launchpad:
39
You can download the sources of the documentation from launchpad:
41
.. i18n: bzr branch lp:openobject-doc
44
bzr branch lp:openobject-doc
46
.. i18n: Understanding the directory structure
47
.. i18n: -------------------------------------
50
Understanding the directory structure
51
-------------------------------------
53
.. i18n: We are supposing that **<openobject-doc>** is the root of the Open Object
54
.. i18n: documentation bazaar branch.
57
We are supposing that **<openobject-doc>** is the root of the Open Object
58
documentation bazaar branch.
60
.. i18n: The *untranslated sources* are located in **<openobject-doc>/source**.
63
The *untranslated sources* are located in **<openobject-doc>/source**.
65
.. i18n: The translated documentation will be located in **<openobject-doc>>/i18n/<lang>/source**.
68
The translated documentation will be located in **<openobject-doc>>/i18n/<lang>/source**.
70
.. i18n: For example, the documentation in french will be
71
.. i18n: located in **<openobject-doc>/i18n/fr/source** and it will be built
72
.. i18n: in **<openobject-doc>/i18n/fr/build/html** for example.
75
For example, the documentation in french will be
76
located in **<openobject-doc>/i18n/fr/source** and it will be built
77
in **<openobject-doc>/i18n/fr/build/html** for example.
86
.. i18n: .. csv-table::
87
.. i18n: :header: "Directory", "Description"
90
.. i18n: <openobject-doc>/source,untranslated sources
91
.. i18n: <openobject-doc>/i18n/<lang>/source,translated sources
92
.. i18n: <openobject-doc>/i18n/<lang>/build/html,translated documentation in html
96
:header: "Directory", "Description"
99
<openobject-doc>/source,untranslated sources
100
<openobject-doc>/i18n/<lang>/source,translated sources
101
<openobject-doc>/i18n/<lang>/build/html,translated documentation in html
103
.. i18n: Creating the translation directory structure
104
.. i18n: --------------------------------------------
107
Creating the translation directory structure
108
--------------------------------------------
110
.. i18n: Use the **make** command (with target **i18n**) to create the translation
111
.. i18n: templates. You'll need to pass the language as an additional parameter to the *make* command.
114
Use the **make** command (with target **i18n**) to create the translation
115
templates. You'll need to pass the language as an additional parameter to the *make* command.
117
.. i18n: For example, supposing you want to translate the documentation in french: ::
119
.. i18n: make i18n LANG=fr
122
For example, supposing you want to translate the documentation in french: ::
126
.. i18n: This command will do several things:
129
This command will do several things:
131
.. i18n: * create these directories, if they does not exist yet:
135
.. i18n: * i18n/fr/source
136
.. i18n: * i18n/fr/build
138
.. i18n: * copy files in *i18n/fr/* required for the html build:
143
.. i18n: * create the *translation templates* based on the untranslated restructured text files. They will be created in *i18n/fr/source*
145
.. i18n: * copy all the other necessary files (images for example)
148
* create these directories, if they does not exist yet:
155
* copy files in *i18n/fr/* required for the html build:
160
* create the *translation templates* based on the untranslated restructured text files. They will be created in *i18n/fr/source*
162
* copy all the other necessary files (images for example)
164
.. i18n: Translation templates
165
.. i18n: ---------------------
168
Translation templates
169
---------------------
171
.. i18n: The template structure for a given file is very simple. Each text section is
172
.. i18n: prepended by the original context. Here is a title, for example: ::
174
.. i18n: .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
175
.. i18n: .. i18n: Open Object Documentation
176
.. i18n: .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
178
.. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
179
.. i18n: Open Object Documentation
180
.. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
183
The template structure for a given file is very simple. Each text section is
184
prepended by the original context. Here is a title, for example: ::
186
.. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
187
.. i18n: Open Object Documentation
188
.. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
190
%%%%%%%%%%%%%%%%%%%%%%%%%
191
Open Object Documentation
192
%%%%%%%%%%%%%%%%%%%%%%%%%
194
.. i18n: The context is a commented section starting with **.. i18n:**. It helps you
195
.. i18n: understand the section in its context. It also helps you remember the original
199
The context is a commented section starting with **.. i18n:**. It helps you
200
understand the section in its context. It also helps you remember the original
203
.. i18n: And here is the translated section: ::
205
.. i18n: .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
206
.. i18n: .. i18n: Open Object Documentation
207
.. i18n: .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
209
.. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
210
.. i18n: Documentation sur Open Object
211
.. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
214
And here is the translated section: ::
216
.. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
217
.. i18n: Open Object Documentation
218
.. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
220
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
221
Documentation sur Open Object
222
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
224
.. i18n: Managing source changes
225
.. i18n: -----------------------
228
Managing source changes
229
-----------------------
231
.. i18n: If someone adds or changes something in the documentation, that section will
232
.. i18n: have to be retranslated but all the other sections will hopefully keep their
233
.. i18n: translation.
236
If someone adds or changes something in the documentation, that section will
237
have to be retranslated but all the other sections will hopefully keep their
240
.. i18n: When you will get the documentation changes with bzr pull (for example), the
241
.. i18n: new sections and some changed sections will be reset to the untranslated text
242
.. i18n: when you will rebuild the translation with *make i18n LANG=fr*.
245
When you will get the documentation changes with bzr pull (for example), the
246
new sections and some changed sections will be reset to the untranslated text
247
when you will rebuild the translation with *make i18n LANG=fr*.
249
.. i18n: Building the documentation in your language
250
.. i18n: -------------------------------------------
253
Building the documentation in your language
254
-------------------------------------------
256
.. i18n: That is very simple because the directory and file structure is exactly the
257
.. i18n: same as the original structure: ::
265
That is very simple because the directory and file structure is exactly the
266
same as the original structure: ::
273
.. i18n: For example, in *i18n/fr*, you just have to do a simple *make*::
278
For example, in *i18n/fr*, you just have to do a simple *make*::
282
.. i18n: And the html documentation will be built in *i18n/fr/build/html*.
285
And the html documentation will be built in *i18n/fr/build/html*.
287
.. i18n: Uploading to Launchpad
288
.. i18n: ----------------------
291
Uploading to Launchpad
292
----------------------
294
.. i18n: Once you have translated a few pages, you should commit back to launchpad.
295
.. i18n: To do this, your launchpad account must be subscribed in the
296
.. i18n: `openobject-community group <http://https://launchpad.net/~openerp-community>`_.
299
Once you have translated a few pages, you should commit back to launchpad.
300
To do this, your launchpad account must be subscribed in the
301
`openobject-community group <http://https://launchpad.net/~openerp-community>`_.
303
.. i18n: To upload your modifications, you should commit on launchpad:
306
To upload your modifications, you should commit on launchpad:
308
.. i18n: bzr add YOUR_NEW_FILES_OR_DIR
313
bzr add YOUR_NEW_FILES_OR_DIR
324
.. i18n: At the moment, this script is in alpha status and has not been thoroughly
325
.. i18n: tested. It should work but expect some bugs to pop up at unexpected times.
326
.. i18n: Contact olt AT openerp.com if you notice some troubles.
329
At the moment, this script is in alpha status and has not been thoroughly
330
tested. It should work but expect some bugs to pop up at unexpected times.
331
Contact olt AT openerp.com if you notice some troubles.