~xrg/openobject-doc/trunk-xrg

« back to all changes in this revision

Viewing changes to i18n/uk/source/contribute/documentation_translation.rst

  • Committer: TruongSinh Tran
  • Date: 2009-07-17 18:59:45 UTC
  • Revision ID: truongsinh@vipescoserver-20090717185945-ajjp3zso6xh5jddm
[FIX]private issue

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
.. i18n: How to translate the Open Object Documentation in your language
 
3
.. i18n: ===============================================================
 
4
 
 
5
How to translate the Open Object Documentation in your language
 
6
===============================================================
 
7
 
 
8
.. i18n: Prerequisite
 
9
.. i18n: ------------
 
10
 
 
11
Prerequisite
 
12
------------
 
13
 
 
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.
 
17
 
 
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
 
20
know how to use it.
 
21
 
 
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>`_.
 
24
 
 
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>`_.
 
27
 
 
28
.. i18n: You can download the sources of the documentation from launchpad:
 
29
 
 
30
You can download the sources of the documentation from launchpad:
 
31
 
 
32
.. i18n:   bzr branch lp:openobject-doc
 
33
 
 
34
  bzr branch lp:openobject-doc
 
35
 
 
36
.. i18n: Understanding the directory structure
 
37
.. i18n: -------------------------------------
 
38
 
 
39
Understanding the directory structure
 
40
-------------------------------------
 
41
 
 
42
.. i18n: We are supposing that **<openobject-doc>** is the root of the Open Object
 
43
.. i18n: documentation bazaar branch.
 
44
 
 
45
We are supposing that **<openobject-doc>** is the root of the Open Object
 
46
documentation bazaar branch.
 
47
 
 
48
.. i18n: The *untranslated sources* are located in **<openobject-doc>/source**.
 
49
 
 
50
The *untranslated sources* are located in **<openobject-doc>/source**.
 
51
 
 
52
.. i18n: The translated documentation will be located in **<openobject-doc>>/i18n/<lang>/source**.
 
53
 
 
54
The translated documentation will be located in **<openobject-doc>>/i18n/<lang>/source**.
 
55
 
 
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.
 
59
 
 
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.
 
63
 
 
64
.. i18n: Summary
 
65
.. i18n: +++++++
 
66
 
 
67
Summary
 
68
+++++++
 
69
 
 
70
.. i18n: .. csv-table::
 
71
.. i18n:     :header: "Directory", "Description"
 
72
.. i18n:     :widths: 5,5
 
73
.. i18n: 
 
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
 
77
 
 
78
.. csv-table::
 
79
    :header: "Directory", "Description"
 
80
    :widths: 5,5
 
81
 
 
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
 
85
 
 
86
.. i18n: Creating the translation directory structure
 
87
.. i18n: --------------------------------------------
 
88
 
 
89
Creating the translation directory structure
 
90
--------------------------------------------
 
91
 
 
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.
 
94
 
 
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.
 
97
 
 
98
.. i18n: For example, supposing you want to translate the documentation in french: ::
 
99
.. i18n: 
 
100
.. i18n:   make i18n LANG=fr
 
101
 
 
102
For example, supposing you want to translate the documentation in french: ::
 
103
 
 
104
  make i18n LANG=fr
 
105
 
 
106
.. i18n: This command will do several things:
 
107
 
 
108
This command will do several things:
 
109
 
 
110
.. i18n: * create these directories, if they does not exist yet:
 
111
.. i18n: 
 
112
.. i18n:   * i18n
 
113
.. i18n:   * i18n/fr
 
114
.. i18n:   * i18n/fr/source
 
115
.. i18n:   * i18n/fr/build
 
116
.. i18n: 
 
