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
Cheers,
Udo
Hi Udo
Am Samstag, 18. August 2007 wrote Udo Richter:
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 wrote:
Hmmm, ok, I don't have multi-line strings that need translation, but this is probably worth a fix. But I don't really want to depend on Locale::PO, as it is not very likely to be installed on systems out there.
Since all po files get updated too all the time, reading the pot file is not really necessary.
Cheers,
Udo
Hi
Am Sonntag, 19. August 2007 schrieb Udo Richter:
I'm aware of that. Debian sid has also an outdated package for it ('liblocale-po-perl' version 0.15 where as in CPAN it is version 0.17).
Still I think building on others work is one of the spirits of open source :)
With the Locale::PO package I needed a file where I would know of, that all possible strings appear because the single .po files don't get merged together.
Regards
Dieter
Hi list,
I've uploaded version 0.2 of the po2i18n script that converts i18n strings from gettext to i18n.c format.
The new version now properly handles multi-line i18n strings. To keep things simple, its still NOT based on Locale::PO. (Sorry, Dieter. ;) )
Also, the Makefile integration for automated conversion got improved and now skips either the gettext-handling on old VDR versions or the i18n.c generation on new VDR versions.
Get it here: http://www.udo-richter.de/vdr/scripts.html#po2i18n http://www.udo-richter.de/vdr/scripts.en.html#po2i18n
Cheers,
Udo