[Po4a-devel][CVS] po4a/lib/Locale/Po4a Po.pm,1.15,1.16

Denis Barbier barbier@linuxfr.org
Mon, 2 Aug 2004 23:28:14 +0200


On Mon, Aug 02, 2004 at 03:10:06AM -0700, Martin Quinson wrote:
> 
> On Mon, Aug 02, 2004 at 09:35:41AM +0000, Martin Quinson wrote:
> >
> > Modified Files:
> > 	Po.pm 
> > Log Message:
> > Implement a tool I dream of since a long time: msgsearch, which allows you
> > to filter out some messages of the po file and put them in another
> 
> I needed it for the perl documentation project. We have to split per file.
> So, I did it ;)
> 
> It works reasonably well and you can apply some complex filter. 
> '(&(reference="po4a:")(msgid= ))' gives you all the strings extracter out of
> po4a and containing a space. 
> 
> But:
>  - the flags and the comments are not reported to the file (gasp)
>  - some complex expressions still break the parser:
>    '(&(reference="po4a:")(&(flags=fuzzy)(msgid= )))'
>    '(|(flags=fuzzy)(!(msgstr=.)))' which should give you all the fuzzy or
>                                    untranslated messages.

Martin, can you please explain what cannot be performed by msggrep (apart
from Perl regular expressions)?
Bruno Haible has recently developed a libgettextpo library (part of
gettext) containing handful functions for applications which have to
read/write/parse PO files.  Maybe it is worth writing a XS module
to use this library?  This way, one shouldn't care about comments and
flags, but OTOH XS modules are architecture dependent.
As always, this is just a thought, I did not investigate deeply ;)

Denis