Translation resources and tips
Overview
TortoiseCVS uses GNU gettext for translating messages. Gettext works like this:- All messages are present in English in the source code.
- A tool (xgettext) automatically extracts the messages into a file (a .po file), which can then be translated (using a text editor or a special-purpose tool such as poEdit).
- The .po file is finally converted to a .mo file, which is used by the TortoiseCVS executable.
- 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
- Join the translators mailing list - see how here.
- Check out the po module: In the Checkout dialog, use the CVSROOT :ext:your_sf_login@tortoisecvs.cvs.sourceforge.net:/cvsroot/tortoisecvs and the module name po. Note: To be able to do this, you must be a member of the TortoiseCVS project.
- 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".
- 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. Add it to CVS.
- Translate your new file using a text editor or one of the special tools available. If you use a text editor, make sure that it uses UTF-8 encoding.
- 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).
- Repeat the last three steps for the Setup folders. The messages in the TortoiseCVS folder are those used in the program itself; the ones in the Setup folder are used by the installer.
- Add the native name of your translation to the file NativeLanguageNames.po in the Common folder.
This is used in the installer, when the user chooses which language to use.
In our example, we would add these two lines:
msgid "French" msgstr "Français"
- Commit your .po files.