Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Symfony/Component/Translation/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ public function getLocale(): string
*/
public function setFallbackLocales(array $locales): void
{
if ($this->getFallbackLocales() === $locales) {
// No change in fallback locales:
// Do not clear catalogues as regeneration of catalogues is computational expensive.
Comment on lines +149 to +150
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// No change in fallback locales:
// Do not clear catalogues as regeneration of catalogues is computational expensive.

return;
}

// needed as the fallback locales are linked to the already loaded catalogues
$this->catalogues = [];

Expand Down
Loading