umpirsky / Twig-Gettext-Extractor

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

added a sample noop to handle Drupal's twig-template specific filters/functions #52

Open drzraf opened 7 years ago

drzraf commented 7 years ago

Can't even parse a Drupal template without this

umpirsky commented 7 years ago

This is covered in https://github.com/umpirsky/Twig-Gettext-Extractor#custom-extensions.

If you think people may find it useful, you can create a gist or separate repo and we can link it from README. What do you think?

drzraf commented 7 years ago

I think it:

Extraction is a low-level tool but a necessary step of Twig translation. Most user will prefer that this low-level tool does not depend on extension itself (even PoEdit or xgettext does not need extensions)

umpirsky commented 7 years ago

More known is pretty relative term. :)

I'm not aware of any way to tell twig to ignore undefined extensions.

I agree it would simplify setup in deed.