Generate .mo files with Grunt

This commit is contained in:
Pierre Rudloff 2017-05-29 19:11:16 +02:00
parent ff247a5c08
commit ce1cbe3e0f
4 changed files with 15 additions and 2 deletions

1
.gitignore vendored
View file

@ -12,3 +12,4 @@ bower_components/
config/config.yml
docs/
clover.xml
i18n/*/LC_MESSAGES/*.mo

View file

@ -90,6 +90,16 @@ module.exports = function (grunt) {
package: {
src: 'package.json'
}
},
potomo: {
dist: {
options: {
poDel: false
},
files: {
'i18n/zh_CN/LC_MESSAGES/Alltube.mo': 'i18n/zh_CN/LC_MESSAGES/Alltube.po'
}
}
}
}
);
@ -105,8 +115,9 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-phpdocumentor');
grunt.loadNpmTasks('grunt-jsonlint');
grunt.loadNpmTasks('grunt-fixpack');
grunt.loadNpmTasks('grunt-potomo');
grunt.registerTask('default', ['uglify', 'cssmin']);
grunt.registerTask('default', ['uglify', 'cssmin', 'potomo']);
grunt.registerTask('lint', ['jslint', 'fixpack', 'jsonlint', 'phpcs']);
grunt.registerTask('test', ['phpunit']);
grunt.registerTask('doc', ['phpdocumentor']);

Binary file not shown.

View file

@ -8,7 +8,8 @@
"bower": "~1.8.0",
"grunt": "~1.0.1",
"grunt-contrib-cssmin": "~2.2.0",
"grunt-contrib-uglify": "~3.0.0"
"grunt-contrib-uglify": "~3.0.0",
"grunt-potomo": "~3.5.0"
},
"devDependencies": {
"grunt-contrib-compress": "~1.4.1",