我有一个包含翻译的文件po/el.po
:
msgid ""
msgstr ""
"Project-Id-Version: \n"
"PO-Revision-Date: 2015-07-01 10:49+0000\n"
"Language: el\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 2.2\n"
#: static/src/partials/layout/header.html:17
#, fuzzy
msgid "About"
msgstr "σχετικά με"
#: static/src/partials/layout/header.html:19
#, fuzzy
msgid "Admin"
msgstr "διαχειριστής"
[[SNIP]]
我直接从documentation。
获取了Gruntfile配置nggettext_compile: {
all: {
files: {
'static/src/js/app/translations.js': [
'po/*.po'
]
}
}
}
grunt --verbose
表示找到了po/el.po
,并创建了static/src/js/app/translations.js
Running "nggettext_compile:all" (nggettext_compile) task
Verifying property nggettext_compile.all exists in config...OK
Files: po/el.po -> static/src/js/app/translations.js
Options: (none)
Reading po/el.po...OK
Writing static/src/js/app/translations.js...OK
Done, without errors.
但是,生成的static/src/js/app/translations.js
包含一个空的翻译列表:
angular.module('gettext').run(['gettextCatalog', function (gettextCatalog) {
/* jshint -W100 */
gettextCatalog.setStrings('el', {});
/* jshint +W100 */
}]);
我错过了什么?
答案 0 :(得分:3)
nggettext_compile不包含标记为“模糊”的翻译,因为我只是为我们的翻译准备好了,所有翻译都是机器生成的,因此被标记为“模糊”......