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

« back to all changes in this revision

Viewing changes to i18n/ru/source/contribute/07_improving_translations.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: .. _translating_software:
 
3
.. i18n: 
 
4
.. i18n: OpenERP Translations
 
5
.. i18n: --------------------
 
6
..
 
7
 
 
8
.. _translating_software:
 
9
 
 
10
OpenERP Translations
 
11
--------------------
 
12
 
 
13
.. i18n: Within the OpenERP source code, all translatable terms are written in international
 
14
.. i18n: English (language code ``en_US``). The Administrator of an OpenERP instance can
 
15
.. i18n: install additional languages among the official translations. As a result the corresponding
 
16
.. i18n: translations of all installed modules will be loaded in the database, and used to
 
17
.. i18n: replace the default English terms in the application interface when a user changes her
 
18
.. i18n: preferred language.
 
19
..
 
20
 
 
21
Within the OpenERP source code, all translatable terms are written in international
 
22
English (language code ``en_US``). The Administrator of an OpenERP instance can
 
23
install additional languages among the official translations. As a result the corresponding
 
24
translations of all installed modules will be loaded in the database, and used to
 
25
replace the default English terms in the application interface when a user changes her
 
26
preferred language.
 
27
 
 
28
.. i18n: Regardless of what follows, if you are considering working on the OpenERP translations,
 
29
.. i18n: please read the general `Launchpad Translations Guidelines <https://help.launchpad.net/Translations/Guide>`_ 
 
30
.. i18n: before writing your first translation, as it includes very important advice for new translators.
 
31
..
 
32
 
 
33
Regardless of what follows, if you are considering working on the OpenERP translations,
 
34
please read the general `Launchpad Translations Guidelines <https://help.launchpad.net/Translations/Guide>`_ 
 
35
before writing your first translation, as it includes very important advice for new translators.
 
36
 
 
37
.. i18n: There are 2 ways for contributors to add or modify translations in their languages:
 
38
..
 
39
 
 
40
There are 2 ways for contributors to add or modify translations in their languages:
 
41
 
 
42
.. i18n:     #. Work on Launchpad, OpenERP's community platform, using `the dedicate Translation 
 
43
.. i18n:        interface on Launchpad <http://translations.launchpad.net>`_, formerly known as Rosetta.
 
44
.. i18n:        This guarantees to work on the latest translation, and is automatically synchronized
 
45
.. i18n:        with the .po files of the source code. See :ref:`translations_rosetta` for more
 
46
.. i18n:        details.
 
47
.. i18n: 
 
48
.. i18n:     #. Work directly on the PO files, considering them as regular source code files, and thus
 
49
.. i18n:        sending a merge proposal of the .po patch to OpenERP, just like for a regular patch.
 
50
.. i18n:        This is explained in more details in :ref:`translations_code` section.
 
51
..
 
52
 
 
53
    #. Work on Launchpad, OpenERP's community platform, using `the dedicate Translation 
 
54
       interface on Launchpad <http://translations.launchpad.net>`_, formerly known as Rosetta.
 
55
       This guarantees to work on the latest translation, and is automatically synchronized
 
56
       with the .po files of the source code. See :ref:`translations_rosetta` for more
 
57
       details.
 
58
 
 
59
    #. Work directly on the PO files, considering them as regular source code files, and thus
 
60
       sending a merge proposal of the .po patch to OpenERP, just like for a regular patch.
 
61
       This is explained in more details in :ref:`translations_code` section.
 
62
 
 
63
.. i18n: The first solution is greatly recommended when you are working on official OpenERP translations,
 
64
.. i18n: but sometimes the second solution is more efficient when you are translating new community modules.
 
65
.. i18n: These two solutions also have different access rights requirements, as explained below.
 
66
..
 
67
 
 
68
The first solution is greatly recommended when you are working on official OpenERP translations,
 
69
but sometimes the second solution is more efficient when you are translating new community modules.
 
70
These two solutions also have different access rights requirements, as explained below.
 
71
 
 
72
.. i18n: .. topic:: Can I do batch translations locally and then upload the ``.po`` files in batch in Launchpad?
 
