One way to translate is to go right in the
.dic files and add
translations for each message using a different tag. Then use
msgcomp utility to extract the proper definition.
At first, there is little problem doing this. The
read,update and save the
.dic file, so your changes won't be
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.
messages directory contain one subdirectory per language
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
directory with messages in the translated directory. It compare
only one language (say the English version).
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 (
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.
rules.mak shows the rules for one translation (which
is not done yet). Look for the target
To add a new language, do this
messagesdirectory, for example,
marfor Alien language.
rules.makand add the target
messages/mardirectory with all the necessary
messages/marand edit each
.dicfile and add the proper translation as needed.
/usr/lib/linuxconf. This variable override this. The
msg.*makefile's target generally produce their output in /tmp. This is useful to test new messages without breaking the current installation of Linuxconf. Be aware that this mechanism only work if you execute Linuxconf as root. For security reason, a normal user can't override the message dictionary of Linuxconf (Although he can select a different language from
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.