[Top][All Lists]

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

Re: msgfmt -C gets confused by existing fuzzy translations

From: Bruno Haible
Subject: Re: msgfmt -C gets confused by existing fuzzy translations
Date: Sun, 29 Aug 2010 12:15:02 +0200
User-agent: KMail/1.9.9


Jens Petersen wrote:
> I would like to report a problem raised by
> Nils Philippsen in <https://bugzilla.redhat.com/show_bug.cgi?id=621946>:
> "When trying to update older versions of po files with translations submitted 
> to
> a newer version I found that "msgfmt -C/--compendium <new_po_file>
> <old_po_file> <project_pot_file>" gets confused by fuzzy translations in the
> old po file and doesn't use the updated translations from the new po file for
> these msgids.
> ...
> Expected results:
> When using the compendium file and the existing old translation file, it 
> should
> use the translation found in the compendium file for all msgids, even those
> marked fuzzy.

Your expectations are wrong. Translations from the compendium file are not used
for fuzzy entries. Rationale: The fuzzy translation in the old PO file is a
translation for a similar English string in the *same* PO file. The translation
from the compendium is for a similar English string in a *different* PO file.
You can expect that translations from the same PO file will use the same
vocabulary/terms than translations from different PO files. (E.g. a "switch"
would translate to "Schalter" in a program for house design, but to "Switch"
in a program for network configuration.)

If you want to ignore fuzzy entries from the PO file (because somehow they
are less reliable what you have in the compendium), you can play tricks with
'msgattrib' and 'msgcat':

    $ msgattrib --no-fuzzy old-zh_TW.po \
      | msgmerge -C compendium-zh_TW.po - system-config-services.pot \
      | msgcat --use-first - old-zh_TW.po \
      > system-config-services-zh_TW.po
    $ msgfmt -cvo /dev/null system-config-services-zh_TW.po
    57 translated messages.

The msgattrib command creates a temporary PO files where the fuzzies are
missing. The msgmerge program then searches the compendium in first priority.
The msgcat program then adds back the fuzzies in those places where the
compendium did not provide a translation.


reply via email to

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