From 2a3011d3585849c818e548ea30e6b8bbcd986098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 28 Mar 2023 10:45:29 +0200 Subject: [PATCH] Fixed: force collabora to use the current locale for the UI + improve sidebar on opening --- src/Bundle/ChillWopiBundle/src/Controller/Editor.php | 4 +++- .../ChillWopiBundle/src/Resources/views/Editor/page.html.twig | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillWopiBundle/src/Controller/Editor.php b/src/Bundle/ChillWopiBundle/src/Controller/Editor.php index d19a98052..a60298f97 100644 --- a/src/Bundle/ChillWopiBundle/src/Controller/Editor.php +++ b/src/Bundle/ChillWopiBundle/src/Controller/Editor.php @@ -20,6 +20,7 @@ use Chill\WopiBundle\Service\Controller\ResponderInterface; use Exception; use Lexik\Bundle\JWTAuthenticationBundle\Services\JWTTokenManagerInterface; use loophp\psr17\Psr17Interface; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -81,7 +82,7 @@ final class Editor $this->router = $router; } - public function __invoke(string $fileId): Response + public function __invoke(string $fileId, Request $request): Response { if (null === $user = $this->security->getUser()) { throw new AccessDeniedHttpException('Please authenticate to access this feature'); @@ -150,6 +151,7 @@ final class Editor UrlGeneratorInterface::ABSOLUTE_URL ), 'closebutton' => 1, + 'lang' => $request->getLocale(), ] ) ); diff --git a/src/Bundle/ChillWopiBundle/src/Resources/views/Editor/page.html.twig b/src/Bundle/ChillWopiBundle/src/Resources/views/Editor/page.html.twig index 6534dfd30..c96833aa1 100644 --- a/src/Bundle/ChillWopiBundle/src/Resources/views/Editor/page.html.twig +++ b/src/Bundle/ChillWopiBundle/src/Resources/views/Editor/page.html.twig @@ -25,6 +25,7 @@
+