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