gulp-angular-gettext-export-html
Gulp plugin for parsing angular templates with angular-gettext attributes (`translate`) and replacing contents with translated `.po` files passed as an argument.
Last updated 5 years ago by bartekn .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gulp-angular-gettext-export-html 
SYNC missed versions from official npm registry.

gulp-angular-gettext-export-html

About

Gulp plugin for parsing angular templates with angular-gettext attributes (translate) and replacing contents with translated .po files passed as an argument. It allows to translate templates as much as possible during build process and reduce the amount of work each browser does during templates rendering.

Then you can use gulp.dest to save files in selected directory.

Initial state:

templates/
├── reward-container.html
└── verify-email.html

After running plugin

templates/
├── translated
│   └── pl
│       ├── reward-container.html
│       └── verify-email.html
├── reward-container.html
└── verify-email.html

Usage

var gulp = require('gulp');
var gettext_export_html = require('gulp-angular-gettext-export-html');

gulp.task('gettext-compile-html', function () {
    return gulp.src('app/templates/*.html')
                   .pipe(gettext_export_html('po/*.po'))
                   .pipe(gulp.dest('app/templates/translated'))
});

Current Tags

  • 0.0.2                                ...           latest (5 years ago)

1 Versions

  • 0.0.2                                ...           5 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 1
Dependencies (6)
Dev Dependencies (4)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |