Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/t2ym/gulp-i18n-add-locales

Add placeholder JSON files for target locales for i18n-behavior
https://github.com/t2ym/gulp-i18n-add-locales

Last synced: 22 days ago
JSON representation

Add placeholder JSON files for target locales for i18n-behavior

Awesome Lists containing this project

README

        

# gulp-i18n-add-locales

Add placeholder JSON files for target locales for [i18n-behavior](https://github.com/t2ym/i18n-behavior)

Project template available at [polymer-starter-kit-i18n](https://github.com/t2ym/polymer-starter-kit-i18n). On Github Pages (https://t2ym.github.io/polymer-starter-kit-i18n)

## Features

- Add placeholder empty JSON files in locales folder for the target custom element
- `` is searched for id
- `` is searched for id

## Install

```
npm install --save-dev gulp-i18n-add-locales
```

## Usage

```javascript
var gutil = require('gulp-util');
var grepContents = require('gulp-grep-contents');
var size = require('gulp-size');

var i18nAddLocales = require('gulp-i18n-add-locales');

var config = {
// list of target locales to add
locales: gutil.env.targets ? gutil.env.targets.split(/ /) : []
}

// Add locales to I18N-ready elements and pages
gulp.task('locales', function() {
var elements = gulp.src([ 'app/elements/**/*.html' ], { base: 'app' })
.pipe(grepContents(/i18n-behavior.html/))
.pipe(grepContents(/