[vdr] [ANNOUNCE] po2i18n - converter for plugin backwards compatibility

Dieter Hametner dh+vdr at gekrumbel.de
Sun Aug 19 16:57:45 CEST 2007


Hi Udo

Am Samstag, 18. August 2007 wrote Udo Richter:
> Hi list,
>
> I've uploaded a little perl script and instructions to convert from the
> new gettext based po i18n files to the old i18n.c system of VDR 1.5.6
> and earlier. By using this script its easy to use the new po based i18n
> system for translations, and still compile the plugins with full i18n
> support all the way back to VDR 1.2.0.
>
> The script can either be used manually to generate the i18n.c file from
> the po files and a template, or automatically as part of the build process.
>
> Get it here:
> http://www.udo-richter.de/vdr/scripts.html#po2i18n
> http://www.udo-richter.de/vdr/scripts.en.html#po2i18n
>
>

I kind of enhanced your script to use the CPAN module Locale::PO for reading 
the .po/.pot files. Your implementation did not handle multi line msgids and 
msgstrs well.

My change adds all strings in the plugins .pot file to the resulting i18n.c 
file, even when no translation exists for the string and it does not sort the 
msgids.

I called it pot2i18n.pl to take into account that it reads the .pot file too. 
Usage is analogous to po2i18n.pl. You must specifiy the plugins .pot file as 
first argument.

Feel free to use my changes for your next version if you like.

Regards
Dieter

-- 
Dieter Hametner                    mailto: dh+vdr at gekrumbel.de
live plugin developer		   http://live.vdr-developer.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pot2i18n.pl.bz2
Type: application/x-bzip2
Size: 1432 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/vdr/attachments/20070819/c95fe2af/attachment-0001.bin 


More information about the vdr mailing list