我正在构建一个角度应用程序,使用angular-gettext进行国际化。 我想知道如何在更新翻译文件时更好地自动化工作流程。
目前如下: - 运行“grunt”(生成pot文件+翻译文件) - 以poedit打开所有“po”文件 - 在poedit中,使用新的“pot”文件更新po文件 - 更新poedit& amp;翻译保存 - 再次运行grunt
有没有办法让事情变得更好? 比如,是否可以使用grunt命令将pot文件应用于所有“po”文件?
这是我目前的gruntfile。 非常感谢
module.exports = function(grunt)
{
grunt.initConfig({
nggettext_extract: {
pot: {
files: {
'po/template.pot': ['www/app/**/*.html']
}
},
},
nggettext_compile: {
all: {
options: {
module: 'app'
},
files: {
'www/resources/translations.js': ['po/*.po']
}
},
}
});
grunt.loadNpmTasks('grunt-angular-gettext');
// Default task(s).
grunt.registerTask('default', ['nggettext_extract', 'nggettext_compile']);
}