Skip to content

[Translation] Fix caching of parent locales file in translator #37449

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
Jun 30, 2020

Conversation

jvasseur
Copy link
Contributor

@jvasseur jvasseur commented Jun 29, 2020

Q A
Branch? 4.4 (this is the lowest maintained branch with this code)
Bug fix? yes
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR

The parentLocales property was probably meant as a cache for the content of the parents.json file but instead the content is stored in a local variable and the property stays null. This means the file is read on each call to computeFallbackLocales.

This PR update the code to what was probably meant to be.

(Ref #28070)

@nicolas-grekas
Copy link
Member

Thank you @jvasseur.

@nicolas-grekas nicolas-grekas merged commit 78e6fc4 into symfony:4.4 Jun 30, 2020
@jvasseur jvasseur deleted the patch-1 branch June 30, 2020 15:11
This was referenced Jul 24, 2020
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.

4 participants