73
.. i18n: 
 
74
.. i18n:     You can certainly translate locally, however Launchpad does not allow uploading back ``.po`` files directly,
 
75
.. i18n:     as you are normally supposed to work directly using their translation interface.
 
76
.. i18n:     You will need to work on translations using the alternative method, based on the ``.po`` files directly, as
 
77
.. i18n:     explained in :ref:`translations_code`. We really recommand working with Launchpad instead, due to the numerous
 
78
.. i18n:     advantages, detailed in :ref:`translations_rosetta`.
 
79
..
 
80
 
 
81
.. topic:: Can I do batch translations locally and then upload the ``.po`` files in batch in Launchpad?
 
82
 
 
83
    You can certainly translate locally, however Launchpad does not allow uploading back ``.po`` files directly,
 
84
    as you are normally supposed to work directly using their translation interface.
 
85
    You will need to work on translations using the alternative method, based on the ``.po`` files directly, as
 
86
    explained in :ref:`translations_code`. We really recommand working with Launchpad instead, due to the numerous
 
87
    advantages, detailed in :ref:`translations_rosetta`.
 
88
 
 
89
.. i18n: .. _translations_rosetta:
 
90
.. i18n: 
 
91
.. i18n: Translating with Launchpad
 
92
.. i18n: ++++++++++++++++++++++++++
 
93
..
 
94
 
 
95
.. _translations_rosetta:
 
96
 
 
97
Translating with Launchpad
 
98
++++++++++++++++++++++++++
 
99
 
 
100
.. i18n: Launchpad provides a web-based translation interface, which can be
 
101
.. i18n: used to translate. Its main features are:
 
102
..
 
103
 
 
104
Launchpad provides a web-based translation interface, which can be
 
105
used to translate. Its main features are:
 
106
 
 
107
.. i18n:     * Being web-based, it is accessible everywhere for anyone and does not require
 
108
.. i18n:       any developer skill
 
109
.. i18n:     * It provides all the contextual information that a translator needs, and mentions
 
110
.. i18n:       the place where the term comes from inside the software, a critical information
 
111
.. i18n:       for proper translations.
 
112
.. i18n:     * Making use of the thousands of other open source project hosted on Launchpad,
 
113
.. i18n:       it is able to suggest similar translations from all other projects, speeding
 
114
.. i18n:       up the translator's work.
 
115
.. i18n:     * It provides reviewing features, and allows marking the terms that one thinks
 
116
.. i18n:       should be reviewed by other translators, easing collaboration further.
 
117
.. i18n:     * It comes with a specific access right system, and Launchpad Teams can be assigned
 
118
.. i18n:       to specific languages, making them responsible for the quality of the translations.
 
119
.. i18n:     * It is automatically synchronized with the source code files containing the
 
120
.. i18n:       translations, effectively replacing completely the need for manually updating
 
121
.. i18n:       them as explained in :ref:`translations_code`.
 
122
..
 
123
 
 
124
    * Being web-based, it is accessible everywhere for anyone and does not require
 
125
      any developer skill
 
126
    * It provides all the contextual information that a translator needs, and mentions
 
127
      the place where the term comes from inside the software, a critical information
 
128
      for proper translations.
 
129
    * Making use of the thousands of other open source project hosted on Launchpad,
 
130
      it is able to suggest similar translations from all other projects, speeding
 
131
      up the translator's work.
 
132
    * It provides reviewing features, and allows marking the terms that one thinks
 
133
      should be reviewed by other translators, easing collaboration further.
 
134
    * It comes with a specific access right system, and Launchpad Teams can be assigned
 
135
      to specific languages, making them responsible for the quality of the translations.
 
136
    * It is automatically synchronized with the source code files containing the
 
137
      translations, effectively replacing completely the need for manually updating
 
138
      them as explained in :ref:`translations_code`.
 
139
 
 
140
.. i18n: After registering on Launchpad, you can access the translations for any OpenERP project
 
141
.. i18n: by clicking on the *Translations* or *Help Translate* links on the homepage of the project.
 
