[Po4a-devel] A hackish way of generating bin/po4a.pot

Robert Luberda robert at debian.org
Sat Mar 20 10:20:26 UTC 2010


Hi,

Yesterday, while updating Polish translations, I noticed that almost all
translations for the po4a-build script had been removed (see the bottom
of the
https://alioth.debian.org/scm/viewvc.php/po4a/po/bin/pl.po?root=po4a&r1=1.35&r2=1.36
page).
After some investigation it turned out that this had been caused by
passing the  `-L perl' option to xgettext.

I've found some workaround for the problem. The workaround replaces
the usual way of generating po4a.pot file with the following steps:
 1. create temporary symlinks (like po4a.TMP.pl pointing to po4a) to let
 xgettext guess the language from the extension);
 2. generate the POT file;
 3. fix locations in the POT file to make it refer to real files, not
the temporary ones;
 4. remove the symlinks.

The attached patch implements it and seems to work perfectly. What do
you think about it?

Regards,
robert

-------------- next part --------------
A non-text attachment was scrubbed...
Name: po4a-gettext.diff
Type: text/x-diff
Size: 2543 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/po4a-devel/attachments/20100320/5d1aa4e9/attachment.diff>


More information about the Po4a-devel mailing list