8000 Fix caching of parent locales file in translator · symfony/symfony@02c9ac6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 02c9ac6

Browse files
authored
Fix caching of parent locales file in translator
1 parent 2729071 commit 02c9ac6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Translation/Translator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ private function loadFallbackCatalogues(string $locale): void
460460
protected function computeFallbackLocales($locale)
461461
{
462462
if (null === $this->parentLocales) {
463-
$parentLocales = json_decode(file_get_contents(__DIR__.'/Resources/data/parents.json'), true);
463+
$this->parentLocales = json_decode(file_get_contents(__DIR__.'/Resources/data/parents.json'), true);
464464
}
465465

466466
$locales = [];
@@ -473,7 +473,7 @@ protected function computeFallbackLocales($locale)
473473
}
474474

475475
while ($locale) {
476-
$parent = $parentLocales[$locale] ?? null;
476+
$parent = $this->parentLocales[$locale] ?? null;
477477

478478
if ($parent) {
479479
$locale = 'root' !== $parent ? $parent : null;

0 commit comments

Comments
 (0)
0