142
.. i18n: You may also find the list of all (official and community-driven) translatable OpenERP-related
 
143
.. i18n: Launchpad projects: https://translations.launchpad.net/openobject.
 
144
..
 
145
 
 
146
After registering on Launchpad, you can access the translations for any OpenERP project
 
147
by clicking on the *Translations* or *Help Translate* links on the homepage of the project.
 
148
You may also find the list of all (official and community-driven) translatable OpenERP-related
 
149
Launchpad projects: https://translations.launchpad.net/openobject.
 
150
 
 
151
.. i18n: Some quick links to the main OpenERP projects' translations:
 
152
..
 
153
 
 
154
Some quick links to the main OpenERP projects' translations:
 
155
 
 
156
.. i18n:     * https://translations.launchpad.net/openobject-server
 
157
.. i18n:     * https://translations.launchpad.net/openobject-addons
 
158
.. i18n:     * https://translations.launchpad.net/openobject-client
 
159
.. i18n:     * https://translations.launchpad.net/openobject-client-web
 
160
.. i18n:     * https://translations.launchpad.net/openobject-client-kde
 
161
..
 
162
 
 
163
    * https://translations.launchpad.net/openobject-server
 
164
    * https://translations.launchpad.net/openobject-addons
 
165
    * https://translations.launchpad.net/openobject-client
 
166
    * https://translations.launchpad.net/openobject-client-web
 
167
    * https://translations.launchpad.net/openobject-client-kde
 
168
 
 
169
.. i18n: Please also have a look at the `Launchpad Translations Documentation <https://help.launchpad.net/Translations/>`_
 
170
.. i18n: and `FAQ <https://answers.launchpad.net/rosetta/+faqs>`_.
 
171
..
 
172
 
 
173
Please also have a look at the `Launchpad Translations Documentation <https://help.launchpad.net/Translations/>`_
 
174
and `FAQ <https://answers.launchpad.net/rosetta/+faqs>`_.
 
175
 
 
176
.. i18n: Permissions for Translations on Launchpad
 
177
.. i18n: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
178
..
 
179
 
 
180
Permissions for Translations on Launchpad
 
181
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
182
 
 
183
.. i18n: OpenERP uses `structured permissions <https://help.launchpad.net/Translations/YourProject/PermissionPolicies>`_ 
 
184
.. i18n: for the Launchpad translations, which means three things:
 
185
..
 
186
 
 
187
OpenERP uses `structured permissions <https://help.launchpad.net/Translations/YourProject/PermissionPolicies>`_ 
 
188
for the Launchpad translations, which means three things:
 
189
 
 
190
.. i18n:     * Anyone is always free to suggest translations for OpenERP modules, clients and server.
 
191
.. i18n:     * If no translation team is assigned to a language, anyone can review or even accept a 
 
192
.. i18n:       given translation.
 
193
.. i18n:     * If a translation team is assigned to a language, only members of that team are allowed
 
194
.. i18n:       to review and accept the translations in this language, but anyone can still suggest
 
195
.. i18n:       translations.
 
196
..
 
197
 
 
198
    * Anyone is always free to suggest translations for OpenERP modules, clients and server.
 
199
    * If no translation team is assigned to a language, anyone can review or even accept a 
 
200
      given translation.
 
201
    * If a translation team is assigned to a language, only members of that team are allowed
 
202
      to review and accept the translations in this language, but anyone can still suggest
 
203
      translations.
 
204
 
 
205
.. i18n: See also Launchpad's Translations documentation for more details:
 
206
..
 
207
 
 
208
See also Launchpad's Translations documentation for more details:
 
209
 
 
210
.. i18n:     * https://help.launchpad.net/Translations
 
211
.. i18n:     * https://help.launchpad.net/Translations/StartingToTranslate
 
212
.. i18n:     * https://answers.launchpad.net/rosetta/+faqs
 
213
..
 
214
 
 
215
    * https://help.launchpad.net/Translations
 
216
    * https://help.launchpad.net/Translations/StartingToTranslate
 
217
    * https://answers.launchpad.net/rosetta/+faqs
 
