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

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

Re: [gettext] feature request: --use-first option for msgmerge


From: Benno Schulenberg
Subject: Re: [gettext] feature request: --use-first option for msgmerge
Date: Mon, 10 Sep 2007 19:58:55 +0200
User-agent: KMail/1.9.7

Bruno Haible wrote:
> > > I cannot see in what respect your expected output differs
> > > from what "msgmerge --no-wrap  -C $1  $2  $3" already
> > > produces.
> >
> > This latter command does not overrule messages in $2 that are
> > already filled in.
>
> Ah, I see: You receive a PO file from someone else, and you don't
> trust her translations, and trust your own translations more?

Well, the first use case was: my own old translations.  :)  Over 
time the precise translation of some words changed, and now I 
wished to update all of the old PO files to these better wordings.  
So the compendium contains the best wordings for often occurring 
messages, and they should overrule any existing translation.

> OK, this is achievable by first removing or fuzzying the messages
> in the PO file.
>
> [summarized:] 
>   msgfilter --keep-header sed -e d  <example.nl.po  >gutted.po
>   msgmerge -C Compendium  gutted.po  example.pot  >selected.po
>   msgcat --use-first  selected.po  example.nl.po  >result.po

That comes close, but it would not retain the fuzzies that could be 
present in example.nl.po.  And those should be retained.

The use case nowadays is: a new PO file arrives from the Translation 
Project -- the old PO file merged against a new POT file -- and it
contains some untranslated messages and several fuzzy translations.  
After matching against the compendium, any fuzzies that could not be 
exactly matched should be retained unchanged.

Benno




reply via email to

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