Skip to content

Commit

Permalink
README update
Browse files Browse the repository at this point in the history
  • Loading branch information
gwagroves committed Feb 9, 2017
1 parent c96330c commit 64323f0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# grunt-gettext-parser

[![Build Status](https://travis-ci.org/gwa/grunt-gettext-parser.svg?branch=master)](https://travis-ci.org/gwa/grunt-gettext-parser)

> Extract gettext calls from templates to a single PHP file that can then be used to create a `.po` file for translations.
A grunt task that parses `gettext` calls from [twig](http://twig.sensiolabs.org/) ([Timber](http://upstatement.com/timber/) for Wordpress, or Drupal 8) files and creates a "dummy" PHP file with gettext calls that can then be used to create a `.pot` or `.po` file.
Expand Down Expand Up @@ -57,6 +59,7 @@ grunt.loadNpmTasks('grunt-gettext-parser');
## The "gettext_parser" task

### Overview

In your project's Gruntfile, add a section named `gettext_parser` to the data object passed into `grunt.initConfig()`.

```js
Expand All @@ -65,7 +68,9 @@ grunt.initConfig({
your_target: {
options: {
style: 'wordpress',
textdomain: 'mydomain'
textdomain: 'mydomain',
// Defaults to gettext
output_function: 'myFunction'
},
'path/to/output.php': ['views/**/*.twig']
},
Expand Down

0 comments on commit 64323f0

Please sign in to comment.