aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/umpirsky/twig-gettext-extractor/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/umpirsky/twig-gettext-extractor/README.md')
-rw-r--r--vendor/umpirsky/twig-gettext-extractor/README.md49
1 files changed, 49 insertions, 0 deletions
diff --git a/vendor/umpirsky/twig-gettext-extractor/README.md b/vendor/umpirsky/twig-gettext-extractor/README.md
new file mode 100644
index 00000000..34eff88c
--- /dev/null
+++ b/vendor/umpirsky/twig-gettext-extractor/README.md
@@ -0,0 +1,49 @@
1Twig Gettext Extractor [![Build Status](https://secure.travis-ci.org/umpirsky/Twig-Gettext-Extractor.png?branch=master)](http://travis-ci.org/umpirsky/Twig-Gettext-Extractor)
2======================
3
4The Twig Gettext Extractor is [Poedit](http://www.poedit.net/download.php)
5friendly tool which extracts translations from twig templates.
6
7## Installation
8
9The recommended way to install Twig Gettext Extractor is through
10[composer](http://getcomposer.org).
11
12```json
13{
14 "require": {
15 "umpirsky/twig-gettext-extractor": "1.1.*"
16 }
17}
18```
19
20## Setup
21
22By default, Poedit does not have the ability to parse Twig templates.
23This can be resolved by adding an additional parser (Edit > Preferences > Parsers)
24with the following options:
25
26- Language: `Twig`
27- List of extensions: `*.twig`
28- Invocation:
29 - Parser command: `<project>/vendor/bin/twig-gettext-extractor --sort-output --force-po -o %o %C %K -L PHP --files %F`
30 - An item in keyword list: `-k%k`
31 - An item in input file list: `%f`
32 - Source code charset: `--from-code=%c`
33
34<img src="http://i.imgur.com/f9px2.png" />
35
36Now you can update your catalog and Poedit will synchronize it with your twig
37templates.
38
39## Tests
40
41To run the test suite, you need [composer](http://getcomposer.org) and
42[PHPUnit](https://github.com/sebastianbergmann/phpunit).
43
44 $ composer install --dev
45 $ phpunit
46
47## License
48
49Twig Gettext Extractor is licensed under the MIT license.