Edgewall Software

Changes between Version 77 and Version 78 of TracL10N


Ignore:
Timestamp:
Dec 23, 2009, 10:26:21 AM (14 years ago)
Author:
Christian Boos
Comment:

#TranslationWorkflow many clarifications added

Legend:

Unmodified
Added
Removed
Modified
  • TracL10N

    v77 v78  
    44Trac uses [http://babel.edgewall.org/ Babel] for localization. Trac trunk now contains the i18n framework and L10N files.
    55
    6 The preference panel for language works now (since r6732).
     6The ''Preferences'' ' ''Language'' panel can be used to select the language from the list of available translations, otherwise the web browsers' language preferences will be honored, if possible.
    77
    88If you're only interested in using a localized version of Trac, then refer to the simpler ["0.12/TracInstall"] instructions. The more complete installation instructions below are aimed at developers and translators.
    99
    10 ''Note: what developers and translators are respectively supposed to do is still being discussed - the following instructions describe what I've been doing for contributing to the french translations -- cboos.''
    1110
    1211== Installation ==
    1312
    1413=== Getting the Tool Chain ===
     14==== Python tools ====
    1515 1. Install [http://babel.edgewall.org/ Babel] version [Babel:wiki:Download#LatestRelease:0.9.4 0.9.4] [[br]]
    1616    Read the [http://babel.edgewall.org/wiki/SubversionCheckout detailed installation instructions] for Babel if you want to build it from source, but you should also be able to install it with a simple `easy_install` or by using one of the packages in the Download page linked above.
     
    1919
    2020=== Translation Workflow ===
     21==== Using Python tools ====
    2122 1. Run `python setup.py extract_messages`. [[br]]
    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).
    2430 1. Run `python setup.py update_catalog`. [[br]]
    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]]
    2840    `python setup.py update_catalog -l nl_NL`. [[br]]
    29  1. Now, open your favorite editor and add or modifiy translations for the extracted strings in the catalog for your language. See examples below.
     41 1. Now, open your favorite editor and add or modify translations for the
     42    extracted strings in the messages.po file for your language.
     43    [[comment(See examples below.)]]
    3044 1. Once you're done, you should test your translations:
    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.
    3454    - Run `python setup.py compile_catalog -f`. [[br]]
    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
     72Note that you could stop at step 3, but then you risk to submit incomplete or,
     73worse, buggy messages.po files. Going through the 4^th^ step will ensure a
     74better quality standard. Finally, seeing your translations "live" in Trac is
     75not only a great way to realize if the translation still makes sense once put
     76in context, but also quite gratifying when you see that you picked the correct
     77wording ;-)
    3978
    4079== Contributing ==