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: Sun, 09 Sep 2007 19:23:47 +0200
User-agent: KMail/1.9.7

Bruno Haible wrote:
> Your fourth command produced an empty file for me in some cases;
> I think you intended to do something similar to what "msgattrib
> --no-wrap --no-obsolete" does.

Ah, indeed.  Maybe `info gettext using` (the node on Using Compendia)
could mention this command instead of using a 'sed'?

> > Is such a --use-first option to msgmerge feasible?
>
> 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.  The idea for --use-first is that msgids that are already
unfuzzily translated in $2 should be replaced by the message in $1 --
if $1 contains the exact same msgid.  That is for me the idea of a
Compendium: it should overrule already existing translations.

(But it is nice that it can also hold on to already existing
translations; the default behaviour when --use-first is not used.)

> Can you please send an example, consisting of the 3 input files
> and your expected output?

See the attached four files.

For these files the following does not work, as it simply produces a
duplicate of the given PO file:

  msgmerge --no-wrap  -C Compendium  example.nl.po  example.pot

The following does the right thing, except that it deletes some of
the header lines:

  msgmerge --no-wrap  -C Compendium  -C example.nl.po  /dev/null  example.pot

$ msgmerge --version | head -1
msgmerge (GNU gettext-tools) 0.16.1

(To be truthful, I don't use a single compendium as shown above,
but instead use all the previously translated PO files as a kind
of disjointed compendium.  So personally I will need the steps
with the 'msgcat' command anyway.)

Benno

Attachment: Compendium
Description: Text document

Attachment: example.nl.po
Description: application/gettext

Attachment: example.pot
Description: application/gettext

Attachment: expected-output
Description: Text document


reply via email to

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