gulp-json2po

1.0.0 • Public • Published

Simple gulp task for generating .po-files from angular-translate JSON files.

Example

Assuming a local file en.json with valid JSON

gulp.task('build', function() {
    return gulp.src('en.json')
      .pipe(json2po('template_en.po'))
      .pipe(gulp.dest('.'))
});

API

json2po([properties, ] filename)

Properties header information that will be merged with the default values into the resulting .po-file.

Current default values:

 {
    "Project-Id-Version": "Sample Project",
    "POT-Creation-Date": "${today}",
    "PO-Revision-Date": "${today}",
    "Last-Translator": "",
    "Language-Team": "",
    "MIME-Version": "1.0",
    "Content-Type": "text/plain; charset=utf-8",
    "Content-Transfer-Encoding": "8bit",
    "Language": "no",
    "X-Generator": "None"
 }

Readme

Keywords

Package Sidebar

Install

npm i gulp-json2po

Weekly Downloads

16

Version

1.0.0

License

ISC

Last publish

Collaborators

  • bvx89