added translations for messages

This commit is contained in:
Godfrey M 2023-09-28 12:15:17 -07:00
parent f8730adb11
commit 8792d654b6
2 changed files with 4 additions and 2 deletions

View file

@ -124,11 +124,11 @@ class SlackSettingsForm extends Component
$test = $webhook->post($this->webhook_endpoint, ['body' => $payload]);
if(($test->getStatusCode() == 302)||($test->getStatusCode() == 301)){
return session()->flash('error' , 'ERROR: 301/302 '.$this->webhook_endpoint.' returns a redirect. For security reasons, we dont follow redirects. Please use the actual endpoint.');
return session()->flash('error' , trans('admin/settings/message.webhook.error_redirect', ['endpoint' => $this->webhook_endpoint]));
}
$this->isDisabled='';
$this->save_button = trans('general.save');
return session()->flash('success' , 'Your '.$this->webhook_name.' Integration works!');
return session()->flash('success' , trans('admin/settings/message.webhook.success', ['webhook_name' => $this->webhook_name]));
} catch (\Exception $e) {

View file

@ -35,10 +35,12 @@ return [
],
'webhook' => [
'sending' => 'Sending :app test message...',
'success' => 'Your :webhook_name Integration works!',
'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. :app responded with: :error_message',
'error_redirect' => 'ERROR: 301/302 :endpoint returns a redirect. For security reasons, we dont follow redirects. Please use the actual endpoint.',
'error_misc' => 'Something went wrong. :( ',
]
];