Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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