-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
feat: translations extraction command #2045
base: master
Are you sure you want to change the base?
feat: translations extraction command #2045
Conversation
Introduced a new `translations:extract` command to facilitate extraction and processing of translation strings from layouts. Signed-off-by: Franck Matsos <[email protected]>
About static code analysis: I tried to resolve these problems. But without DI it's hard to decouple code properly, and I don't know what are the architecture choices about that. I didn't want to instantiate services manually for now (except for required classes from translation/twig components). |
Sorry, I swtich the PR to Draft as some unintended operations occured when I extracted translations this morning (it overwritten extraction file instead of update it, and some keys are missing). I fix that! 😄 |
Hello @fmatsos, thanks a lot for your contribution. Today I worked on some refactorings and I think the result is correct. I also simplified the options. Could you take a look please? Demo: |
As mentionned in discussion #2034, I searched how to easily extract translations from layouts like any other Symfony based website. Since Cecil is build on Symfony components, and translation component is already included, I do this proposal largely inspired by the original CLI Symfony command.
Now we can extract translations from our layouts or theme layout, without need to use external tool or script.
Hope it'll be useful!