Mercurial > trustbridge
view packaging/README.linux-installer-l10n @ 1325:303de3160a83
(issue163) Move all uninstaller specifics into IFDEF WRITE_UNINSTALLER sections
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Tue, 14 Oct 2014 18:33:18 +0200 |
parents | 96ecd345c961 |
children |
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 : linux-installer-common.inc.in : linux-installer-uninstall.inc : Linux Installer Templates, 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 : linux-installer-common.l10n-de : linux-installer-uninstall.l10n-de : This files contain assignments to the associative array L10N_DE which has the English messages as used in linux-installer.inc 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 one or more of "linux-installer.inc", "linux-installer-common.inc.in", "linux-installer-uninstall.inc" (obviously) 2. Update the array file using getxt-gen-l10n-array.sh in the packaging source directory (the directory containing this README) for the file(s) you edited: $ ./getxt-gen-l10n-array.sh linux-installer.inc.in L10N_DE linux-installer.l10n-de $ ./getxt-gen-l10n-array.sh linux-installer-common.inc.in L10N_DE linux-installer-common.l10n-de $ ./getxt-gen-l10n-array.sh linux-installer-uninstall.inc L10N_DE linux-installer-uninstall.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".