218
 
 
219
.. i18n: Requesting the creation of assignation of a translation team
 
220
.. i18n: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
221
.. i18n: If your language does not yet have an assigned translation you are free to create one
 
222
.. i18n: yourself, and request its assignation to that language. If the team already exists,
 
223
.. i18n: please contact its members to join their effort.
 
224
..
 
225
 
 
226
Requesting the creation of assignation of a translation team
 
227
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
228
If your language does not yet have an assigned translation you are free to create one
 
229
yourself, and request its assignation to that language. If the team already exists,
 
230
please contact its members to join their effort.
 
231
 
 
232
.. i18n: If you decide to `create a new team <https://launchpad.net/people/+newteam>`_ (anyone can do that),
 
233
.. i18n: please name it *openerp-i18n-XXX* where *XXX* is your language, for example *openerp-i18n-dutch*.
 
234
.. i18n: Please be sure to put a complete description for the team, explaining its purpose, how to join
 
235
.. i18n: (if you want to make it moderated or restricted, etc.) The description can be in your language,
 
236
.. i18n: and you could look at the description of existing translation teams if you need examples.
 
237
.. i18n: Please also have a look at the
 
238
.. i18n: `Launchpad recommendations for running a Localization team <https://help.launchpad.net/Translations/Guide#Running a localization team>`_.
 
239
..
 
240
 
 
241
If you decide to `create a new team <https://launchpad.net/people/+newteam>`_ (anyone can do that),
 
242
please name it *openerp-i18n-XXX* where *XXX* is your language, for example *openerp-i18n-dutch*.
 
243
Please be sure to put a complete description for the team, explaining its purpose, how to join
 
244
(if you want to make it moderated or restricted, etc.) The description can be in your language,
 
245
and you could look at the description of existing translation teams if you need examples.
 
246
Please also have a look at the
 
247
`Launchpad recommendations for running a Localization team <https://help.launchpad.net/Translations/Guide#Running a localization team>`_.
 
248
 
 
249
.. i18n: When this is done, send a message through Launchpad to https://launchpad.net/~odo, requesting
 
250
.. i18n: the assignation of your new team.
 
251
..
 
252
 
 
253
When this is done, send a message through Launchpad to https://launchpad.net/~odo, requesting
 
254
the assignation of your new team.
 
255
 
 
256
.. i18n: After this point, anyone will still be free to propose and view translations for your language, but one will
 
257
.. i18n: need to be a member of your new team to be able to validate/accept them.
 
258
..
 
259
 
 
260
After this point, anyone will still be free to propose and view translations for your language, but one will
 
261
need to be a member of your new team to be able to validate/accept them.
 
262
 
 
263
.. i18n: Reviewing translations on Launchpad
 
264
.. i18n: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
265
.. i18n: When a translation team is assigned, it is in charge of reviewing every
 
266
.. i18n: translation made by the contributors before they can be used in the official
 
267
.. i18n: packages and branches.
 
268
..
 
269
 
 
270
Reviewing translations on Launchpad
 
271
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
272
When a translation team is assigned, it is in charge of reviewing every
 
273
translation made by the contributors before they can be used in the official
 
274
packages and branches.
 
275
 
 
276
.. i18n: If you are a member of a translation team, please make sure that new
 
277
.. i18n: suggestions are reviewed as soon as possible.
 
278
.. i18n: There are few things more disappointing than contributing and having your work
 
279
.. i18n: ignored! Fortunately Launchpad makes it pretty easy for you to keep up.
 
280
..
 
281
 
 
282
If you are a member of a translation team, please make sure that new
 
283
suggestions are reviewed as soon as possible.
 
284
There are few things more disappointing than contributing and having your work
 
285
ignored! Fortunately Launchpad makes it pretty easy for you to keep up.
 
286
 
 
287
.. i18n: You can see how many strings need review on the project's translation page for
 
288
.. i18n: your language.
 
289
.. i18n: Just click on the number in the column "Need review" will directly open a page
 
290
.. i18n: with all the contributions waiting to be reviewed:
 
291
..
 
292
 
 
293
You can see how many strings need review on the project's translation page for
 
