  Translating Linuxconf messages: quick start
  Introduction


  Linuxconf sports a very sophisticated and unique translation system.
  Translating all the various messages in Linuxconf should take few
  hours. Tracking the evolution of Linuxconf is relatively painless.
  Starting with Linuxconf 1.9r25-8, some tools have been created to get
  you started in no time. This document describe the process for both
  the linuxconf core and independant modules. You will find information
  about independant modules at the end.

  11..  BBeeffoorree yyoouu ssttaarrtt

  You need Linuxconf's sources. The translation is handled in the
  messages subdirectory. Get the sources and compile Linuxconf.  This is
  needed because the translation utilities are delivered with Linuxconf.

  You should read the document translate/translat.doc. It explains the
  technology used to make Linuxconf translatable. This should save you a
  lot of time and make the tracking of the various new Linuxconf release
  a lot more easier than anything else.

  Translating Linuxconf involves two different operation. You must
  translate all messages use by Linuxconf itself and then translate all
  the help screens.


  22..  LLaayyoouutt ooff tthhee mmeessssaaggeess ssuubb--ddiirreeccttoorryy

  The messages directory contain various scripts and Makefile and one
  sub-directory per language. The English "original" language is
  contained in the sources directory.

  The messages/sources directory contains messages extracted directly
  from the C++ source file. Don't modify those files. These file are
  automaticly maintained by the "make msg" command. Your work will be
  lost.


  33..  SSttaarrttiinngg aa ttrraannssllaattiioonn pprroojjeecctt ffoorr aa nneeww llaanngguuaaggee

  To start a new translation, run the script initlang.sh with a single
  argument. This argument is the ID of the language. This may be the two
  letters ISO standard identifying your country. It can be anything.  It
  has to be different from any other translation distributed with
  Linuxconf.

  Once the initlang.sh has been run, enter the subdirectory just
  created.  There is a bunch of dic files. Each file correspond to a
  source directory in the Linuxconf project. You may want to browse the
  source to better understand the context of a message. It should not be
  necessary.


  44..  SSttaarrttiinngg ttoo wwoorrkk


  44..11..  MMooddiiffyyiinngg tthhee ..ddiicc ffiilleess

  The .dic files have a very simple format. Each message has an
  identifier. It is followed by the original English text. You must add
  your translation right after the English version.

  Don't delete the English version. It serves two purposes. The script
  syncmsg.sh can compare the English version in your translation tree
  with the English version in the sources directory. This way, it can
  tell you which message was modified in Linuxconf so you can adjust
  easily your translation. Further, modified messages are always sorted
  and place at the beginning of the dic file. To help you spot them
  easily a comment is prepend to each modified message telling you if
  the message was modified or is new.

  The English version is also useful because it lets you translate a
  little at a time. When you generate the dictionary used by Linuxconf
  at runtime, the msgcomp utility will pick your translation when
  available and will stuff the dictionary with the English version when
  the translation is missing.


  44..22..  LLaayyoouutt ooff aa ddiicc ffiillee

  So a dic file looks like




           @version 0
           # *** new message
           !N_MISSING
               :E %s does not exist
           # *** new message
           !N_NOEXEC
               :E %s is not executable
           # *** new message
           !F_ALIASNAME
               :E alias name
           # *** new message
           !F_FILTER
               :E Filter program






  The word following the exclamation mark is the message ID. This is the
  key to locate the message usage in the C++ source if needed.  The ID
  start generally with a letter and a underscore. This letter should let
  you identify the type of message. Here are few in use.


  +o  E: Error message

  +o  F: Dialog field title

  +o  I: Dialog introduction or field explanation

  +o  M: Menu entry

  +o  N: Notice

  +o  P: Privilege explanation

  +o  T: Dialog title

  Once translated, a dic file looks like





      @version 0
      !N_MISSING
          :E %s does not exist
          :T %s n'existe pas
      !N_NOEXEC
          :E %s is not executable
          :T %s n'est pas executable
      !F_ALIASNAME
          :E alias name
          :T synonyme
      !F_FILTER
          :E Filter program
          :T Programme filtre





  As you see, I have removed all the comments (starting with #) so I
  know I have processed a message. A :T line has been added for the
  translation and I have left the :E line unchanged.


  44..33..  IInnssttaalllliinngg tthhee mmeessssaaggeess


  Once you have translated enough, you can run the installmsg.sh script.
  It processes all .dic file and produces a file



           /usr/lib/linuxconf/linuxconf-msg-VERSION.lang





  where lang is the identifier of the language (the directory name).

  You may run this script after having translated just a few message to
  see how it goes. I suggest you start with the main.dic file and
  translated 10-20 messages. You should see few lines of the main menu
  change so you know you are on the good track.

  You can continue later at your own pace as you know that non
  translated messages are still waiting with a comment in front of them.


  44..44..  UUssiinngg yyoouurr ttrraannssllaattiioonn

  The "features" menu of the Linuxconf's main menu contain one entry to
  switch the operation language. Using ^X, you get a help list showing
  which one are available. If your is not, it means you have not run the
  installmsg.sh script.


  44..55..  TThhee mmeessssaaggeess ddoo nnoott sshhooww uupp ??

  If for any reason the message dictionary for you language is not
  readable (not there in /usr/lib/linuxconf/help.LANG_ID), Linuxconf
  revert silently to english.

  If you define the following environment variable, Linuxconf will be a
  little more verbose about missing language dictionary. It is
  especially helpful to make sure you have covered all modules.

               export SHOWDICERR=on






  44..66..  KKeeeeppiinngg tthhee ppaaccee wwiitthh LLiinnuuxxccoonnff

  _L_i_n_u_x_c_o_n_f is evolving all the time with new features. It means that
  your translation will need some work from time to time. To do that,
  install the latest sources of Linuxconf and run the following command
  in the messages directory:



               syncmsg.sh language_id





  It will list all the dictionary processed and will show which ones
  have some work to do. Edit those file and the work to do (new
  messages, updates messages) will be right at the beginning.


  New messages will be introduced by the comment



               # *** new message





  Updated messages will be introduced by the comment



               # *** updated message





  Updated messages present 3 versions of the text. The :E version is the
  one taken from the source. It is up to date. The :T version is your
  own translation. The :Z version is the original English version you
  have used to do your translation. This helps you find out what exactly
  have changed (sometime just a missing 's').


  44..77..  IInnssppeeccttiinngg ..ddiicc ffiilleess ffoorr ccoommmmoonn eerrrroorrss

  After you have completed the translation of dictionary files, you can
  use the chkdic.pl script to find common errors.  This script tries to
  find some common mistakes created when manually edited dictionary
  files.  Currently supported features:


  +o  check if previous line of continuing line of message is correctly
     ended with \n (string for new line character)


  +o  check if messages doesn't contain duplicated tags

  +o  check if messages doesn't contain tag for old message

  +o  check if after translation tag is not empty translation

  +o  find all untranslated messages

  +o  find too long messages

  The script must be run in the directory holding the dic files.  It can
  also help by preparing synchronized dictionary files for translation
  with passing proper parameter. You can get all options by invoking it
  with --help. The script was written by Peter Ivanyi
  <ivanyi@internet.sk>.


  55..  IInnddeeppeennddaanntt mmoodduulleess

  Independant modules are linuxconf components which are compiled
  outside of the main Linuxconf source tree. While the same technology
  is used, things are a little simpler.


  55..11..  SSoouurrccee llaayyoouutt ooff aann iinnddeeppeennddaanntt mmoodduullee


  A module has a single .dic file. So the layout goes like this:



               module_name/
               module_name/module_name.dic
               module_name/messages/lang_id.dic





  For example, for a module called fooconf translated in french and
  finish, you would get:



               fooconf/
               fooconf/fooconf.dic
               fooconf/messages/fi.dic
               fooconf/messages/fr.dic





  Note that fooconf/fooconf.dic is the official english text extract
  from the source code using the "make msg" command.


  55..22..  IInnssttaalllliinngg mmeessssaaggeess ffoorr iinnddeeppeennddaanntt mmoodduulleess

  To install the message, simply do make install. Given the simplicity
  and size of a module, installing everything, including every language
  translation is quick (famous last word).




  55..33..  TTrraannssllaattiinngg aanndd kkeeeeppiinngg aa ttrraannssllaattiioonn ccuurrrreenntt

  You use the following command



               make LANG=xx syncmsg





  It will update messages/xx.dic.





















































