If the body of a po file contains an empty msgid, msguniq will fail. Sample a.po file; notice the empty msgid (commented "Y"): > msgid "" > msgstr "" > "Language-Team: A\n" > "MIME-Version: 1.0\n" > "Content-Type: text/plain; charset=UTF-8\n" > "Content-Transfer-Encoding: 8bit\n" > > #: X > msgid "Unspecified error" > msgstr "" > > #: Y > msgid "" > msgstr "" > > #: Z, dup of X > msgid "Unspecified error" > msgstr ""
Now run: $ LANG=C msguniq -d /tmp/a.po > /tmp/a.po: warning: Charset missing in header. > Message conversion to user's charset will not work. > /tmp/a.po:13: duplicate message definition... > /tmp/a.po:2: ...this is the location of the first definition > msguniq: found 1 fatal error IHMO this is a bug. If you remove or comment empty msgid and msgstr of "Y", then msguniq will succeed. Using Gentoo's gettext 0.18.1.1-r3 best regards
