Generate a default PO translation from GNU Gettext POT files.
Install
Install with npm
npm install --save-dev gulp-pottopo
Example
var gulp = require('gulp');
var pottopo = require('gulp-pottopo');
gulp.task('pottopo', function () {
return gulp.src('languages/*.pot', {base: '.'})
.pipe(pottopo({
}))
.pipe(gulp.dest('.'));
});
The output file will be renamed to [Source filename without extension][Separator character][Language code].po, meaning core.pot
with default language becomes core-en_US.po
.
Options
language
: Language code for the generated file. Default: en_US
.separator
: Character that separates the filename from the language code. Default: -
.