~openerp-community/openobject-doc/ksa-openobject-doc-6.0

« back to all changes in this revision

Viewing changes to i18n/ru/source/contribute/09_documentation_translation.rst

  • Committer: Don Kirkby
  • Date: 2011-02-21 20:46:11 UTC
  • mfrom: (433.1.53 openobject-doc)
  • Revision ID: donkirkby+launpd@gmail.com-20110221204611-1ykt6dmg4k3gh5dh
[MERGE] revisions 477 to 486 from the 5.0 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
.. i18n: .. _documentation_translation:
 
3
.. i18n: 
 
4
.. i18n: OpenERP Documentation Translation
 
5
.. i18n: =================================
 
6
..
 
7
 
 
8
.. _documentation_translation:
 
9
 
 
10
OpenERP Documentation Translation
 
11
=================================
 
12
 
 
13
.. i18n: Prerequisite
 
14
.. i18n: ------------
 
15
..
 
16
 
 
17
Prerequisite
 
18
------------
 
19
 
 
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.
 
23
..
 
24
 
 
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
 
27
know how to use it.
 
28
 
 
29
.. i18n: If this is not the case, please read about :ref:`building_documentation` in the
 
30
.. i18n: Community Guide.
 
31
..
 
32
 
 
33
If this is not the case, please read about :ref:`building_documentation` in the
 
34
Community Guide.
 
35
 
 
36
.. i18n: You can download the sources of the documentation from launchpad:
 
37
..
 
38
 
 
39
You can download the sources of the documentation from launchpad:
 
40
 
 
41
.. i18n:   bzr branch lp:openobject-doc
 
42
..
 
43
 
 
44
  bzr branch lp:openobject-doc
 
45
 
 
46
.. i18n: Understanding the directory structure
 
47
.. i18n: -------------------------------------
 
48
..
 
49
 
 
50
Understanding the directory structure
 
51
-------------------------------------
 
52
 
 
53
.. i18n: We are supposing that **<openobject-doc>** is the root of the Open Object
 
54
.. i18n: documentation bazaar branch.
 
55
..
 
56
 
 
57
We are supposing that **<openobject-doc>** is the root of the Open Object
 
58
documentation bazaar branch.
 
59
 
 
60
.. i18n: The *untranslated sources* are located in **<openobject-doc>/source**.
 
61
..
 
62
 
 
63
The *untranslated sources* are located in **<openobject-doc>/source**.
 
64
 
 
65
.. i18n: The translated documentation will be located in **<openobject-doc>>/i18n/<lang>/source**.
 
66
..
 
67
 
 
68
The translated documentation will be located in **<openobject-doc>>/i18n/<lang>/source**.
 
69
 
 
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.
 
73
..
 
74
 
 
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.
 
78
 
 
79
.. i18n: Summary
 
80
.. i18n: +++++++
 
81
..
 
82
 
 
83
Summary
 
84
+++++++
 
85
 
 
86
.. i18n: .. csv-table::
 
87
.. i18n:     :header: "Directory", "Description"
 
88
.. i18n:     :widths: 5,5
 
89
.. i18n: 
 
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
 
93
..
 
94
 
 
95
.. csv-table::
 
96
    :header: "Directory", "Description"
 
97
    :widths: 5,5
 
98
 
 
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
 
102
 
 
103
.. i18n: Creating the translation directory structure
 
104
.. i18n: --------------------------------------------
 
105
..
 
106
 
 
107
Creating the translation directory structure
 
108
--------------------------------------------
 
109
 
 
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.
 
112
..
 
113
 
 
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.
 
116
 
 
117
.. i18n: For example, supposing you want to translate the documentation in french: ::
 
118
.. i18n: 
 
119
.. i18n:   make i18n LANG=fr
 
120
..
 
121
 
 
122
For example, supposing you want to translate the documentation in french: ::
 
123
 
 
124
  make i18n LANG=fr
 
125
 
 
126
.. i18n: This command will do several things:
 
127
..
 
128
 
 
129
This command will do several things:
 
130
 
 
131
.. i18n: * create these directories, if they does not exist yet:
 
132
.. i18n: 
 
133
.. i18n:   * i18n
 
134
.. i18n:   * i18n/fr
 
135
.. i18n:   * i18n/fr/source
 
136
.. i18n:   * i18n/fr/build
 
137
.. i18n: 
 