117
.. i18n: * copy files in *i18n/fr/* required for the html build:
 
118
.. i18n: 
 
119
.. i18n:   * MakeFile
 
120
.. i18n:   * conf.py
 
121
.. i18n: 
 
122
.. i18n: * create the *translation templates* based on the untranslated restructured text files. They will be created in *i18n/fr/source*
 
123
.. i18n: 
 
124
.. i18n: * copy all the other necessary files (images for example)
 
125
 
 
126
* create these directories, if they does not exist yet:
 
127
 
 
128
  * i18n
 
129
  * i18n/fr
 
130
  * i18n/fr/source
 
131
  * i18n/fr/build
 
132
 
 
133
* copy files in *i18n/fr/* required for the html build:
 
134
 
 
135
  * MakeFile
 
136
  * conf.py
 
137
 
 
138
* create the *translation templates* based on the untranslated restructured text files. They will be created in *i18n/fr/source*
 
139
 
 
140
* copy all the other necessary files (images for example)
 
141
 
 
142
.. i18n: Translation templates
 
143
.. i18n: ---------------------
 
144
 
 
145
Translation templates
 
146
---------------------
 
147
 
 
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: ::
 
150
.. i18n: 
 
151
.. i18n:   .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
 
152
.. i18n:   .. i18n: Open Object Documentation
 
153
.. i18n:   .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
 
154
 
 
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: ::
 
157
 
 
158
  .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
 
159
  .. i18n: Open Object Documentation
 
160
  .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
 
161
 
 
162
.. i18n:   %%%%%%%%%%%%%%%%%%%%%%%%%
 
163
.. i18n:   Open Object Documentation
 
164
.. i18n:   %%%%%%%%%%%%%%%%%%%%%%%%%
 
165
 
 
166
  %%%%%%%%%%%%%%%%%%%%%%%%%
 
167
  Open Object Documentation
 
168
  %%%%%%%%%%%%%%%%%%%%%%%%%
 
169
 
 
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
 
172
.. i18n: section.
 
173
 
 
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
 
176
section.
 
177
 
 
178
.. i18n: And here is the translated section: ::
 
179
.. i18n: 
 
180
.. i18n:   .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
 
181
.. i18n:   .. i18n: Open Object Documentation
 
182
.. i18n:   .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
 
183
 
 
184
And here is the translated section: ::
 
185
 
 
186
  .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
 
187
  .. i18n: Open Object Documentation
 
188
  .. i18n: %%%%%%%%%%%%%%%%%%%%%%%%%
 
189
 
 
190
.. i18n:   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
191
.. i18n:   Documentation sur Open Object
 
192
.. i18n:   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
193
 
 
194
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
195
  Documentation sur Open Object
 
196
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
197
 
 
198
.. i18n: Managing source changes
 
199
.. i18n: -----------------------
 
200
 
 
201
Managing source changes
 
202
-----------------------
 
203
 
 
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.
 
207
 
 
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
 
210
translation.
 
211
 
 
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*.
 
215
 
 
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*.
 
219
 
 
220
.. i18n: Building the documentation in your language
 
221
.. i18n: -------------------------------------------
 
222
 
 
223
Building the documentation in your language
 
224
-------------------------------------------
 
225
 
 
226
.. i18n: That is very simple because the directory and file structure is exactly the
 
227
.. i18n: same as the original structure: ::
 
228
.. i18n: 
 
229
.. i18n:   i18n
 
230
.. i18n:   `-- fr
 
231
.. i18n:       |-- build
 
232
.. i18n:       `-- source
 
233
 
 
234
That is very simple because the directory and file structure is exactly the
 
235
same as the original structure: ::
 
236
 
 
237
  i18n
 
238
  `-- fr
 
239
      |-- build
 
240
      `-- source
 
241
 
 
242
.. i18n: For example, in *i18n/fr*, you just have to do a simple *make*::
 
243
.. i18n: 
 
244
.. i18n:   make html
 
245
 
 
246
For example, in *i18n/fr*, you just have to do a simple *make*::
 
247
 
 
248
  make html
 
249
 
 
250
.. i18n: And the html documentation will be built in *i18n/fr/build/html*.
 
251
 
 
252
And the html documentation will be built in *i18n/fr/build/html*.
 
253
 
 
254
.. i18n: Uploading to Launchpad
 
255
.. i18n: ----------------------
 
256
 
 
257
Uploading to Launchpad
 
258
----------------------
 
259
 
 
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>`_.
 
263
 
 
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>`_.
 
267
 
 
268
.. i18n: To upload your modifications, you should commit on launchpad:
 
269
 
 
270
To upload your modifications, you should commit on launchpad:
 
271
 
 
272
.. i18n:   bzr add YOUR_NEW_FILES_OR_DIR
 
273
.. i18n:   bzr ci
 
274
.. i18n:   bzr push
 
275
 
 
276
  bzr add YOUR_NEW_FILES_OR_DIR
 
277
  bzr ci
 
278
  bzr push
 
279
 
 
280
.. i18n: Status
 
281
.. i18n: ------
 
282
 
 
283
Status
 
284
------
 
285
 
 
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.
 
289
 
 
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.