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.
Anyway. I'm too tired to hack further on po4a.
+=item filter()
This function extract a catalog from an existing one. Only the entries having a
reference in the given file will be placed in the resulting catalog.
+This function parses its argument, convert it to a perl function definition,
+eval this definition and filter the fields for which this function returns true.
+I love perl sometimes ;)
+
=cut
' night, Mt.
--
This message has been made up using recycled ideas and language constructs.
No tree has been cut nor animal harmed in process of making it.