diff --git a/Web/Presenters/SupportPresenter.php b/Web/Presenters/SupportPresenter.php index 11d260d6..fd30328e 100644 --- a/Web/Presenters/SupportPresenter.php +++ b/Web/Presenters/SupportPresenter.php @@ -4,10 +4,7 @@ use openvk\Web\Models\Entities\Ticket; use openvk\Web\Models\Repositories\Tickets; use openvk\Web\Models\Entities\TicketComment; use openvk\Web\Models\Repositories\TicketComments; -use openvk\Web\Models\RowModel; use openvk\Web\Util\Telegram; -use Nette\Database\Table\ActiveRow; -use Chandler\Database\DatabaseConnection; use Chandler\Session\Session; use Netcarver\Textile; @@ -62,7 +59,7 @@ final class SupportPresenter extends OpenVKPresenter header("HTTP/1.1 302 Found"); header("Location: /support/view/" . $ticket->getId()); } else { - $this->flashFail("err", "Ошибка", "Вы не ввели имя или текст"); + $this->flashFail("err", tr("error"), tr("you_have_not_entered_name_or_text")); } } } @@ -154,7 +151,7 @@ final class SupportPresenter extends OpenVKPresenter header("HTTP/1.1 302 Found"); header("Location: /support/view/" . $id); } else { - $this->flashFail("err", "Ошибка", "Вы не ввели текст"); + $this->flashFail("err", tr("error"), tr("you_have_not_entered_text")); } } } @@ -199,7 +196,7 @@ final class SupportPresenter extends OpenVKPresenter $ticket->save(); } - $this->flashFail("succ", "Тикет изменён", "Изменения вступят силу через несколько секунд."); + $this->flashFail("succ", tr("ticket_changed"), tr("ticket_changed_comment")); } } diff --git a/locales/en.strings b/locales/en.strings index e89dd9ba..01bb6806 100644 --- a/locales/en.strings +++ b/locales/en.strings @@ -557,6 +557,12 @@ "author" = "Author"; +"you_have_not_entered_text" = "You have not entered any text"; +"you_have_not_entered_name_or_text" = "You did not enter a name or text"; + +"support_ticket_changed" = "Ticket changed"; +"support_ticket_changed_comment" = "The changes will take effect in a few seconds."; + /* Invite */ "invite" = "Invite"; "you_can_invite" = "You can invite your friends or acquaintances to the network using an individual link:"; diff --git a/locales/ru.strings b/locales/ru.strings index bb7b3f96..c4adddc8 100644 --- a/locales/ru.strings +++ b/locales/ru.strings @@ -582,6 +582,12 @@ "author" = "Автор"; +"you_have_not_entered_text" = "Вы не ввели текст"; +"you_have_not_entered_name_or_text" = "Вы не ввели имя или текст"; + +"support_ticket_changed" = "Тикет изменён"; +"support_ticket_changed_comment" = "Изменения вступят силу через несколько секунд."; + /* Invite */ "invite" = "Пригласить"; "you_can_invite" = "Вы можете пригласить своих друзей или знакомых в сеть с помощью индивидуальной ссылки:";