From c363a0a6c319ed68d23e260b6cfdad844ab1005e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Feb 2026 07:34:25 +0000 Subject: [PATCH 1/2] Initial plan From ddca8c11458621542c0ad2bf354b17e4f4e7e631 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Feb 2026 07:35:58 +0000 Subject: [PATCH 2/2] Remove commented-out LocaleSwitcher code and unused dependency Co-authored-by: javihgil <2581053+javihgil@users.noreply.github.com> --- src/Controller/SectionController.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Controller/SectionController.php b/src/Controller/SectionController.php index bad6ac4..e469778 100644 --- a/src/Controller/SectionController.php +++ b/src/Controller/SectionController.php @@ -12,7 +12,6 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Translation\LocaleSwitcher; use Twig\Environment; class SectionController extends AbstractController @@ -22,7 +21,6 @@ public function __construct( protected SectionVersionManagerInterface $sectionVersionManager, protected Environment $twig, protected CmsConfig $cmsConfig, - protected LocaleSwitcher $localeSwitcher, protected ?LoggerInterface $cmsLogger, ) { } @@ -83,7 +81,6 @@ public function renderById(string $section, Request $request, bool $adminPreview $request->attributes->set('_locale', $request->query->get('_locale')); $request->setLocale($request->attributes->get('_locale')); } - // $this->localeSwitcher->setLocale($request->getLocale()); if (!$publishedVersion) { $publishedVersion = $section->getLastVersion();