Skip to content
Utility to convert PO files to requirejs-i18n files with Gulp
Branch: master
Clone or download
Pull request Compare This branch is 5 commits ahead of Ulflander:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.gitignore
LICENSE
README.md
gulpfile.js
index.js
package.json

README.md

gulp-po-requirejs-i18n

Utility to convert PO files to requirejs-i18n files with Gulp.

Usage

var gulp = require('gulp'),
    poRequire = require('gulp-po-requirejs-i18n');

gulp.task('i18n', function() {
    return gulp
        .src('locales/*.po')
        .pipe(poRequire([options]))
        .dest('dist/locales');
});

Options

  • name: (default: 'strings') The name prefix for converted files.

  • root: (default: false) If true, put translations in a root key, and add prefix to translations values (t_ by default).

  • rootPrefix: (default: t_) A prefix that will be added to translations values in root mode.

  • supported: (default: []) Output keys for supported languages, only if root is enabled.

  • omitEmptyString: (default: true) Do not output keys for PO translations with an empty string.

You can’t perform that action at this time.