umpirsky / Twig-Gettext-Extractor

The Twig Gettext Extractor is Poedit friendly tool which extracts translations from twig templates.
MIT License
112 stars 32 forks source link

Custom extension loader #51

Closed drzraf closed 7 years ago

drzraf commented 7 years ago

I'm trying to generate a pot file for a Drupal theme. It uses many Drupal-specific Twig extensions. Currently, using the phar distribution of Twig-Gettext-Extractor, it's not possible. The parser may offer a "relax mode / ignore extensions" option.

umpirsky commented 7 years ago

Covered in https://github.com/umpirsky/Twig-Gettext-Extractor#custom-extensions.

drzraf commented 7 years ago

I cite: https://github.com/umpirsky/Twig-Gettext-Extractor#custom-extensions. Now you may add your custom extensions here But this is note possible when using the phar archive. Assuming on project modification in order to get it working is suboptimal and even unacceptable in many case. At least a configuration option, an environment variable or an include_path trick could be used to fetch custom extensions from

umpirsky commented 7 years ago

Yes, not possible with phar in deed.