22 | | This will generate the catalog template file: `trac/locale/messages.pot`. |
23 | | You won't need to edit that file manually. |
| 23 | This will generate the catalog template file: |
| 24 | source:trunk/trac/locale/messages.pot [[br]] |
| 25 | You should never have to edit that file manually. [[br]] |
| 26 | '''Note:''' ''this step is for committers only.'' |
| 27 | If you're not a Trac svn committer, you have to use the available |
| 28 | messages.pot, or bug us to update that file (though we do it on a |
| 29 | regular basis). |
25 | | This will regenerate the various string catalogs (`trac/locale/*_*/LC_MESSAGES/messages.po`), |
26 | | preserving the previously translated strings. [[br]] |
27 | | Usually, you will be interested in just one locale, so you can provide the `-l` option to specify which catalog should be updated. For example: [[br]] |
| 31 | This will regenerate the various string catalogs |
| 32 | (`trac/locale/*_*/LC_MESSAGES/messages.po`), |
| 33 | preserving the previously translated strings and merging the new |
| 34 | translations found in the messages.pot file. Translations that are |
| 35 | no longer needed are commented out (`#~`) and moved at the bottom of the |
| 36 | .po file. [[br]] |
| 37 | Usually, you will be interested in working on one locale only, so you |
| 38 | can pass the `-l` option to specify which catalog should be updated. |
| 39 | For example: [[br]] |
31 | | - Run `python setup.py update_catalog -l` again, for normalizing the manual edits. For example: [[br]] |
32 | | `python setup.py update_catalog -l nl_NL`. [[br]] |
33 | | This step is also quite useful to spot the possible mistakes, like accidental change of `msgid` strings. Look for lines beginning with `#~`, they are indicative of such errors. |
| 45 | - Run `python setup.py update_catalog -l` again, for normalizing the |
| 46 | manual edits. For example: [[br]] |
| 47 | `python setup.py update_catalog -l nl_NL`. [[br]] |
| 48 | This step is also quite useful for spotting the possible mistakes, |
| 49 | like accidental changes of `msgid` strings. Look for lines beginning |
| 50 | with `#~`, they are indicative of such errors. Note that the comments |
| 51 | corresponding to translations which are no longer present in the |
| 52 | messages.pot file (as discussed in step 2. above) have been discarded |
| 53 | by this second `update_catalog` run. |
35 | | This will generate one compiled catalog (`message.mo` file) for each (or each specified) source catalog. You don't need to do anything with those files, they'll get installed automatically. [[br]] |
36 | | You will most probably need to use the force option (`-f`) in order to compile catalogs marked "fuzzy". [[br]] |
37 | | You can also use the `-l` option here to specify which specific locale has to be compiled. |
38 | | - Run `python setup.py install` for installing Trac and locale data, or you can use `python setup.py develop` once for all, if you want to be able to run Trac from your working copy. |
| 55 | This will generate one compiled catalog (`message.mo` file) for each |
| 56 | (or each specified) messages.po file. You don't need to do anything |
| 57 | with those files, they'll get installed automatically. [[br]] |
| 58 | You will most probably need to use the force option (`-f`) in order to |
| 59 | compile catalogs marked "fuzzy". It is fine to have ''fuzzy'' translations |
| 60 | but try to never contribute a translation still containing those markers, |
| 61 | as they mean that a given translation has not been reviewed by a human |
| 62 | but were machine generated. Fuzzy translations should be either cleared |
| 63 | when they are wrong, or validated when they are correct, by removing the |
| 64 | ''fuzzy'' tag or even the whole line iff ''fuzzy'' was the only keyword on |
| 65 | that line [[br]] |
| 66 | You can also use the `-l` option here to specify the locale for which |
| 67 | the messages.po has to be compiled. |
| 68 | - Run `python setup.py install` for installing Trac and locale data. |
| 69 | Alternatively you can use `python setup.py develop` once for all, |
| 70 | if you want to be able to run Trac from your working copy. |
| 71 | |
| 72 | Note that you could stop at step 3, but then you risk to submit incomplete or, |
| 73 | worse, buggy messages.po files. Going through the 4^th^ step will ensure a |
| 74 | better quality standard. Finally, seeing your translations "live" in Trac is |
| 75 | not only a great way to realize if the translation still makes sense once put |
| 76 | in context, but also quite gratifying when you see that you picked the correct |
| 77 | wording ;-) |