From 27e5832a28395403a71916173ca6fc09843cf81f Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 15 Feb 2023 14:06:52 -0800 Subject: [PATCH] Use existing slack translations Signed-off-by: snipe --- app/Http/Livewire/SlackSettingsForm.php | 4 ++-- resources/lang/en/admin/settings/message.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Http/Livewire/SlackSettingsForm.php b/app/Http/Livewire/SlackSettingsForm.php index 8e3e148f3d..5c35454a70 100644 --- a/app/Http/Livewire/SlackSettingsForm.php +++ b/app/Http/Livewire/SlackSettingsForm.php @@ -60,11 +60,11 @@ class SlackSettingsForm extends Component return session()->flash('success' , 'Your Slack Integration works!'); } catch (\Exception $e) { - return session()->flash('error' , 'Please check the channel name and webhook endpoint URL ('.e($this->slack_endpoint).'). Slack responded with: '.$e->getMessage()); + return session()->flash('error' , trans('admin/settings/message.slack.error', ['error_message' => $e->getMessage()])); } //} - return session()->flash('message' , 'Something went wrong :( '); + return session()->flash('message' , trans('admin/settings/message.slack.error_misc')); diff --git a/resources/lang/en/admin/settings/message.php b/resources/lang/en/admin/settings/message.php index 174a15fbd9..b0648d1c1c 100644 --- a/resources/lang/en/admin/settings/message.php +++ b/resources/lang/en/admin/settings/message.php @@ -38,6 +38,7 @@ return [ 'success_pt1' => 'Success! Check the ', 'success_pt2' => ' channel for your test message, and be sure to click SAVE below to store your settings.', '500' => '500 Server Error.', - 'error' => 'Something went wrong.', + 'error' => 'Something went wrong. Slack responded with: :error_message', + 'error_misc' => 'Something went wrong. :( ', ] ];