[PATCH 2 of 2] Added documentation on l10n of the linux installer on how to update

Wald Commits scm-commit at wald.intevation.org
Fri Jul 18 18:21:23 CEST 2014


# HG changeset patch
# User Sascha Wilde <wilde at intevation.de>
# Date 1405700456 -7200
# Node ID 71cdd4b2f0383bd35929bc7eb41c01296e2fd98f
# Parent  6e300f749a6d475d8b3c070a99cd00fceddc1425
Added documentation on l10n of the linux installer on how to update.

diff -r 6e300f749a6d -r 71cdd4b2f038 packaging/README.linux-installer-l10n
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/packaging/README.linux-installer-l10n	Fri Jul 18 18:20:56 2014 +0200
@@ -0,0 +1,79 @@
+----------------------------------------------------------------------
+               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".


More information about the Trustbridge-commits mailing list