-
Notifications
You must be signed in to change notification settings - Fork 32
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
Not working with TWIG ~1.24 #47
Comments
Thanks! We should handle this. PRs are welcome. :) |
Add support for trans and transchoice
Added new PR. |
There was one more thing: transchoice function |
Wow! Great. |
But note, that this construct does not seem to be recognized (not converted from Twig to PHP):
|
Also this fails too:
with
While it should not. But this:
works |
There was changes in twig relating translation, this cause me open this ticket :) |
Are you sure this is Twig specific and not Symfony specfic? Because you linked Symfony documentation. |
Due to changes of twig translations method in generated PHP templates - need to add correct keyword.
Current translation string looks like: $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->getTranslator()->trans("Greeting.", array(), "messages");
I'v solved this with changing language parameter with keyword parameter.
Command looks like:
twig-gettext-extractor --sort-output --force-po -o messages.pot --keyword="trans" --files
cat /tmp/tempfile
The text was updated successfully, but these errors were encountered: