Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
twin-elements committed Jun 7, 2022
1 parent 77a432f commit 1df8331
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Controller/TranslateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Request;
use TwinElements\AdminBundle\Helper\TranslationsManager;
use TwinElements\Component\AdminTranslator\AdminTranslator;
use TwinElements\Component\Flashes\Flashes;
use TwinElements\FormExtensions\Type\SaveButtonsType;

Expand Down Expand Up @@ -42,7 +43,7 @@ public function dictionaryMain(Request $request, $category, Breadcrumbs $breadcr
/**
* @Route("/dictionary/{category}/{key}", name="dictionary_key_edit")
*/
public function settingsEditKey($category, $key, Request $request, Breadcrumbs $breadcrumbs, Flashes $flashes)
public function settingsEditKey($category, $key, Request $request, Breadcrumbs $breadcrumbs, Flashes $flashes, AdminTranslator $translator)
{
$formBuilder = $this->createFormBuilder();

Expand All @@ -65,7 +66,7 @@ public function settingsEditKey($category, $key, Request $request, Breadcrumbs $
$data = $form->getData();
$this->translationsManager->updateKeyTranslations($key, $category, $data);

$flashes->successMessage();
$flashes->successMessage($translator->translate('admin.success_operation'));

if ('save' === $form->getClickedButton()->getName()) {
return $this->redirectToRoute('dictionary_key_edit', array('category' => $category, 'key' => $key));
Expand Down

0 comments on commit 1df8331

Please sign in to comment.