Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/project_services/mattermost_service.rb')
-rw-r--r--app/models/project_services/mattermost_service.rb19
1 files changed, 7 insertions, 12 deletions
diff --git a/app/models/project_services/mattermost_service.rb b/app/models/project_services/mattermost_service.rb
index 9cff979fcf2..732a7c32a03 100644
--- a/app/models/project_services/mattermost_service.rb
+++ b/app/models/project_services/mattermost_service.rb
@@ -2,13 +2,14 @@
class MattermostService < ChatNotificationService
include SlackMattermost::Notifier
+ include ActionView::Helpers::UrlHelper
def title
- 'Mattermost notifications'
+ s_('Mattermost notifications')
end
def description
- 'Receive event notifications in Mattermost'
+ s_('Send notifications about project events to Mattermost channels.')
end
def self.to_param
@@ -16,21 +17,15 @@ class MattermostService < ChatNotificationService
end
def help
- 'This service sends notifications about projects events to Mattermost channels.<br />
- To set up this service:
- <ol>
- <li><a href="https://docs.mattermost.com/developer/webhooks-incoming.html#enabling-incoming-webhooks">Enable incoming webhooks</a> in your Mattermost installation.</li>
- <li><a href="https://docs.mattermost.com/developer/webhooks-incoming.html#creating-integrations-using-incoming-webhooks">Add an incoming webhook</a> in your Mattermost team. The default channel can be overridden for each event.</li>
- <li>Paste the webhook <strong>URL</strong> into the field below.</li>
- <li>Select events below to enable notifications. The <strong>Channel handle</strong> and <strong>Username</strong> fields are optional.</li>
- </ol>'
+ docs_link = link_to _('Learn more.'), Rails.application.routes.url_helpers.help_page_url('user/project/integrations/mattermost'), target: '_blank', rel: 'noopener noreferrer'
+ s_('Send notifications about project events to Mattermost channels. %{docs_link}').html_safe % { docs_link: docs_link.html_safe }
end
def default_channel_placeholder
- "Channel handle (e.g. town-square)"
+ 'my-channel'
end
def webhook_placeholder
- 'http://mattermost.example.com/hooks/…'
+ 'http://mattermost.example.com/hooks/'
end
end