Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[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

Merged
merged 1 commit into from
Feb 7, 2021

Conversation

xabbuh
Copy link
Member

@xabbuh 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

@xabbuh xabbuh added this to the 4.4 milestone Feb 6, 2021
@carsonbot carsonbot changed the title [FrameworkBundle][Translator] scan directories for translations sequentially [FrameworkBundle] [Translator] scan directories for translations sequentially Feb 6, 2021
@xabbuh xabbuh force-pushed the issue-40014 branch 2 times, most recently from 05bce3a to 29c971c Compare February 6, 2021 12:43
jderusse
jderusse previously approved these changes Feb 6, 2021
@carsonbot carsonbot changed the title [FrameworkBundle] [Translator] scan directories for translations sequentially [FrameworkBundle][Translator] scan directories for translations sequentially Feb 6, 2021
@jderusse jderusse dismissed their stale review February 6, 2021 14:47

Could you please add a test?

->sortByName()
;
foreach ($finder as $file) {
$fileNameParts = explode('.', basename($file));
Copy link

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];
Copy link

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?

Copy link
Member Author

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.

@xabbuh
Copy link
Member Author

xabbuh commented Feb 7, 2021

@jderusse test added

@nicolas-grekas
Copy link
Member

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit 00e3356 into symfony:4.4 Feb 7, 2021
@xabbuh xabbuh deleted the issue-40014 branch February 7, 2021 19:17
This was referenced Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.