Skip to content

Conversation

@drzraf
Copy link

@drzraf drzraf commented Dec 9, 2016

Can't even parse a Drupal template without this

@umpirsky
Copy link
Owner

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
Copy link
Author

drzraf commented Dec 11, 2016

I think it:

  • either it should be built-in Twig-Gettext-Extractor (more known framework extensions = more out of the box support)
  • either the parser should be made generic-enough/relax-enough (Twig option for that?) to support translations extraction even if some unknown extensions/filters are hit
  • either a generic parser should be built into GNU xgettext

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants