From b1848c3afa54db761bd03a100602e02fc18c6faa Mon Sep 17 00:00:00 2001 From: n1rwana <93197434+n1rwana@users.noreply.github.com> Date: Mon, 5 Sep 2022 22:30:01 +0300 Subject: [PATCH] ok 2.0 --- Web/Presenters/BlacklistPresenter.php | 5 ++--- locales/en.strings | 2 ++ locales/ru.strings | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Web/Presenters/BlacklistPresenter.php b/Web/Presenters/BlacklistPresenter.php index ede24240..37ed36ec 100644 --- a/Web/Presenters/BlacklistPresenter.php +++ b/Web/Presenters/BlacklistPresenter.php @@ -26,7 +26,7 @@ final class BlacklistPresenter extends OpenVKPresenter $record->setCreated(time()); $record->save(); - $this->flashFail("succ", "Успех", $target->getCanonicalName() . " занесён в чёрный список."); + $this->flashFail("succ", tr("success"), tr("user_blacklisted", $target->getCanonicalName())); } function renderRemoveFromBlacklist(): void @@ -35,10 +35,9 @@ final class BlacklistPresenter extends OpenVKPresenter $this->assertUserLoggedIn(); $record = $this->blacklists->getByAuthorAndTarget($this->user->identity->getId(), $this->postParam("id")); - //$record = new BlacklistItem(DB::i()->getContext()->table("blacklists")->where([ "author" => $this->user->identity->getId(), "target" => ])->fetch()); $name = $record->getTarget()->getCanonicalName(); $record->delete(false); - $this->flashFail("succ", "Успех", "$name удалён из чёрного списка."); + $this->flashFail("succ", tr("success"), tr("user_removed_from_the_blacklist", $name)); } } diff --git a/locales/en.strings b/locales/en.strings index cf6a53b0..017420ec 100644 --- a/locales/en.strings +++ b/locales/en.strings @@ -1145,6 +1145,8 @@ "blacklist" = "Blacklist"; "user_blacklisted_you" = "This user has blacklisted you."; +"user_blacklisted" = "$1 has been blacklisted" +"user_removed_from_the_blacklist" = "$1 has been removed from the blacklist." /* Away */ diff --git a/locales/ru.strings b/locales/ru.strings index 6081fdfe..960714d4 100644 --- a/locales/ru.strings +++ b/locales/ru.strings @@ -1187,6 +1187,7 @@ "edit_action" = "Изменить"; "transfer" = "Передать"; "close" = "Закрыть"; +"success" = "Успех"; "warning" = "Внимание"; "question_confirm" = "Это действие нельзя отменить. Вы действительно уверены в том что хотите сделать?"; @@ -1204,6 +1205,8 @@ "blacklist" = "Чёрный список"; "user_blacklisted_you" = "Пользователь внёс Вас в чёрный список."; +"user_blacklisted" = "$1 занесён в чёрный список." +"user_removed_from_the_blacklist" = "$1 удалён из чёрного списка." /* Away */