Bug 4154 - Add a .po based mechanism to translate preferences
authorFrédéric Demians <f.demians@tamil.fr>
Thu, 11 Feb 2010 06:27:45 +0000 (07:27 +0100)
committerGalen Charlton <gmcharlt@gmail.com>
Thu, 11 Feb 2010 10:52:50 +0000 (05:52 -0500)
commit01c619fc1740e4c0c3236a2c4156e6b94bacf5bf
tree95f441239055af55ade292b2db25a505abd5b94d
parentd3df9899fb64cca6ab0e21e0122e4af5536cda95
Bug 4154 - Add a .po based mechanism to translate preferences

Add to previous patch (and replace it):
  - update function
  - translation of tab subsection labels
  - GPL2
  - fix last minute bug catched by Galen

Cut-and-past of pref-trans script perldoc:

NAME
       pref-trans - Handle preferences translation

SYNOPSYS
         pref-trans init fr-FR
         pref-trans update fr-FR
         pref-trans install fr-FR

USAGE
       pref-trans init lang
           Create a .po file in po directory, named lang-pref.po. This
           file contains text to translate extracted from .pref files.

       pref-trans update lang
           Update a .po file in po directory, named lang-pref.po. This
           file contains new text to translate extracted from .pref files.
           Previous translated text are kept. There is a minor bug, which can’t
           be fixed due to preferences data struture: preferences tab
           subsection labels are lost when updating .po file.

       pref-trans install lang
           Use lang-pref.po file to translate the english version of
           preferences files and copy those files in the appropriate
           directory.

DESCRIPTION
       Koha preferences are stored in a data structure found in
       koha-tmpl/intranet-tmpl/en/module/admin/preferences/ files.
       Depending of user language, other files are used. This script extract text
       from ’en’ preference files, and put them in one .po file.  This .po
       file can be updated. When completed, a .po file can be applied to create
       localized versions of preferences templates.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
misc/translator/pref-trans [new file with mode: 0755]