bug-gettext
[Top][All Lists]
Advanced

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

Re: [bug-gettext] msgcat error when merging fuzy entry with empty transl


From: Bruno Haible
Subject: Re: [bug-gettext] msgcat error when merging fuzy entry with empty translation
Date: Thu, 15 Jun 2017 01:16:58 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-79-generic; KDE/5.18.0; x86_64; ; )

Hi,

> given these 2 files:
> 
> ----8<--- test1.pot ----------
> #, fuzzy
> msgid "foo"
> msgstr "foo"
> ------------------------->8---
> 
> ----8<--- test2.pot ----------
> msgid "foo"
> msgstr ""
> ------------------------->8---
> 
> msgcat does not ignore empty translation from test2:
> 
> $ msgcat test1.pot test2.pot
> #, fuzzy
> msgid "foo"
> msgstr ""
> "#-#-#-#-#  test1.pot  #-#-#-#-#\n"
> "foo\n"
> "#-#-#-#-#  test2.pot  #-#-#-#-#\n"
> 
> while it correctly ignore it if we remove the fuzzy comment from test1:
> 
> $ sed -i 's/#, fuzzy//' test1.pot && msgcat test1.pot test2.pot
> msgid "foo"
> msgstr "foo"
> 
> is this a feature or a bug?

I see it as a feature. msgcat has a multitude of use-cases. For the use-case of
concatenating POT files (which have 'msgstr ""' for *all* messages), it would
be useless if msgcat would throw away messages with 'msgstr ""'.

You can achieve what you want by preprocessing test2.pot (and maybe test1.pot
as well?) with "msgattrib --translated".

With msgattrib and msgcat together, you have great flexibility, depending on
what you want to achieve.

Bruno




reply via email to

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