Commit a1944072 authored by Marcin Sedlak-Jakubowski's avatar Marcin Sedlak-Jakubowski Committed by Heinrich Lee Yu

Review and revise Campfire integration UI text

parent 2723df2e
......@@ -2,6 +2,8 @@
module Integrations
class Campfire < Integration
include ActionView::Helpers::UrlHelper
prop_accessor :token, :subdomain, :room
validates :token, presence: true, if: :activated?
......@@ -13,15 +15,39 @@ module Integrations
'Send notifications about push events to Campfire chat rooms.'
end
def help
docs_link = link_to _('Learn more.'), Rails.application.routes.url_helpers.help_page_url('api/services', anchor: 'campfire'), target: '_blank', rel: 'noopener noreferrer'
s_('CampfireService|Send notifications about push events to Campfire chat rooms. %{docs_link}').html_safe % { docs_link: docs_link.html_safe }
end
def self.to_param
'campfire'
end
def fields
[
{ type: 'text', name: 'token', placeholder: '', required: true },
{ type: 'text', name: 'subdomain', placeholder: '' },
{ type: 'text', name: 'room', placeholder: '' }
{
type: 'text',
name: 'token',
title: _('Campfire token'),
placeholder: '',
help: s_('CampfireService|API authentication token from Campfire.'),
required: true
},
{
type: 'text',
name: 'subdomain',
title: _('Campfire subdomain (optional)'),
placeholder: '',
help: s_('CampfireService|The %{code_open}.campfirenow.com%{code_close} subdomain.') % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
},
{
type: 'text',
name: 'room',
title: _('Campfire room ID (optional)'),
placeholder: '123456',
help: s_('CampfireService|From the end of the room URL.')
}
]
end
......
......@@ -258,7 +258,8 @@ GET /projects/:id/services/buildkite
## Campfire
Simple web-based real-time group chat
Send notifications about push events to Campfire chat rooms.
Note that [new users can no longer sign up for Campfire](https://basecamp.com/retired/campfire).
### Create/Edit Campfire service
......@@ -270,12 +271,12 @@ PUT /projects/:id/services/campfire
Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `token` | string | true | Campfire token |
| `subdomain` | string | false | Campfire subdomain |
| `room` | string | false | Campfire room |
| `push_events` | boolean | false | Enable notifications for push events |
| Parameter | Type | Required | Description |
|---------------|---------|----------|---------------------------------------------------------------------------------------------|
| `token` | string | true | Campfire API token. To find it, log into Campfire and select **My info**. |
| `subdomain` | string | false | Campfire subdomain. Text between `https://` and `.campfirenow.com` when you're logged in. |
| `room` | string | false | Campfire room. The last part of the URL when you're in a room. |
| `push_events` | boolean | false | Enable notifications for push events. |
### Delete Campfire service
......
......@@ -5938,6 +5938,27 @@ msgstr ""
msgid "Callback URL"
msgstr ""
msgid "Campfire room ID (optional)"
msgstr ""
msgid "Campfire subdomain (optional)"
msgstr ""
msgid "Campfire token"
msgstr ""
msgid "CampfireService|API authentication token from Campfire."
msgstr ""
msgid "CampfireService|From the end of the room URL."
msgstr ""
msgid "CampfireService|Send notifications about push events to Campfire chat rooms. %{docs_link}"
msgstr ""
msgid "CampfireService|The %{code_open}.campfirenow.com%{code_close} subdomain."
msgstr ""
msgid "Can be manually deployed to"
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