Skip to content

Commit ffdb7ae

Browse files
committed
Translation for flash
1 parent 67fb593 commit ffdb7ae

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Controller/PlayerProfileController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use SpeedPuzzling\Web\Query\GetStatistics;
1515
use SpeedPuzzling\Web\Query\GetTags;
1616
use SpeedPuzzling\Web\Query\GetWjpcParticipants;
17-
use SpeedPuzzling\Web\Results\SolvedPuzzle;
1817
use SpeedPuzzling\Web\Services\PuzzlesSorter;
1918
use SpeedPuzzling\Web\Services\RetrieveLoggedUserProfile;
2019
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

src/Controller/StripeCheckoutSuccessController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@
1111
use Symfony\Component\Routing\Attribute\Route;
1212
use Symfony\Component\Security\Core\User\UserInterface;
1313
use Symfony\Component\Security\Http\Attribute\CurrentUser;
14+
use Symfony\Contracts\Translation\TranslatorInterface;
1415

1516
final class StripeCheckoutSuccessController extends AbstractController
1617
{
1718
public function __construct(
1819
readonly private MessageBusInterface $messageBus,
1920
readonly private RetrieveLoggedUserProfile $retrieveLoggedUserProfile,
21+
readonly private TranslatorInterface $translator,
2022
) {
2123
}
2224

@@ -42,7 +44,7 @@ public function __invoke(#[CurrentUser] UserInterface $user, string $sessionId):
4244
),
4345
);
4446

45-
$this->addFlash('success', 'flashes.membership_subscribed_successfully');
47+
$this->addFlash('success', $this->translator->trans('flashes.membership_subscribed_successfully'));
4648

4749
return $this->redirectToRoute('membership');
4850
}

0 commit comments

Comments
 (0)