gulp-angular-gettext-export-html
v0.0.2
Published
Gulp plugin for parsing angular templates with angular-gettext attributes (`translate`) and replacing contents with translated `.po` files passed as an argument.
Downloads
35
Readme
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'))
});