Creating a new locale (translation) for TortoiseCVS

Overview

Internally, TortoiseCVS uses the GNU gettext library for translating messages. Gettext works like this:

  1. All messages are present in English in the source code.

  2. A tool (xgettext) automatically extracts the messages into a specially formatted text file (a .po file), which can then be translated.

  3. The .po file is finally converted to a .mo file, which is used by the TortoiseCVS executable.

  4. When texts are updated in the source code, or when new texts are added, another tool (msgmerge) automatically updates the various .po files. The translator will then have to review any fuzzy entries (see the Gettext Guide below for an explanation of this).

Gettext Documentation

This simple Gettext Guide gives an introduction to gettext. For the full story, go to the manual.

How to start

  1. Check out the po module

    In the Checkout dialog, use the CVSROOT

    :ext:your_sf_login@cvs.sourceforge.net:/cvsroot/tortoisecvs

    and the module name po.

  2. Determine the correct language/country code

    Go to this page to find the code for your language, and to this page to find your country code. Put the two together with an underscore between; i.e. for French as spoken in Canada you would choose fr_CA.

  3. Create a new .po file

    Go into the TortoiseCVS folder, and copy the en_GB.po file to a new file; in our example this would be fr_CA.po.

  4. Translate your new file

    using a text editor or one of the special tools available such as poEdit.

  5. Compile the .po file

    as described in the above references. For testing, you can just copy the file to the locale/en_GB folder under Program Files/TortoiseCVS (note that it must be named TortoiseCVS.mo).