Why does GNU msgfmt silently omit these strings from catalog?

150 Views Asked by At

I'm writing a utility that examines po files, and I'm trying to understand some behavior of msgfmt that I can't explain.

A po-file that I am using for testing (from vlc project) contains these strings, which mysteriously don't appear in the .mo file, and without any error report from msgfmt even with --check --verbose flags.

Here is an small mvce:

# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR VideoLAN
# This file is distributed under the same license as the PACKAGE package.
# 
# Translators:
# Fumio Nakayama <[email protected]>, 2002,2009-2013
# Tadashi Jokagi <[email protected]>, 2004-2009
msgid ""
msgstr ""
"Project-Id-Version: VLC - Trans\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2013-10-23 15:09+0200\n"
"PO-Revision-Date: 2016-01-22 13:19+0000\n"
"Last-Translator: Fumio Nakayama <[email protected]>\n"
"Language-Team: Japanese (http://www.transifex.com/yaron/vlc-trans/language/ja/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ja\n"
"Plural-Forms: nplurals=1; plural=0;\n"


#: modules/control/rc.c:1878
#, c-format
msgid "| audio decoded    :    %5<PRIi64>"
msgstr "| オーディオ デコード済み数            :    %5<PRIi64>"

#: modules/control/rc.c:1880
#, c-format
msgid "| buffers played   :    %5<PRIi64>"
msgstr "| 再生済みバッファー数                 :    %5<PRIi64>"

#: modules/control/rc.c:1882
#, c-format
msgid "| buffers lost     :    %5<PRIi64>"
msgstr "| 失われたバッファー数                 :    %5<PRIi64>"

msgfmt processes this with output

3 translated messages.

However, when loading these po-files using libintl, queries for these msgids return a translation miss, and when I dump the mo file, it appears that they just aren't there -- it only contains the header.

Does anyone know what the reason for this behavior is / what criteria msgfmt is using to skip these messages?

1

There are 1 best solutions below

0
On

I have checked in my Ubuntu (15.10). Everything works right with your file. msgunfmt generate exactly the same file as input, except comments.