bug-gettext
[Top][All Lists]
Advanced

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

[bug-gettext] the manual is incomplete about using a compendium PO file


From: Benno Schulenberg
Subject: [bug-gettext] the manual is incomplete about using a compendium PO file
Date: Wed, 10 Apr 2019 20:06:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Hi,

As the nano PO file recently "acquired" some messages from gnulib,
I looked at the gettext manual to see how to quickly fill in their
translations from another PO file.  I read this page (section 8.4.2):

  info gettext editing compendium using

plus subsection 8.4.1.2 on the preceding page.  With those suggestions,
I ran the following:

# First get a PO file that contains translated gnulib messages:
wget https://translationproject.org/PO-files/nl/grep-3.1.48.nl.po
# Then get the old PO file and the new POT file:
wget https://translationproject.org/PO-files/nl/nano-4.0-pre1.nl.po
wget https://translationproject.org/POT-files/nano-4.1-pre1.pot

# Extract the getopt and regcomp messages that come from gnulib:
msggrep --location lib/getopt.c --location lib/regcomp.c \
            grep-3.1.48.nl.po  >extracted.po

# Concatenate the extracted messages and the old PO file,
# then merge this against the new POT file.
msgcat --use-first  extracted.po  nano-4.0-pre1.nl.po  >melded.po
msgmerge  melded.po  nano-4.1-pre1.pot  >catted-and-merged.po

The resulting PO file has all the gnulib messages translated, as
expected, *however*... the header of this new PO file is the one from
the grep PO file, not the one from nano.  This is not what is wanted.

I can manually chop the header from extracted.po and then run the
msgcat and msgmerge again, and then the resulting PO file has the
wanted old nano header.  But this is not mentioned in the manual,
so I would say that the given recipe is incomplete.


However, instead of msgcat plus msgmerge, one can also simply do:

msgmerge --compendium=extracted.po  nano-4.0-pre1.nl.po \
            nano-4.1-pre1.pot  >directly.po

It gives the wanted result (nano header and all gnulib messages
translated) in a simpler command and without needing to cut the
header off extracted.po.

But that only works when using the old version of the nano PO file,
not when using the new 4.1 version from the TP that already has
several of gnulib's messages filled in with fuzzy matches:

wget https://translationproject.org/PO-files/nl/nano-4.1-pre1.nl.po

msgmerge --compendium=extracted.po  nano-4.1-pre1.nl.po \
            nano-4.1-pre1.pot  >from-latest.po

The fuzzy matches are not overridden by the exact matches from extracted.po.
I think this is not how most people would expect a compendium to work: an
exact match from a compendium surely is better than any vague, fuzzy match,
and msgmerge should replace the fuzzy match and clear the fuzzy flag, no?

If this cannot be made the default behavior, then please make this behavior
selectable with a flag, say --override-fuzzies.

(Please CC; not subscribed.)

Benno

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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