294
your language.
 
295
Just click on the number in the column "Need review" will directly open a page
 
296
with all the contributions waiting to be reviewed:
 
297
 
 
298
.. i18n: .. image:: img/translation-lp-template-list.png
 
299
.. i18n:    :width: 100%
 
300
..
 
301
 
 
302
.. image:: img/translation-lp-template-list.png
 
303
   :width: 100%
 
304
 
 
305
.. i18n: One of the neat features of Launchpad is that it can keep several suggestions
 
306
.. i18n: for translating the same string. Launchpad will also suggest translations made in
 
307
.. i18n: completely different projects if it can.
 
308
.. i18n: As a reviewer, you are free to either choose the translation you find best, or
 
309
.. i18n: to make a new translation yourself.
 
310
..
 
311
 
 
312
One of the neat features of Launchpad is that it can keep several suggestions
 
313
for translating the same string. Launchpad will also suggest translations made in
 
314
completely different projects if it can.
 
315
As a reviewer, you are free to either choose the translation you find best, or
 
316
to make a new translation yourself.
 
317
 
 
318
.. i18n: When  none of the suggestions are good enough, you can also discard them by
 
319
.. i18n: checking "Dismiss all suggestions above.". They will be removed from the review
 
320
.. i18n: process and fall into oblivion - use wisely.
 
321
..
 
322
 
 
323
When  none of the suggestions are good enough, you can also discard them by
 
324
checking "Dismiss all suggestions above.". They will be removed from the review
 
325
process and fall into oblivion - use wisely.
 
326
 
 
327
.. i18n: .. image:: img/translation-lp-review.png
 
328
.. i18n:    :width: 100%
 
329
..
 
330
 
 
331
.. image:: img/translation-lp-review.png
 
332
   :width: 100%
 
333
 
 
334
.. i18n: .. topic:: Requesting review for your own translations
 
335
.. i18n: 
 
336
.. i18n:     While you are in charge of reviewing other's translation, you may also
 
337
.. i18n:     wish to new translations of your own, and have others review them.
 
338
.. i18n:     To this end, launchpad will present you with an additional checkbox
 
339
.. i18n:     labeled "Someone should review this translation". If you check this box,
 
340
.. i18n:     your contribution will be considered as a suggestion rather than a
 
341
.. i18n:     reviewed translation.
 
342
.. i18n:     
 
343
.. i18n:     If you are making lots of translations that to want others to review, 
 
344
.. i18n:     just leave the "Reviewer mode" to enter the "Translator mode". Launchpad
 
345
.. i18n:     will then check the box automatically for you.
 
346
.. i18n: 
 
347
.. i18n:     .. image:: img/translation-lp-translator-mode.png
 
348
.. i18n:        :width: 100%
 
349
..
 
350
 
 
351
.. topic:: Requesting review for your own translations
 
352
 
 
353
    While you are in charge of reviewing other's translation, you may also
 
354
    wish to new translations of your own, and have others review them.
 
355
    To this end, launchpad will present you with an additional checkbox
 
356
    labeled "Someone should review this translation". If you check this box,
 
357
    your contribution will be considered as a suggestion rather than a
 
358
    reviewed translation.
 
359
    
 
360
    If you are making lots of translations that to want others to review, 
 
361
    just leave the "Reviewer mode" to enter the "Translator mode". Launchpad
 
362
    will then check the box automatically for you.
 
363
 
 
364
    .. image:: img/translation-lp-translator-mode.png
 
365
       :width: 100%
 
366
 
 
367
.. i18n: .. topic:: Why am I credited for translations when I only reviewed someone else's contribution?
 
368
.. i18n: 
 
369
.. i18n:     When reviewing translations, you must be careful to select the suggestion
 
370
.. i18n:     and not copy/paste it into the "New translation" box, otherwise Launchpad
 
371
.. i18n:     may consider the contribution is yours.
 
372
.. i18n:     
 
373
.. i18n:     Also, if you change even a tiny bit from the translation (like correcting
 
374
.. i18n:     a small type), it will be considered a new suggestion and credited to you.
 
375
..
 
