From cc2fc34ec92ec9154991a041bf5d683a33ca6c9c Mon Sep 17 00:00:00 2001 From: Thomas Date: Sun, 3 May 2020 14:00:07 +0200 Subject: [PATCH] Some fixes --- src/Controller/FediPlanController.php | 4 ++-- translations/fediplan.en.yaml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Controller/FediPlanController.php b/src/Controller/FediPlanController.php index e284c70..02fa059 100644 --- a/src/Controller/FediPlanController.php +++ b/src/Controller/FediPlanController.php @@ -131,7 +131,7 @@ class FediPlanController extends AbstractController /** * @Route("/{_locale}/schedule", name="schedule", defaults={"_locale"="en"}, requirements={"_locale": "%allowed_language%"}) */ - public function schedule(Request $request, Mastodon_api $mastodon_api) + public function schedule(Request $request, Mastodon_api $mastodon_api, TranslatorInterface $translator) { $compose = new Compose(); @@ -233,7 +233,7 @@ class FediPlanController extends AbstractController $compose->getPollOptions()->add($pollOption2); $session->getFlashBag()->add( 'Success', - 'The message has been scheduled' + $translator->trans('common.schedule_success', [], 'fediplan', 'en') ); $form = $this->createForm(ComposeType::class, $compose, ['user' => $this->getUser()]); } diff --git a/translations/fediplan.en.yaml b/translations/fediplan.en.yaml index 134cf82..169a44e 100644 --- a/translations/fediplan.en.yaml +++ b/translations/fediplan.en.yaml @@ -19,6 +19,7 @@ common: edit: Edit start: Start proceed_confirm: Do you want to proceed? + schedule_success: The message has been scheduled start_upload: Start upload counter: Counter license: License