1

我有一个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]]

我直接从文档中获取了 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 */
}]);

我错过了什么?

4

1 回答 1

4

nggettext_compile 不包括标记为“模糊”的翻译,因为我只是为我们的翻译准备好它,所有的翻译都是机器生成的,因此标记为“模糊”......

于 2015-07-02T11:32:59.767 回答