376
 
 
377
.. topic:: Why am I credited for translations when I only reviewed someone else's contribution?
 
378
 
 
379
    When reviewing translations, you must be careful to select the suggestion
 
380
    and not copy/paste it into the "New translation" box, otherwise Launchpad
 
381
    may consider the contribution is yours.
 
382
    
 
383
    Also, if you change even a tiny bit from the translation (like correcting
 
384
    a small type), it will be considered a new suggestion and credited to you.
 
385
 
 
386
.. i18n: .. _translations_code:
 
387
.. i18n: 
 
388
.. i18n: Translating in the source code
 
389
.. i18n: ++++++++++++++++++++++++++++++
 
390
..
 
391
 
 
392
.. _translations_code:
 
393
 
 
394
Translating in the source code
 
395
++++++++++++++++++++++++++++++
 
396
 
 
397
.. i18n: As an alternative to Launchpad, translations may also be done in directly in the
 
398
.. i18n: source code, considering the translation files as regular source code files.
 
399
.. i18n: The result of a translator's work is essentially a regular *patch*, which may
 
400
.. i18n: only be published according to the specific permissions allowed on each project
 
401
.. i18n: code. To the contrary, when using Launchpad any validated translation is directly
 
402
.. i18n: committed by Launchpad in the official branches, without any further delay.
 
403
..
 
404
 
 
405
As an alternative to Launchpad, translations may also be done in directly in the
 
406
source code, considering the translation files as regular source code files.
 
407
The result of a translator's work is essentially a regular *patch*, which may
 
408
only be published according to the specific permissions allowed on each project
 
409
code. To the contrary, when using Launchpad any validated translation is directly
 
410
committed by Launchpad in the official branches, without any further delay.
 
411
 
 
412
.. i18n: As no-one outside of OpenERP's Quality Team is allowed to directly commit
 
413
.. i18n: patches on the official branches, this means that a translation patch for
 
414
.. i18n: the official OpenERP project would need to be submitted using a regular merge proposal,
 
415
.. i18n: as described in :ref:`merge_proposals`.
 
416
..
 
417
 
 
418
As no-one outside of OpenERP's Quality Team is allowed to directly commit
 
419
patches on the official branches, this means that a translation patch for
 
420
the official OpenERP project would need to be submitted using a regular merge proposal,
 
421
as described in :ref:`merge_proposals`.
 
422
 
 
423
.. i18n: If you still want to use this technique, perhaps because you want to update
 
424
.. i18n: all your translations in one batch (which is not possible with Launchpad yet),
 
425
.. i18n: you will first need to understand the :ref:`translation_files_structure`.
 
426
..
 
427
 
 
428
If you still want to use this technique, perhaps because you want to update
 
429
all your translations in one batch (which is not possible with Launchpad yet),
 
430
you will first need to understand the :ref:`translation_files_structure`.
 
431
 
 
432
.. i18n: The you can start editing the ``.po`` files directly using a PO editor such
 
433
.. i18n: as `POEdit <http://www.poedit.net>`_, or instead update the translations directly
 
434
.. i18n: within OpenERP, and replace the existing ``.po`` by exporting updated ones using
 
435
.. i18n: OpenERP's translation export wizard.
 
436
..
 
437
 
 
438
The you can start editing the ``.po`` files directly using a PO editor such
 
439
as `POEdit <http://www.poedit.net>`_, or instead update the translations directly
 
440
within OpenERP, and replace the existing ``.po`` by exporting updated ones using
 
441
OpenERP's translation export wizard.
 
442
 
 
443
.. i18n: We recommend you follow these steps to ensure the best result with this technique:
 
444
..
 
445
 
 
446
We recommend you follow these steps to ensure the best result with this technique:
 
447
 
 
448
.. i18n:     #. read everything about the :ref:`translation_files_structure`
 
449
.. i18n:     #. grab the latest source code and create a new OpenERP database to start with,
 
450
.. i18n:        to make sure you have all the latest translation terms
 
451
.. i18n:     #. translate locally using OpenERP's interface or any other way you like
 
