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.
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.
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
messages directory, for
example, mar for Alien language.rules.mak and add the target msg.mar
and upd.mar.messages/mar directory with all the necessary .dic
files.
make upd.mar
messages/mar and edit each .dic file and
add the proper translation as needed.
make msg.mar
/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 /usr/lib/linuxconf if available).
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.