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

feat: translations extraction command #2045

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

Conversation

fmatsos
Copy link

@fmatsos fmatsos commented Sep 11, 2024

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!

Introduced a new `translations:extract` command to facilitate extraction and processing of translation strings from layouts.

Signed-off-by: Franck Matsos <github@franck.matsos.fr>
@fmatsos
Copy link
Author

fmatsos commented Sep 11, 2024

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).
So I can adapt the code if required.

@ArnaudLigny ArnaudLigny self-requested a review September 11, 2024 18:29
@fmatsos
Copy link
Author

fmatsos commented Sep 12, 2024

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! 😄

@fmatsos fmatsos marked this pull request as draft September 12, 2024 10:48
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.

1 participant