452
.. i18n:     #. if translating in OpenERP, re-export all `.po` files of your language for all modules
 
453
.. i18n:        over the current ones in the source using OpenERP's export wizard
 
454
.. i18n:     #. at that point you basically have a version of the code where your languages's
 
455
.. i18n:        ``.po`` files are patched. You then need to commit and push these changes into
 
456
.. i18n:        a public branch on LP and make a merge proposal so OpenERP's quality team can merge
 
457
.. i18n:        the updated .po files into the official branches. Follow the regular procedure
 
458
.. i18n:        as explained in :ref:`merge_proposals`.
 
459
..
 
460
 
 
461
    #. read everything about the :ref:`translation_files_structure`
 
462
    #. grab the latest source code and create a new OpenERP database to start with,
 
463
       to make sure you have all the latest translation terms
 
464
    #. translate locally using OpenERP's interface or any other way you like
 
465
    #. if translating in OpenERP, re-export all `.po` files of your language for all modules
 
466
       over the current ones in the source using OpenERP's export wizard
 
467
    #. at that point you basically have a version of the code where your languages's
 
468
       ``.po`` files are patched. You then need to commit and push these changes into
 
469
       a public branch on LP and make a merge proposal so OpenERP's quality team can merge
 
470
       the updated .po files into the official branches. Follow the regular procedure
 
471
       as explained in :ref:`merge_proposals`.
 
472
 
 
473
.. i18n: .. _translation_files_structure:
 
474
.. i18n: 
 
475
.. i18n: Translation files structure
 
476
.. i18n: +++++++++++++++++++++++++++
 
477
..
 
478
 
 
479
.. _translation_files_structure:
 
480
 
 
481
Translation files structure
 
482
+++++++++++++++++++++++++++
 
483
 
 
484
.. i18n: .. versionchanged:: 5.0 and 6.0
 
485
..
 
486
 
 
487
.. versionchanged:: 5.0 and 6.0
 
