grunt-potomo
Grunt plug-in to compile .po files into binary .mo files with msgfmt.
Requirements
- This plugin requires Grunt
~0.4.5
- GNU gettext installed and in your PATH. Installation instructions: Mac, Windows and Linux
Getting Started
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-potomo --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt;
The "potomo" task
Run this task with the grunt potomo
command.
Task targets, files and options may be specified according to the grunt Configuring tasks guide.
Options
options.poDel
Type: Boolean
Default: false
Whether the PO
file(s) used from source should be deleted or remove after the creation of MO
file(s).
Example config
grunt; grunt; grunt;
Example usage
Compile
grunt;
Compile with options
grunt;
Compile multiple files
You can specify multiple destination: source
items in files
.
grunt;
Compile files in a directory
Instead of naming all files you want to compile, you can use the expand
property allowing you to specify a directory. More information available in the grunt docs - Building the files object dynamically
.
grunt;
License
Copyright (c) 2016 Shiva Poudel
Licensed under the MIT license:
http://shivapoudel.mit-license.org/