Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/pryley/gulp-pottopo

Generate a default PO translation from GNU Gettext POT files.
https://github.com/pryley/gulp-pottopo

Last synced: about 1 month ago
JSON representation

Generate a default PO translation from GNU Gettext POT files.

Awesome Lists containing this project

README

        

# gulp-pottopo

> Generate a default PO translation from GNU Gettext POT files.

## Install

Install with [npm](https://npmjs.org/package/gulp-pottopo)

```bash
npm install gulp-pottopo --save-dev
```

## Example

```js
var gulp = require('gulp');
var pottopo = require('gulp-pottopo');

gulp.task('pottopo', function () {
return gulp.src('languages/*.pot', {base: '.'})
.pipe(pottopo({
// optional parameters
}))
.pipe(gulp.dest('.'));
});
```

The output file will be renamed to [Filename without extension][Separator option][Language option].po, meaning `translation.pot` with default language becomes `translation-en_US.po`.

## Options

* `language`: Language code for the generated file. Default: `en_US`.
* `separator`: Character that separates the filename from the language code. Default: `-`.