-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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: [Commands] lang:find
show bad keys when scanning (v2)
#8285
Conversation
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.
I may not get something here... This command is described as:
Find and save available phrases to translate
Why does it suddenly show the wrong language keys? And how does it know which keys are bad?
Have you read the previous issue? @kenjis and I thought it would be worthwhile to warn the user when scanning that there are incorrect keys. Look at the output. Which keys are bad?
In short, anything that does not fall under the correct |
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.
Ok, now I get it. Thanks.
@@ -172,14 +186,16 @@ private function findTranslationsInFile($file): array | |||
preg_match_all('/lang\(\'([._a-z0-9\-]+)\'\)/ui', $fileContent, $matches); |
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.
There is one feature: The regular expression initially discards bad keys. They will not be shown in the list.
@neznaika0 Thank you! |
Description
Superseds #8149
Checklist: