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

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

Re: msggrep on text from comments


From: Bruno Haible
Subject: Re: msggrep on text from comments
Date: Thu, 13 Mar 2003 11:33:09 +0100 (CET)

Martin Quinson wrote:

> I found several problems in gettext 0.11.5 :
> 
> 1) The existance of the -C flag to search in comments with msggrep is not
> documented well in the documentation:
> ...
> msggrep --help is exactly as few informative as the man page.

Thanks, it will be fixed in gettext 0.12.

> 2) Some example of use of msggrep would be very welcome in this page. For
>    example:
>    msggrep -C -F -e FIXME file.po
>      will extract all entries with "FIXME" in the comments
>      
>    msggrep -K -F -e framebuffer -T -F -e framebuffer file.po
>      will extract all entries using the word framebuffer without translating
>      it (ie this word is present in the msgid and in the msgstr).

I'm so bad at writing good documentation. Would you like to add examples for
each of the programs to the texinfo documentation?

> 3) like 1,  if I do some syntax error (which is pretty easy since the
>    syntax is so hard to figure), I get wrong error messages.
>    
> <<<<<<<<<<<
> $ msggrep -F file.po
> msggrep: option 'F' cannot be used before 'K' or 'T' has been specified
> Try msggrep --help' for more information.
> >>>>>>>>>>>
> 
> and what about the 'C' ?

Will be fixed in gettext 0.12 too. Thanks.

> 4) Combining the result of several msggrep or msgattrib is very difficult,
>    since all of them write the header of the file. For example, if I want
>    the entries being either untranslated or fuzzy plus all entries having
>    FIXME in their comments, I would have to do something like :
> 
>  (msgattrib --only-fuzzy file.po ;   \
>   msgattrib --untranslated file.po ; \
>   msggrep -C -F -e FIXME file.po) > output
> 
> Letting alone that this syntax is not really easy, the produced file won't
> be correct, due to the presence of 3 headers.
> 
> Piping them to msguniq or msgcat does not help.

The recommended way is to use msgcat on the three partial outputs, as Karl
said.

Bruno




reply via email to

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