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