Include twig support
Closed this issue ยท 6 comments
williamdes commented
Can you add the following files (from phpMyAdmin) to provide twig support:
Twig\I18nExtension
Twig\I18n\TokenParserTrans
Twig\I18n\NodeTrans
In my local test this works perfectly (using my namespace)
$twig->addExtension(new PhpMyAdmin\Twig\I18nExtension());
nijel commented
Probably makes sense to move it to the motranslator, what does @MauricioFauth think?
MauricioFauth commented
@williamdes Is your idea to move these files to motranslator? With this, the motranslator would depend on twig/extensions
and twig/twig
.
williamdes commented
@MauricioFauth you are right
I see 4 solutions:
- Add dependency in the dev mode only
- Create a repository like
phpmyadmin/motranslator-twig
- Add the files to this repository and use them without composer
nijel commented
Having separate repository sounds like a good choice, that way it will have correct deps and will be easier to integrate.
MauricioFauth commented
I agree with @nijel
nijel commented
It's now here https://github.com/phpmyadmin/motranslator-twig without any code