138
.. i18n: * copy files in *i18n/fr/* required for the html build:
 
139
.. i18n: 
 
140
.. i18n:   * MakeFile
 
141
.. i18n:   * conf.py
 
142
.. i18n: 
 
143
.. i18n: * create the *translation templates* based on the untranslated restructured text files. They will be created in *i18n/fr/source*
 
144
.. i18n: 
 
145
.. i18n: * copy all the other necessary files (images for example)
 
146
..
 
147
 
 
148
* create these directories, if they does not exist yet:
 
149
 
 
150
  * i18n
 
151
  * i18n/fr
 
152
  * i18n/fr/source
 
153
  * i18n/fr/build
 
154
 
 
155
* copy files in *i18n/fr/* required for the html build:
 
156
 
 
157
  * MakeFile
 
158
  * conf.py
 
159
 
 
160
* create the *translation templates* based on the untranslated restructured text files. They will be created in *i18n/fr/source*
 
161
 
 
162
* copy all the other necessary files (images for example)
 
163
 
 
164
.. i18n: Translation templates
 
165
.. i18n: ---------------------
 
166
..
 
167
 
 
168
Translation templates
 
169
---------------------
 
170
 
 
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: ::
 
173
.. i18n: 
 
174
.. i18n:   .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
 
175
.. i18n:   .. i18n: Open Object Documentation
 
176
.. i18n:   .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
 
177
.. i18n: 
 
178
.. i18n:   %%%%%%%%%%%%%%%%%%%%%%%%%
 
179
.. i18n:   Open Object Documentation
 
180
.. i18n:   %%%%%%%%%%%%%%%%%%%%%%%%%
 
181
..
 
182
 
 
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: ::
 
185
 
 
186
  .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
 
187
  .. i18n: Open Object Documentation
 
188
  .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
 
189
 
 
190
  %%%%%%%%%%%%%%%%%%%%%%%%%
 
191
  Open Object Documentation
 
192
  %%%%%%%%%%%%%%%%%%%%%%%%%
 
193
 
 
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
 
196
.. i18n: section.
 
197
..
 
198
 
 
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
 
201
section.
 
202
 
 
203
.. i18n: And here is the translated section: ::
 
204
.. i18n: 
 
205
.. i18n:   .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
 
206
.. i18n:   .. i18n: Open Object Documentation
 
207
.. i18n:   .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
 
208
.. i18n: 
 
209
.. i18n:   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
210
.. i18n:   Documentation sur Open Object
 
211
.. i18n:   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
212
..
 
213
 
 
214
And here is the translated section: ::
 
215
 
 
216
  .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
 
217
  .. i18n: Open Object Documentation
 
218
  .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
 
219
 
 
220
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
221
  Documentation sur Open Object
 
222
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
223
 
 
224
.. i18n: Managing source changes
 
225
.. i18n: -----------------------
 
226
..
 
227
 
 
228
Managing source changes
 
229
-----------------------
 
230
 
 
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.
 
234
..
 
235
 
 
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
 
238
translation.
 
239
 
 
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*.
 
243
..
 
244
 
 
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*.
 
248
 
 
249
.. i18n: Building the documentation in your language
 
250
.. i18n: -------------------------------------------
 
251
..
 
252
 
 
253
Building the documentation in your language
 
254
-------------------------------------------
 
255
 
 
256
.. i18n: That is very simple because the directory and file structure is exactly the
 
257
.. i18n: same as the original structure: ::
 
258
.. i18n: 
 
259
.. i18n:   i18n
 
260
.. i18n:   `-- fr
 
261
.. i18n:       |-- build
 
262
.. i18n:       `-- source
 
263
..
 
264
 
 
265
That is very simple because the directory and file structure is exactly the
 
266
same as the original structure: ::
 
267
 
 
268
  i18n
 
269
  `-- fr
 
270
      |-- build
 
271
      `-- source
 
272
 
 
273
.. i18n: For example, in *i18n/fr*, you just have to do a simple *make*::
 
274
.. i18n: 
 
275
.. i18n:   make html
 
276
..
 
277
 
 
278
For example, in *i18n/fr*, you just have to do a simple *make*::
 
279
 
 
280
  make html
 
281
 
 
282
.. i18n: And the html documentation will be built in *i18n/fr/build/html*.
 
283
..
 
284
 
 
285
And the html documentation will be built in *i18n/fr/build/html*.
 
286
 
 
287
.. i18n: Uploading to Launchpad
 
288
.. i18n: ----------------------
 
289
..
 
290
 
 
291
Uploading to Launchpad
 
292
----------------------
 
293
 
 
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>`_.
 
297
..
 
298
 
 
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>`_.
 
302
 
 
303
.. i18n: To upload your modifications, you should commit on launchpad:
 
304
..
 
305
 
 
306
To upload your modifications, you should commit on launchpad:
 
307
 
 
308
.. i18n:   bzr add YOUR_NEW_FILES_OR_DIR
 
309
.. i18n:   bzr ci
 
310
.. i18n:   bzr push
 
311
..
 
312
 
 
313
  bzr add YOUR_NEW_FILES_OR_DIR
 
314
  bzr ci
 
315
  bzr push
 
316
 
 
317
.. i18n: Status
 
318
.. i18n: ------
 
319
..
 
320
 
 
321
Status
 
322
------
 
323
 
 
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.
 
327
..
 
328
 
 
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.