0.1.1 • Published 10 years ago

gulp-po2angular v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

This module is deprecated. Please use gulp-angular-gettext instead.

gulp-po2angular

Convert .po files to JSON for use with angular-gettext.

Install

Install with npm

npm install --save-dev gulp-po2angular

Examples

var gulp = require('gulp');
var po2angular = require('gulp-po2angular');

gulp.task('po2json', function () {
    return gulp.src(['po/**/*.po'])
        .pipe(po2angular())
        .pipe(gulp.dest('dist/translations/'));
});

Differences from grunt-angular-gettext

This plugin is similar to grunt-angular-gettext except that it outputs JSON instead of JSON wrapped in JavaScript. It's up to you how you load the resulting JSON into your app.

Differences from gulp-po2json

gulp-po2json generates slightly different JSON than what angular-gettext expects. It's pretty easy to convert its output (either raw or Jed-style) to the format that angular-gettext expects, but why bother when this plugin exists?