view packaging/README.linux-installer-l10n @ 1145:a41338b18273

(issue130) Do not show error when software was not found and handle it in setLastMod
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 18 Sep 2014 11:09:34 +0200
parents 71cdd4b2f038
children 96ecd345c961
line wrap: on
line source
----------------------------------------------------------------------
               Localization of the GNU/Linux Installer
----------------------------------------------------------------------

The GNU/Linux Installer uses a simple custom i18n implementation for
localization. Currently English (default) and German messages are
supported:

All messages in the Installer are written in English, a associative
array L10N_DE holds a German translations for the message strings.

If locale is set to any de_* localization (following the same
semantics as GNU gettext) and a German translation for the particular
message is available it will be printed in German, otherwise the
original English message will be used.


Relevant files
--------------

* linux-installer.inc.in :

  Linux Installer Template, written in bash.  l10n-enabled messages
  are printed using the function "getxt" or "fatal" (which in turn
  uses getxt for output).  The semantics are these of printf and all
  messages are in English.

* linux-installer.l10n-de :

  This file contains the associative array L10N_DE which has the
  English messages as used in linux-installer.inc.in as keys and the
  corresponding German strings as values.

* getxt-gen-l10n-array.sh :

  A tool to update the file linux-installer.l10n-de.  Detailed usage
  is described in the commends at the head of the file.  It performs
  the following steps:

  1. collect all message strings used with "getxt" (or "fatal") in the
     source file.

  2. sort and remove any duplicates

  3. merge with existing translations in the array file

  4. write updated array to array file


How to update translations
--------------------------

When any messages in "linux-installer.inc.in" were changed or added
the array file "linux-installer.l10n-de" needs to be updated:

1. Edit "linux-installer.inc.in" (obviously)

2. Update the array file using getxt-gen-l10n-array.sh in the
   packaging source directory (the directory containing this README):

   $ ./getxt-gen-l10n-array.sh linux-installer.inc.in L10N_DE linux-installer.l10n-de

   the associative array "L10N_DE" in "linux-installer.l10n-de" will
   now contain entries for all new or changed messaged with empty
   strings for the German translations.

   CAVEAT: this means that if you change a message the translation
   for the old message will be removed from "linux-installer.l10n-de"!
   If you (slightly) change messages instead of adding or removing you
   might want to keep a copy of the old version of
   "linux-installer.l10n-de", so you can use the old translations as a
   reference.
   
3. Edit "linux-installer.l10n-de" and add the missing translations.
   They are best found by searching for empty strings, which are
   denoted by two consecutive quotation marks: "" in your editor.

That's all.  Don't forget to commit "linux-installer.l10n-de" along
with your changes to "linux-installer.inc.in".

http://wald.intevation.org/projects/trustbridge/