bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Extracting selected messages from a po file


From: Martin Quinson
Subject: Extracting selected messages from a po file
Date: Wed, 5 Mar 2003 09:20:26 +0100
User-agent: Mutt/1.5.3i

On Tue, Mar 04, 2003 at 05:19:38PM +0100, Karl Eichwalder wrote:
> Martin Quinson <address@hidden> writes:
> 
> >  (msgattrib --only-fuzzy file.po ;   \
> >   msgattrib --untranslated file.po ; \
> >   msggrep -C -F -e FIXME file.po) > output
> 
> [...]
> 
> > I have no idea about how to solve that
> > without introducing yet another option to the msg{attrib,grep} binaries.
> 
> Write them to a file (file1.po, file2.po, ...) and call msgcat
> on these files (maybe, you are also interested in --use-first):
> 
> msgattrib -o file1.po --only-fuzzy file.po
> msgattrib -o file2.po --untranslated file.po
> msggrep -o file3.po -C -F -e FIXME file.po
> 
> msgcat -o output --use-first file1.po file2.po file3.po
> 
> (I didn't test it, but that's from memory.)

Yup, it should work. But don't you agree that it's really complicated ?
I had an idea this night : what about an utility using a LDAP-like syntax to
filter some messages from the input file ? It could be renamed msgselect.

The previous request would be expressed with :

msgselect "(|(fuzzy=yes)(translated=no)(comment=.*FIXME.*))'" file.po > 
selected.po

which is ways easier to remember and to use, isn't it? Moreover, if we stick
to the LDAP syntax, that's a somehow standard.

What do you think about that ?

Thanks, Mt.

PS: thinking about msgselect, or another way to do it is only a part of my
original bug repport. The other one being that msggrep -C isn't documented
enough. 

-- 
Dans le passé, il y avait plus de futur que maintenant.
   -- Le Chat




reply via email to

[Prev in Thread] Current Thread [Next in Thread]