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

Multiples Twig_Error_Syntax for symfony 3 twig templates #32

Closed Bindeo closed 8 years ago

Bindeo commented 8 years ago

I've got several errors like this with some filters. The templates are correct and they work:

PHP Fatal error: Uncaught exception 'Twig_Error_Syntax' with message 'Unknown "format_file_from_text" filter in "/var/www/html/project/front/app/Resources/TwigBundle/views/Exception/exception.html.twig" at line 12.' in phar:///usr/local/bin/twig-gettext-extractor/vendor/twig/twig/lib/Twig/ExpressionParser.php:601

umpirsky commented 8 years ago

@Bindeo You need to register Symfony\Bridge\Twig\Extension\CodeExtension extension. See https://github.com/umpirsky/Twig-Gettext-Extractor#custom-extensions.