![为什么 xgettext 的输出中有变量?](https://linux22.com/image/546259/%E4%B8%BA%E4%BB%80%E4%B9%88%20xgettext%20%E7%9A%84%E8%BE%93%E5%87%BA%E4%B8%AD%E6%9C%89%E5%8F%98%E9%87%8F%EF%BC%9F.png)
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-04-13 10:34+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: test.php:4
msgid "Application"
msgstr ""
当我运行时msgfmt
只收到不可移植的警告CHARSET
,为什么?
我的源文件很简单:
<?php
var_dump(function_exists('_'));
textdomain("mail");
print _("Application");exit;
答案1
也许您的输入文件不是预期的格式,而只是传递数据?请尝试将您的源文件(或至少其中的一部分)发布到 pastebin 或其他地方以供我们检查。