-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle][Translator] scan directories for translations sequentially #40116
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
xabbuh
commented
Feb 6, 2021
Q | A |
---|---|
Branch? | 4.4 |
Bug fix? | yes |
New feature? | no |
Deprecations? | no |
Tickets | Fix #40014 |
License | MIT |
Doc PR |
05bce3a
to
29c971c
Compare
->sortByName() | ||
; | ||
foreach ($finder as $file) { | ||
$fileNameParts = explode('.', basename($file)); |
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.
Is there a reason for using basename over $file->getBasename()?
; | ||
foreach ($finder as $file) { | ||
$fileNameParts = explode('.', basename($file)); | ||
$locale = $fileNameParts[\count($fileNameParts) - 2]; |
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.
Suggestion : Wouldn't $info->getBasename($info->getExtension())) give us the locale? Assuming the filer is only matching patterns such as 'ar.json'? I would remove the need for the explode and fileparts?
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.
That code was here before. I suggest not to change it as part of this bugfix.
@jderusse test added |
Thank you @xabbuh. |