Skip to content

Commit 0d29f39

Browse files
Merge pull request #4 from matomo-org/PG-4519-improve-helptext
Improves helptext, adds FAQ link #PG-4519
2 parents e962f07 + 9ddc52e commit 0d29f39

18 files changed

Lines changed: 31 additions & 19 deletions

SystemSettings.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Piwik\Piwik;
1313
use Piwik\Settings\Setting;
1414
use Piwik\Settings\FieldConfig;
15+
use Piwik\Url;
1516

1617
class SystemSettings extends \Piwik\Settings\Plugin\SystemSettings
1718
{
@@ -29,7 +30,8 @@ private function createSlackOauthTokenSetting()
2930
return $this->makeSetting('slackOauthToken', $default = '', FieldConfig::TYPE_STRING, function (FieldConfig $field) {
3031
$field->title = Piwik::translate('Slack_OauthTokenSettingTitle');
3132
$field->uiControl = FieldConfig::UI_CONTROL_PASSWORD;
32-
$field->description = Piwik::translate('Slack_OauthTokenSettingDescription');
33+
$link = Url::addCampaignParametersToMatomoLink('https://matomo.org/?post_type=faq&p=87125&preview=true', null, null, 'App.SystemSettings.Slack') . '#step-1-get-a-slack-oauth-token';
34+
$field->inlineHelp = Piwik::translate('Slack_OauthTokenSettingDescription', ['<a href="' . $link . '" target="_blank" rel="noreferrer noopener">', '</a>']);
3335
$field->transform = function ($value) {
3436
return trim($value);
3537
};

lang/en.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"Slack": {
33
"ChannelId": "Slack Channel ID",
4-
"NoOauthTokenAdded": "Please add your Slack OauthToken %1$shere%2$s.",
5-
"OauthTokenRequiredErrorMessage": "Please add your Slack Oauth token in General Settings under Slack section.",
6-
"OauthTokenSettingTitle": "Slack Oauth Token",
7-
"OauthTokenSettingDescription": "Enter your Slack Oauth Token",
4+
"NoOauthTokenAdded": "Please add your Slack OAuth Token %1$shere%2$s.",
5+
"OauthTokenRequiredErrorMessage": "To enable Slack, provide your Slack OAuth Token in General settings > Slack.",
6+
"OauthTokenSettingTitle": "Slack OAuth Token",
7+
"OauthTokenSettingDescription": "Enter your Slack OAuth Token generated from your Slack. %1$sLearn more%2$s.",
88
"PleaseFindYourReport": "Here is your %1$s report for %2$s",
99
"SlackChannelIdRequiredErrorMessage": "Slack Channel ID cannot be empty.",
1010
"SlackChannel": "Slack Channel",
11-
"SlackEnterYourSlackChannelIdHelpText": "Enter your Slack Channel ID"
11+
"SlackEnterYourSlackChannelIdHelpText": "Enter the Slack Channel ID of the channel that will receive these reports. To find the ID, go to Slack and open the channel details > About tab. %1$sLearn more%2$s"
1212
}
1313
}
3.67 KB
Loading
2 KB
Loading
4.58 KB
Loading
30.9 KB
Loading
5.29 KB
Loading
30.2 KB
Loading
12.6 KB
Loading
12.5 KB
Loading

0 commit comments

Comments
 (0)