Next Previous Contents

6. How to translate

6.1 Go simple

One way to translate is to go right in the .dic files and add translations for each message using a different tag. Then use the msgcomp utility to extract the proper definition.

At first, there is little problem doing this. The msgscan utility read,update and save the .dic file, so your changes won't be lost.

The problem come from the way software is developed. First we develop and then, when it is stable, we translate. Doing so mean that we have to walk all the .dic files to make sure our translation still fit with the original messages (English version for example). Those original messages may have changed.

A different scheme was chosen for Linuxconf.

6.2 Organization of the messages directory

The messages directory contain one subdirectory per language plus one sources directory. This directory contains all the .dic files produced by scanning the C++ source files. These file are never hand edited.

Each other directory has a copy of those .dic files with the proper translation. A special utility msgupd has been created: it basically compared all messages in the sources directory with messages in the translated directory. It compare only one language (say the English version).

Mostly, msgupd will tell you

Using that information, you know exactly what you have to do to keep your work in sync with the current release of Linuxconf. msgupd will reorder the translated .dic file (Not the one in the sources directory) so all messages which needed work are at the beginning of the file. It also add a comment (.dic files may have comments like most normal Unix configuration file) explaining what have to be done.

If the English version of the message was changed, it will re tag the version in the translated file and add the new version, plus a comment. The old English message will have the tag "Z". You can see easily what is the change.

6.3 The msgupd utility

The file rules.mak shows the rules for one translation (which is not done yet). Look for the target msg.cfr and upd.cfr. To add a new language, do this

6.4 The msgcomp utility

The msgcomp utility has been tweaked to support the distribute directory concept. Mainly it use the .dic file in the sources directory as a reference. Message number ID are defined from this file. It then used (optionally) alternative .dic file to grab extra translations. The ordering of the .dic file is unimportant.


Next Previous Contents