Commit 66ed4d8b authored by Amy Qualls's avatar Amy Qualls

Minor revisions to Mattermost integration page

Revise text that I'm comfortable changing around. This page is
formatted differently than I'm used to, and it needs far more work
than what I've done here to make it good, but I can at least reunite
all the help steps together and bring them closer to GitLab style.
parent beba9e68
...@@ -14,7 +14,7 @@ class MattermostSlashCommandsService < SlashCommandsService ...@@ -14,7 +14,7 @@ class MattermostSlashCommandsService < SlashCommandsService
end end
def description def description
"Perform common operations in Mattermost" "Perform common tasks with slash commands."
end end
def self.to_param def self.to_param
......
- pretty_name = @project&.full_name ? html_escape(@project&.full_name) : '<' + _('project name') + '>' - pretty_name = @project&.full_name ? html_escape(@project&.full_name) : '<' + _('project name') + '>'
- run_actions_text = html_escape(s_("ProjectService|Perform common operations on GitLab project: %{project_name}")) % { project_name: pretty_name } - run_actions_text = html_escape(s_("ProjectService|Perform common operations on GitLab project: %{project_name}")) % { project_name: pretty_name }
%p= s_("ProjectService|To set up this service:") %p= s_("ProjectService|To configure this integration, you should:")
%ul.list-unstyled.indent-list %ul.list-unstyled.indent-list
%li %li
1. 1.
= link_to 'https://docs.mattermost.com/developer/slash-commands.html#enabling-custom-commands', target: '_blank', rel: 'noopener noreferrer nofollow' do = link_to 'https://docs.gitlab.com/ee/user/project/integrations/mattermost_slash_commands.html#enable-custom-slash-commands', target: '_blank', rel: 'noopener noreferrer nofollow' do
Enable custom slash commands Enable custom slash commands
= sprite_icon('external-link') = sprite_icon('external-link')
on your Mattermost installation on your Mattermost installation.
%li %li
2. 2.
= link_to 'https://docs.mattermost.com/developer/slash-commands.html#set-up-a-custom-command', target: '_blank', rel: 'noopener noreferrer nofollow' do = link_to 'https://docs.gitlab.com/ee/user/project/integrations/mattermost_slash_commands.html#create-a-slash-command', target: '_blank', rel: 'noopener noreferrer nofollow' do
Add a slash command Add a slash command
= sprite_icon('external-link') = sprite_icon('external-link')
in your Mattermost team with these options: in your Mattermost team with the options listed below.
%li
3. Paste the token into the
%strong Token
field.
%li
4. Select the
%strong Active
check box, then select
%strong Save changes
to start using GitLab inside Mattermost!
%hr %hr
.help-form .help-form
...@@ -85,17 +96,3 @@ ...@@ -85,17 +96,3 @@
= text_field_tag :autocomplete_description, run_actions_text, class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :autocomplete_description, run_actions_text, class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-append .input-group-append
= clipboard_button(target: '#autocomplete_description', class: 'input-group-text') = clipboard_button(target: '#autocomplete_description', class: 'input-group-text')
%hr
%ul.list-unstyled.indent-list
%li
3. Paste the
%strong Token
into the field below
%li
4. Select the
%strong Active
checkbox, press
%strong Save changes
and start using GitLab inside Mattermost!
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
.info-well .info-well
.well-segment .well-segment
%p %p
= s_("MattermostService|This service allows users to perform common operations on this project by entering slash commands in Mattermost.") = s_("MattermostService|Use this service to perform common tasks in your project by entering slash commands in Mattermost.")
= link_to help_page_path('user/project/integrations/mattermost_slash_commands.md'), target: '_blank' do = link_to help_page_path('user/project/integrations/mattermost_slash_commands.md'), target: '_blank' do
= _("View documentation") = _("How do I configure this integration?")
= sprite_icon('external-link') = sprite_icon('external-link')
%p.inline %p.inline
= s_("MattermostService|See list of available commands in Mattermost after setting up this service, by entering") = s_("MattermostService|After you configure the integration, view your new Mattermost commands by entering")
%kbd.inline /&lt;trigger&gt; help %kbd.inline /&lt;trigger&gt; help
- if !enabled && @service.project_level? - if !enabled && @service.project_level?
= render 'projects/services/mattermost_slash_commands/detailed_help', subject: @service = render 'projects/services/mattermost_slash_commands/detailed_help', subject: @service
......
...@@ -15531,6 +15531,9 @@ msgstr "" ...@@ -15531,6 +15531,9 @@ msgstr ""
msgid "How do I configure runners?" msgid "How do I configure runners?"
msgstr "" msgstr ""
msgid "How do I configure this integration?"
msgstr ""
msgid "How do I generate it?" msgid "How do I generate it?"
msgstr "" msgstr ""
...@@ -18882,6 +18885,9 @@ msgstr "" ...@@ -18882,6 +18885,9 @@ msgstr ""
msgid "MattermostService|Add to Mattermost" msgid "MattermostService|Add to Mattermost"
msgstr "" msgstr ""
msgid "MattermostService|After you configure the integration, view your new Mattermost commands by entering"
msgstr ""
msgid "MattermostService|Command trigger word" msgid "MattermostService|Command trigger word"
msgstr "" msgstr ""
...@@ -18900,13 +18906,10 @@ msgstr "" ...@@ -18900,13 +18906,10 @@ msgstr ""
msgid "MattermostService|Response username" msgid "MattermostService|Response username"
msgstr "" msgstr ""
msgid "MattermostService|See list of available commands in Mattermost after setting up this service, by entering"
msgstr ""
msgid "MattermostService|Suggestions:" msgid "MattermostService|Suggestions:"
msgstr "" msgstr ""
msgid "MattermostService|This service allows users to perform common operations on this project by entering slash commands in Mattermost." msgid "MattermostService|Use this service to perform common tasks in your project by entering slash commands in Mattermost."
msgstr "" msgstr ""
msgid "Max 100,000 events" msgid "Max 100,000 events"
...@@ -24086,7 +24089,7 @@ msgstr "" ...@@ -24086,7 +24089,7 @@ msgstr ""
msgid "ProjectService|TeamCity URL" msgid "ProjectService|TeamCity URL"
msgstr "" msgstr ""
msgid "ProjectService|To set up this service:" msgid "ProjectService|To configure this integration, you should:"
msgstr "" msgstr ""
msgid "ProjectSettings|%{link_start}What are description templates?%{link_end}" msgid "ProjectSettings|%{link_start}What are description templates?%{link_end}"
......
...@@ -15,7 +15,7 @@ RSpec.describe 'Set up Mattermost slash commands', :js do ...@@ -15,7 +15,7 @@ RSpec.describe 'Set up Mattermost slash commands', :js do
let(:mattermost_enabled) { true } let(:mattermost_enabled) { true }
it 'shows a help message' do it 'shows a help message' do
expect(page).to have_content("This service allows users to perform common") expect(page).to have_content("Use this service to perform common")
end end
it 'shows a token placeholder' do it 'shows a token placeholder' do
......
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