[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: |
Nils Philippsen |
Subject: |
Re: msgfmt -C gets confused by existing fuzzy translations |
Date: |
Tue, 31 Aug 2010 17:53:40 +0200 |
Hi,
On Sun, 2010-08-29 at 12:15 +0200, Bruno Haible wrote:
> 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.)
ahh, that's probably because I used -C in a different way than
originally intended, namely to merge new translations that are made in
the master branch of a project into an older version (using SCMs to
merge PO files is rather unpleasant). In this case, I'd rather have the
non-fuzzy translation for the same msgid from the compendium file (which
really is the same file, just from the up-to-date master branch) than
the fuzzy translation in the older branch.
> 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.
I see, but I don't think I'll remember this if I get into this situation
again...
Would you accept a patch which lets users specify that msgmerge should
prefer the compendium file (maybe using a different term than
"compendium")? Perhaps rather using mostly the same code, but having a
"--update-file" option which acts like "-C" except for the differences I
described?
Nils
--
Nils Philippsen "Those who would give up Essential Liberty to purchase
Red Hat a little Temporary Safety, deserve neither Liberty
address@hidden nor Safety." -- Benjamin Franklin, 1759
PGP fingerprint: C4A8 9474 5C4C ADE3 2B8F 656D 47D8 9B65 6951 3011
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: msgfmt -C gets confused by existing fuzzy translations,
Nils Philippsen <=