Commit c813fe2f authored by Justin Ho's avatar Justin Ho

Copy changes and move help to partial

- Extract help text to partial to reduce
complexity of model. Allows the use of path
helpers without the need to include them.
- Add translations for instructions.
parent f31709dc
......@@ -13,19 +13,8 @@ class SlackService < ChatNotificationService
'slack'
end
def help
'This service sends notifications about projects events to Slack channels.<br />
To set up this service:
<ol>
<li><a href="https://slack.com/apps/A0F7XDUAZ-incoming-webhooks">Add an incoming webhook</a> in your Slack team. The default channel can be overridden for each event.</li>
<li>Paste the <strong>Webhook URL</strong> into the field below.</li>
<li>Select events below to enable notifications. The <strong>Channel names</strong> and <strong>Username</strong> fields are optional.</li>
</ol>
<strong>Note:</strong> Usernames and private channels are not supported.'
end
def default_channel_placeholder
_('Channel names (e.g. general, people-ops)')
_('Slack channels (e.g. general, development)')
end
def webhook_placeholder
......
- webhooks_link_url = 'https://slack.com/apps/A0F7XDUAZ-incoming-webhooks'
- webhooks_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: webhooks_link_url }
.info-well
.well-segment
%p= s_('SlackIntegration|This service send notifications about projects\' events to Slack channels. To set up this service:')
%ol
%li
= s_('SlackIntegration|%{webhooks_link_start}Add an incoming webhook%{webhooks_link_end} in your Slack team. The default channel can be overridden for each event.').html_safe % { webhooks_link_start: webhooks_link_start, webhooks_link_end: '</a>'.html_safe }
%li
= s_('SlackIntegration|Paste the <strong>Webhook URL</strong> into the field below.').html_safe
%li
= s_('SlackIntegration|Select events below to enable notifications. The <strong>Slack channel names</strong> and <strong>Slack username</strong> fields are optional.').html_safe
%p.mt-3.mb-0
= s_('SlackIntegration|<strong>Note:</strong> Usernames and private channels are not supported.').html_safe
= link_to _('Learn more'), help_page_path('user/project/integrations/slack')
......@@ -16,7 +16,7 @@ The Slack Notifications Service allows your GitLab project to send events (e.g.
1. Select the **Slack notifications** project service to configure it.
1. Check the **Active** checkbox to turn on the service.
1. Check the checkboxes corresponding to the GitLab events you want to send to Slack as a notification.
1. For each event, optionally enter the Slack channels where you want to send the event, separated by a comma. If left empty, the event will be sent to the default channel that you configured in the Slack Configuration step. **Note:** Usernames and private channels are not supported. To send direct messages, use the Member ID found under user's Slack profile.
1. For each event, optionally enter the Slack channel names where you want to send the event, separated by a comma. If left empty, the event will be sent to the default channel that you configured in the Slack Configuration step. **Note:** Usernames and private channels are not supported. To send direct messages, use the Member ID found under user's Slack profile.
1. Paste the **Webhook URL** that you copied from the Slack Configuration step.
1. Optionally customize the Slack bot username that will be sending the notifications.
1. Configure the remaining options and click `Save changes`.
......
......@@ -3336,9 +3336,6 @@ msgstr ""
msgid "Changing group path can have unintended side effects."
msgstr ""
msgid "Channel names (e.g. general, people-ops)"
msgstr ""
msgid "Charts"
msgstr ""
......@@ -17829,9 +17826,27 @@ msgstr ""
msgid "Slack application"
msgstr ""
msgid "Slack channels (e.g. general, development)"
msgstr ""
msgid "Slack integration allows you to interact with GitLab via slash commands in a chat window."
msgstr ""
msgid "SlackIntegration|%{webhooks_link_start}Add an incoming webhook%{webhooks_link_end} in your Slack team. The default channel can be overridden for each event."
msgstr ""
msgid "SlackIntegration|<strong>Note:</strong> Usernames and private channels are not supported."
msgstr ""
msgid "SlackIntegration|Paste the <strong>Webhook URL</strong> into the field below."
msgstr ""
msgid "SlackIntegration|Select events below to enable notifications. The <strong>Slack channel names</strong> and <strong>Slack username</strong> fields are optional."
msgstr ""
msgid "SlackIntegration|This service send notifications about projects' events to Slack channels. To set up this service:"
msgstr ""
msgid "SlackService|2. Paste the <strong>Token</strong> into the field below"
msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment