Componette

Componette

voda

voda / gettext-extractor v4.0.4

Extracts gettext phrases from PHP files and Nette Framework templates

download-cloud-line composer require voda/gettext-extractor

GettextExtractor

Tool for extracting gettext phrases from PHP files and Latte templates. Output is generated as a .pot file.

Build Status Latest Stable Version Total Downloads License

Installation

To install gettext-extractor install it with composer: $ composer require --dev voda/gettext-extractor

Alternatively you can download a standalone PHAR file from releases page.

Usage

./vendor/bin/gettext-extractor [options]

Options:
  -h            display this help and exit
  -oFILE        output file, default output is stdout
  -lFILE        log file, default is stderr
  -fFILE        file to extract, can be specified several times
  -kFUNCTION    add FUNCTION to filters, format is:
                FILTER:FUNCTION_NAME:SINGULAR,PLURAL,CONTEXT
                default FILTERs are PHP and Latte
                for SINGULAR, PLURAL and CONTEXT '0' means not set
                can be specified several times
  -mKEY:VALUE   set meta header

e.g.: ./vendor/bin/gettext-extractor -o outup/file.pot -f files/to/extract/

Supported file types

  • .php
  • .latte (Nette Latte templates)

License

GettextExtractor is licensed under the New BSD License.

Based on code from Karel Klíma.

  • v4.0.4 v4.0.4

    • fix escaping of backslah in .pot files
    • improve makefile
  • v4.0.3 v4.0.3

    • relax latte dependency version
  • v4.0.2 v4.0.2

    • relax nikic/php-parser dependency version
  • v4.0.1

    • LatteFilter: support for custom macros
  • v4.0.0

    • bump min PHP version to 7.2
    • works also with PHP 7.3
    • updated php-parser library
    • use Latte library for parsing latte files
    • add strict_types to code
    • provide .phar file
bar-chart-fill

Statistics

download-cloud-fill
25522
star-fill
20
bug-fill
6
flashlight-fill
15d
price-tag-2-line

Badges

guide-fill

Dependencies

php (>=7.2.0)
latte/latte (~2.5.0)
Componette Componette felix@nette.org