From 4f5b44bd3bd490309eb2ba7b44df4769816ba729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sat, 3 Aug 2013 19:26:54 +0200 Subject: twig implementation --- vendor/umpirsky/twig-gettext-extractor/README.md | 49 ++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 vendor/umpirsky/twig-gettext-extractor/README.md (limited to 'vendor/umpirsky/twig-gettext-extractor/README.md') 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 @@ +Twig Gettext Extractor [![Build Status](https://secure.travis-ci.org/umpirsky/Twig-Gettext-Extractor.png?branch=master)](http://travis-ci.org/umpirsky/Twig-Gettext-Extractor) +====================== + +The Twig Gettext Extractor is [Poedit](http://www.poedit.net/download.php) +friendly tool which extracts translations from twig templates. + +## Installation + +The recommended way to install Twig Gettext Extractor is through +[composer](http://getcomposer.org). + +```json +{ + "require": { + "umpirsky/twig-gettext-extractor": "1.1.*" + } +} +``` + +## Setup + +By default, Poedit does not have the ability to parse Twig templates. +This can be resolved by adding an additional parser (Edit > Preferences > Parsers) +with the following options: + +- Language: `Twig` +- List of extensions: `*.twig` +- Invocation: + - Parser command: `/vendor/bin/twig-gettext-extractor --sort-output --force-po -o %o %C %K -L PHP --files %F` + - An item in keyword list: `-k%k` + - An item in input file list: `%f` + - Source code charset: `--from-code=%c` + + + +Now you can update your catalog and Poedit will synchronize it with your twig +templates. + +## Tests + +To run the test suite, you need [composer](http://getcomposer.org) and +[PHPUnit](https://github.com/sebastianbergmann/phpunit). + + $ composer install --dev + $ phpunit + +## License + +Twig Gettext Extractor is licensed under the MIT license. -- cgit v1.2.3