488
 
 
489
.. i18n: As of version 5.0, OpenERP uses exclusively the GetText Portable Object (a.k.a. ``*.po`` [#f_po]_)
 
490
.. i18n: standard format for storing translations. Numerous tools and libraries are available on most
 
491
.. i18n: platforms and programming languages to deal with this widespread format.
 
492
..
 
493
 
 
494
As of version 5.0, OpenERP uses exclusively the GetText Portable Object (a.k.a. ``*.po`` [#f_po]_)
 
495
standard format for storing translations. Numerous tools and libraries are available on most
 
496
platforms and programming languages to deal with this widespread format.
 
497
 
 
498
.. i18n: The translations are organized in several translations *domains*, where each domain is a
 
499
.. i18n: topic-specific area of OpenERP. Each *domain* has a separate list of translatable terms,
 
500
.. i18n: described in what is called a *PO Template* file, usually called ``domain.pot`` and found
 
501
.. i18n: in a ``i18n`` [#i18n]_ subdirectory specific to that domain. Each OpenERP client (GTK/Native
 
502
.. i18n: and Web) represent a separate domain, and each OpenERP module is also a separate domain.
 
503
..
 
504
 
 
505
The translations are organized in several translations *domains*, where each domain is a
 
506
topic-specific area of OpenERP. Each *domain* has a separate list of translatable terms,
 
507
described in what is called a *PO Template* file, usually called ``domain.pot`` and found
 
508
in a ``i18n`` [#i18n]_ subdirectory specific to that domain. Each OpenERP client (GTK/Native
 
509
and Web) represent a separate domain, and each OpenERP module is also a separate domain.
 
510
 
 
511
.. i18n: A domain template file does not contain any translation, but only lists the available terms
 
512
.. i18n: to be translated. Translations are regular ``.po`` files that should be located in the same
 
513
.. i18n: subdirectory as their domain template, and respect the following naming convention.
 
514
..
 
515
 
 
516
A domain template file does not contain any translation, but only lists the available terms
 
517
to be translated. Translations are regular ``.po`` files that should be located in the same
 
518
subdirectory as their domain template, and respect the following naming convention.
 
519
 
 
520
.. i18n: .. warning::
 
521
.. i18n: 
 
522
.. i18n:     Domain templates files must be named ``domain.pot`` and located in a ``po`` or ``i18n``
 
523
.. i18n:     subdirectory.
 
524
.. i18n: 
 
525
.. i18n:     For *OpenERP 5.0*, translation files must be named ``lc_CC.po`` after the corresponding
 
526
.. i18n:     country and language code from ISO 3166 [#iso3166]_ and ISO 639-1 [#iso639_1]_.
 
527
.. i18n:     For example a translation in French from France would be ``fr_FR.po`` while one for
 
528
.. i18n:     Brazilian Portuguese would be ``pt_BR.po``.
 
529
.. i18n: 
 
530
.. i18n:     For *OpenERP 6.0*, translation files must be named ``lc_CC.po`` after the corresponding
 
531
.. i18n:     country and language code from ISO 3166 [#iso3166]_ and ISO 639-1 [#iso639_1]_, except for
 
532
.. i18n:     the canonical combinations, such as French from France or Portuguese from Portugal, which
 
533
.. i18n:     must only have the language code.
 
534
.. i18n:     For example a translation in French from France would be ``fr.po`` and one for regular
 
535
.. i18n:     Portuguese would be ``pt.po``, but one for Brazilian Portuguese would be ``pt_BR.po``.
 
536
.. i18n: 
 
537
.. i18n:     If you were looking for the domain template and Belgian Dutch translation of the
 
538
.. i18n:     ``account`` module, you would look for the following files in the addons project::
 
539
.. i18n:     
 
540
.. i18n:         account
 
541
.. i18n:          i18n
 
542
.. i18n:            account.pot
 
543
.. i18n:            nl_BE.po
 
544
..
 
545
 
 
546
.. warning::
 
547
 
 
548
    Domain templates files must be named ``domain.pot`` and located in a ``po`` or ``i18n``
 
549
    subdirectory.
 
550
 
 
551
    For *OpenERP 5.0*, translation files must be named ``lc_CC.po`` after the corresponding
 
552
    country and language code from ISO 3166 [#iso3166]_ and ISO 639-1 [#iso639_1]_.
 
553
    For example a translation in French from France would be ``fr_FR.po`` while one for
 
554
    Brazilian Portuguese would be ``pt_BR.po``.
 
555
 
 
556
    For *OpenERP 6.0*, translation files must be named ``lc_CC.po`` after the corresponding
 
557
    country and language code from ISO 3166 [#iso3166]_ and ISO 639-1 [#iso639_1]_, except for
 
558
    the canonical combinations, such as French from France or Portuguese from Portugal, which
 
559
    must only have the language code.
 
560
    For example a translation in French from France would be ``fr.po`` and one for regular
 
561
    Portuguese would be ``pt.po``, but one for Brazilian Portuguese would be ``pt_BR.po``.
 
562
 
 
563
    If you were looking for the domain template and Belgian Dutch translation of the
 
564
    ``account`` module, you would look for the following files in the addons project::
 
565
    
 
566
        account
 
567
         i18n
 
568
           account.pot
 
569
           nl_BE.po
 
570
 
 
571
.. i18n: .. [#f_po] http://www.gnu.org/software/autoconf/manual/gettext/PO-Files.html#PO-Files
 
572
.. i18n: .. [#iso3166] http://www.iso.org/iso/country_codes/iso_3166_code_lists.htm
 
573
.. i18n: .. [#iso639_1] http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
 
574
.. i18n: .. [#i18n] *i18n* is a common shortcut for *Internationalization*, as there are 18 letters
 
575
.. i18n:            between the first i and last n in this word.
 
576
..
 
577
 
 
578
.. [#f_po] http://www.gnu.org/software/autoconf/manual/gettext/PO-Files.html#PO-Files
 
579
.. [#iso3166] http://www.iso.org/iso/country_codes/iso_3166_code_lists.htm
 
580
.. [#iso639_1] http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
 
581
.. [#i18n] *i18n* is a common shortcut for *Internationalization*, as there are 18 letters
 
582
           between the first i and last n in this word.