wilde@822: ---------------------------------------------------------------------- wilde@822: Localization of the GNU/Linux Installer wilde@822: ---------------------------------------------------------------------- wilde@822: wilde@822: The GNU/Linux Installer uses a simple custom i18n implementation for wilde@822: localization. Currently English (default) and German messages are wilde@822: supported: wilde@822: wilde@822: All messages in the Installer are written in English, a associative wilde@822: array L10N_DE holds a German translations for the message strings. wilde@822: wilde@822: If locale is set to any de_* localization (following the same wilde@822: semantics as GNU gettext) and a German translation for the particular wilde@822: message is available it will be printed in German, otherwise the wilde@822: original English message will be used. wilde@822: wilde@822: wilde@822: Relevant files wilde@822: -------------- wilde@822: wilde@1149: * linux-installer.inc : wilde@1149: linux-installer-common.inc.in : wilde@1149: linux-installer-uninstall.inc : wilde@822: wilde@1149: Linux Installer Templates, written in bash. l10n-enabled messages wilde@822: are printed using the function "getxt" or "fatal" (which in turn wilde@822: uses getxt for output). The semantics are these of printf and all wilde@822: messages are in English. wilde@822: wilde@822: * linux-installer.l10n-de : wilde@1149: linux-installer-common.l10n-de : wilde@1149: linux-installer-uninstall.l10n-de : wilde@822: wilde@1149: This files contain assignments to the associative array L10N_DE wilde@1149: which has the English messages as used in linux-installer.inc as wilde@1149: keys and the corresponding German strings as values. wilde@822: wilde@822: * getxt-gen-l10n-array.sh : wilde@822: wilde@822: A tool to update the file linux-installer.l10n-de. Detailed usage wilde@822: is described in the commends at the head of the file. It performs wilde@822: the following steps: wilde@822: wilde@822: 1. collect all message strings used with "getxt" (or "fatal") in the wilde@822: source file. wilde@822: wilde@822: 2. sort and remove any duplicates wilde@822: wilde@822: 3. merge with existing translations in the array file wilde@822: wilde@822: 4. write updated array to array file wilde@822: wilde@822: wilde@822: How to update translations wilde@822: -------------------------- wilde@822: wilde@822: When any messages in "linux-installer.inc.in" were changed or added wilde@822: the array file "linux-installer.l10n-de" needs to be updated: wilde@822: wilde@1149: 1. Edit one or more of "linux-installer.inc", wilde@1149: "linux-installer-common.inc.in", "linux-installer-uninstall.inc" wilde@1149: (obviously) wilde@822: wilde@822: 2. Update the array file using getxt-gen-l10n-array.sh in the wilde@1149: packaging source directory (the directory containing this README) wilde@1149: for the file(s) you edited: wilde@822: wilde@822: $ ./getxt-gen-l10n-array.sh linux-installer.inc.in L10N_DE linux-installer.l10n-de wilde@1149: $ ./getxt-gen-l10n-array.sh linux-installer-common.inc.in L10N_DE linux-installer-common.l10n-de wilde@1149: $ ./getxt-gen-l10n-array.sh linux-installer-uninstall.inc L10N_DE linux-installer-uninstall.l10n-de wilde@822: wilde@822: the associative array "L10N_DE" in "linux-installer.l10n-de" will wilde@822: now contain entries for all new or changed messaged with empty wilde@822: strings for the German translations. wilde@822: wilde@822: CAVEAT: this means that if you change a message the translation wilde@822: for the old message will be removed from "linux-installer.l10n-de"! wilde@822: If you (slightly) change messages instead of adding or removing you wilde@822: might want to keep a copy of the old version of wilde@822: "linux-installer.l10n-de", so you can use the old translations as a wilde@822: reference. wilde@822: wilde@822: 3. Edit "linux-installer.l10n-de" and add the missing translations. wilde@822: They are best found by searching for empty strings, which are wilde@822: denoted by two consecutive quotation marks: "" in your editor. wilde@822: wilde@822: That's all. Don't forget to commit "linux-installer.l10n-de" along wilde@822: with your changes to "linux-installer.inc.in".