-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Added a translation:debug command #10076
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
Conversation
👍 very nice idea |
I see several issues with this command:
May I point you to https://github.com/Incenteev/IncenteevTranslationCheckerBundle which implement a few commands to check translations (only 2 at the moment, but more are planned) ? |
@stof you can pass |
As per @stof comment I sanitized and truncated (limited to 40 chars) the messages so they can be previewed without breaking the output (the most important informations being the state and id) |
The <info>%command.name%</info> command helps finding unused or missing translation messages and | ||
comparing them with the fallback ones by inspecting the templates and translation files of a given bundle. | ||
|
||
You can display informations about a bundle translations in a specific locale: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
information
I see no added tests or docu PR |
I've fixed a bunch of small edge cases on top of this PR. See #10368 |
…abpot) This PR was merged into the 2.5-dev branch. Discussion ---------- [FrameworkBundle] Added a translation:debug command | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | This PR is based on #10076 but fixes a bunch of issues for edge cases. It also uses the new Table helper. Original description: This pull request adds a `translation:debug` command that can be used to inspect unused / missing messages and compare them with the fallback ones (for example to detect copy pasted strings). This is inspired by this ruby project https://github.com/glebm/i18n-tasks Example of output:  Commits ------- f039bde [FrameworkBundle] fixed edge cases for translation:debug and tweaked the output 597a310 Added a translation:debug command
This pull request adds a
translation:debug
command that can be used to inspect unused / missing messages and compare them with the fallback ones (for example to detect copy pasted strings). This is inspired by this ruby project https://github.com/glebm/i18n-tasksExample of output: