0

我正在编写一个检查 po 文件的实用程序,并且我试图理解一些msgfmt我无法解释的行为。

我用于测试的 po 文件(来自 vlc 项目)包含这些字符串,这些字符串神秘地不出现在文件中,即使带有标志.mo也没有任何错误报告。msgfmt--check --verbose

这是一个小mvce:

# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR VideoLAN
# This file is distributed under the same license as the PACKAGE package.
# 
# Translators:
# Fumio Nakayama <fumio.n6a@gmail.com>, 2002,2009-2013
# Tadashi Jokagi <elf@elf.no-ip.org>, 2004-2009
msgid ""
msgstr ""
"Project-Id-Version: VLC - Trans\n"
"Report-Msgid-Bugs-To: vlc-devel@videolan.org\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 <fumio.n6a@gmail.com>\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用输出处理这个

3 translated messages.

但是,当使用 libintl 加载这些 po-files 时,对这些 msgids 的查询会返回一个翻译缺失,当我转储mo文件时,它们似乎不存在——它只包含标题。

有谁知道这种行为的原因是什么/msgfmt使用什么标准来跳过这些消息?

4

1 回答 1

0

我已经签入了我的 Ubuntu (15.10)。一切都适用于您的文件。 msgunfmt 生成与输入完全相同的文件,除了注释。

于 2016-03-21T20:27:44.870 回答