README.po2i18n
author nathan
Mon, 28 Jan 2008 17:39:51 +0100
branchtrunk
changeset 23 3c10fdd8ccce
permissions -rw-r--r--
use po2i18n for non-locale vdr
     1         
     2                   po2i18n - Converter for po files
     3 
     4 
     5 Written by:              Udo Richter <udo_richter@gmx.de>
     6 Project's homepage:      http://www.udo-richter.de/vdr/scripts.html#po2i18n
     7                          http://www.udo-richter.de/vdr/scripts.en.html#po2i18n
     8 
     9 
    10 
    11 About
    12 --------------------------------------------------------------------------
    13 po2i18n is a perl script that generates an i18n.c file compatible to the i18n
    14 system of VDR 1.2.0 - VDR 1.5.6, based on the .po files of VDR 1.5.7. This
    15 allows plugins to transit to the translation system of VDR 1.5.7 while 
    16 maintaining compatibility to earlier versions. The script can be used manually
    17 or automatically as part of the Makefile.
    18 
    19 
    20 Use
    21 --------------------------------------------------------------------------
    22 po2i18n.pl is a filter and can be used manually like this:
    23 
    24   ./po2i18n.pl < i18n-template.c > i18n.c
    25   
    26 The filter reads all relevant ./po/*.po files and writes the i18n strings
    27 into the template file. Strings will be added between the following two lines:
    28 
    29   // START I18N
    30   // END I18N
    31 
    32 See also the sample i18n.h and i18n-template.c file. Note that the phrases data
    33 structure is encapsulated in #if VDRVERSNUM < 10507, so the i18n strings won't 
    34 be in the plugin file after 1.5.7. The call to RegisterI18n() of your plugin 
    35 should also be encapsulated like this.
    36 
    37 po2i18n can also generate the i18n.c file on the fly while compiling. The 
    38 changes to the Makefile are demonstrated by the included Makefile.diff sample.
    39 With these changes, the i18n.c file will be generated on VDR up to 1.5.6, and
    40 the whole gettext conversion is skipped. From 1.5.7 on, the i18n-template.c 
    41 file will be simply copied as a dummy, and the new locale system will run.
    42 
    43 As a drawback, the automatic .dependencies for i18n.c won't work.
    44