nathan@23: nathan@23: po2i18n - Converter for po files nathan@23: nathan@23: nathan@23: Written by: Udo Richter nathan@23: Project's homepage: http://www.udo-richter.de/vdr/scripts.html#po2i18n nathan@23: http://www.udo-richter.de/vdr/scripts.en.html#po2i18n nathan@23: nathan@23: nathan@23: nathan@23: About nathan@23: -------------------------------------------------------------------------- nathan@23: po2i18n is a perl script that generates an i18n.c file compatible to the i18n nathan@23: system of VDR 1.2.0 - VDR 1.5.6, based on the .po files of VDR 1.5.7. This nathan@23: allows plugins to transit to the translation system of VDR 1.5.7 while nathan@23: maintaining compatibility to earlier versions. The script can be used manually nathan@23: or automatically as part of the Makefile. nathan@23: nathan@23: nathan@23: Use nathan@23: -------------------------------------------------------------------------- nathan@23: po2i18n.pl is a filter and can be used manually like this: nathan@23: nathan@23: ./po2i18n.pl < i18n-template.c > i18n.c nathan@23: nathan@23: The filter reads all relevant ./po/*.po files and writes the i18n strings nathan@23: into the template file. Strings will be added between the following two lines: nathan@23: nathan@23: // START I18N nathan@23: // END I18N nathan@23: nathan@23: See also the sample i18n.h and i18n-template.c file. Note that the phrases data nathan@23: structure is encapsulated in #if VDRVERSNUM < 10507, so the i18n strings won't nathan@23: be in the plugin file after 1.5.7. The call to RegisterI18n() of your plugin nathan@23: should also be encapsulated like this. nathan@23: nathan@23: po2i18n can also generate the i18n.c file on the fly while compiling. The nathan@23: changes to the Makefile are demonstrated by the included Makefile.diff sample. nathan@23: With these changes, the i18n.c file will be generated on VDR up to 1.5.6, and nathan@23: the whole gettext conversion is skipped. From 1.5.7 on, the i18n-template.c nathan@23: file will be simply copied as a dummy, and the new locale system will run. nathan@23: nathan@23: As a drawback, the automatic .dependencies for i18n.c won't work. nathan@23: