Fix caching of parent locales file in translator
This commit is contained in:
parent
27290714b7
commit
02c9ac68a4
@ -460,7 +460,7 @@ EOF
|
|||||||
protected function computeFallbackLocales($locale)
|
protected function computeFallbackLocales($locale)
|
||||||
{
|
{
|
||||||
if (null === $this->parentLocales) {
|
if (null === $this->parentLocales) {
|
||||||
$parentLocales = json_decode(file_get_contents(__DIR__.'/Resources/data/parents.json'), true);
|
$this->parentLocales = json_decode(file_get_contents(__DIR__.'/Resources/data/parents.json'), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$locales = [];
|
$locales = [];
|
||||||
@ -473,7 +473,7 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
while ($locale) {
|
while ($locale) {
|
||||||
$parent = $parentLocales[$locale] ?? null;
|
$parent = $this->parentLocales[$locale] ?? null;
|
||||||
|
|
||||||
if ($parent) {
|
if ($parent) {
|
||||||
$locale = 'root' !== $parent ? $parent : null;
|
$locale = 'root' !== $parent ? $parent : null;
|
||||||
|
Reference in New Issue
Block a user