gulp plugin to convert po to angangular-translate format
Install with npm
npm install gulp-po2json-angular-translate --save-dev
var gulp = require('gulp');
var po2json = require('gulp-po2json-angular-translate');
gulp.task('po2jsjon', function () {
return gulp.src('po/**/*.po')
.pipe(po2json({
// options ...
pretty: false
}))
.pipe(gulp.dest('dist/translations/'));
});
Type: Boolean
Default value: false
If you want to pretty print the result
Type: Boolean
Default value: false
If you want to convert the ids to uppercase
Type: Boolean
Default value: true
It enables you to use alternative placeholders format, it defaults with {foo}.
Type: Array
Default value: ['{','}']
Here you can set your own placeholder structure. Notice that you must specify a closing mark.