Closed delyriand closed 5 months ago
Without this patch, data indexed in ES is in the default locale.
In Sylius, we have a postLoad on entities to add the current locale on the translation entity. But in CLI, it uses the default locale ('%locale%'):
postLoad
$fallbackLocale = $this->translationLocaleProvider->getDefaultLocaleCode(); $translatableEntity->setFallbackLocale($fallbackLocale); if ($this->commandBasedChecker !== null && $this->commandBasedChecker->isExecutedFromCLI()) { $translatableEntity->setCurrentLocale($fallbackLocale); return; }
We should see if we can't add a similar behavior to the plugin to simplify the code.
Without this patch, data indexed in ES is in the default locale.
In Sylius, we have a
postLoad
on entities to add the current locale on the translation entity. But in CLI, it uses the default locale ('%locale%'):We should see if we can't add a similar behavior to the plugin to simplify the code.