mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 08:23:52 +00:00
Remove repetition in "Discussion pages" preferences
Bug: T289187 Change-Id: Id6c90546e4b57754e13b55f7c61610b51de87966
This commit is contained in:
parent
232dc64246
commit
75d63bb056
|
@ -37,14 +37,15 @@
|
||||||
"discussiontools-preference-discussion-link": "https://www.mediawiki.org/wiki/Talk:Talk_pages_project",
|
"discussiontools-preference-discussion-link": "https://www.mediawiki.org/wiki/Talk:Talk_pages_project",
|
||||||
"discussiontools-preference-info-link": "https://www.mediawiki.org/wiki/Special:MyLanguage/Talk_pages_project/Feature_summary",
|
"discussiontools-preference-info-link": "https://www.mediawiki.org/wiki/Special:MyLanguage/Talk_pages_project/Feature_summary",
|
||||||
"discussiontools-preference-label": "Discussion tools",
|
"discussiontools-preference-label": "Discussion tools",
|
||||||
|
"discussiontools-preference-summary": "You can learn more about these features by reading the [https://www.mediawiki.org/wiki/Special:MyLanguage/Talk_pages_project/Feature_summary feature summary].",
|
||||||
"discussiontools-preference-newtopictool": "Enable quick topic adding",
|
"discussiontools-preference-newtopictool": "Enable quick topic adding",
|
||||||
"discussiontools-preference-newtopictool-help": "This will show you an inline form for adding new topics. You can learn more about this feature by reading the [https://www.mediawiki.org/wiki/Special:MyLanguage/Talk_pages_project/Feature_summary feature summary].",
|
"discussiontools-preference-newtopictool-help": "This will show you an inline form for adding new topics.",
|
||||||
"discussiontools-preference-replytool": "Enable quick replying",
|
"discussiontools-preference-replytool": "Enable quick replying",
|
||||||
"discussiontools-preference-replytool-help": "This will show you a link to reply to talk page comments in one click. You can learn more about this feature by reading the [https://www.mediawiki.org/wiki/Special:MyLanguage/Talk_pages_project/Feature_summary feature summary].",
|
"discussiontools-preference-replytool-help": "This will show you a link to reply to talk page comments in one click.",
|
||||||
"discussiontools-preference-sourcemodetoolbar": "Enable editing tools in source mode",
|
"discussiontools-preference-sourcemodetoolbar": "Enable editing tools in source mode",
|
||||||
"discussiontools-preference-sourcemodetoolbar-help": "This will add a toolbar to the quick replying and quick topic adding features’ source modes that includes shortcuts for pinging and adding links.",
|
"discussiontools-preference-sourcemodetoolbar-help": "This will add a toolbar to the quick replying and quick topic adding features’ source modes that includes shortcuts for pinging and adding links.",
|
||||||
"discussiontools-preference-topicsubscription": "Enable topic subscription",
|
"discussiontools-preference-topicsubscription": "Enable topic subscription",
|
||||||
"discussiontools-preference-topicsubscription-help": "This will allow you to subscribe to receive notifications about comments on individual topics. You can learn more about this feature by reading the [https://www.mediawiki.org/wiki/Special:MyLanguage/Talk_pages_project/Feature_summary feature summary].",
|
"discussiontools-preference-topicsubscription-help": "This will allow you to subscribe to receive notifications about comments on individual topics.",
|
||||||
"discussiontools-replylink": "reply",
|
"discussiontools-replylink": "reply",
|
||||||
"discussiontools-replywidget-abandon": "Are you sure you want to discard the comment you are writing?",
|
"discussiontools-replywidget-abandon": "Are you sure you want to discard the comment you are writing?",
|
||||||
"discussiontools-replywidget-abandon-discard": "Discard comment",
|
"discussiontools-replywidget-abandon-discard": "Discard comment",
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
"discussiontools-preference-discussion-link": "{{optional|Used on [[Special:Preferences]] as a link to a page where users can discuss this Beta Feature. Defaults to a page on MediaWiki.org.}}",
|
"discussiontools-preference-discussion-link": "{{optional|Used on [[Special:Preferences]] as a link to a page where users can discuss this Beta Feature. Defaults to a page on MediaWiki.org.}}",
|
||||||
"discussiontools-preference-info-link": "{{optional|Used on [[Special:Preferences]] as a link to a page where users can learn about this Beta Feature. Defaults to a page on MediaWiki.org.}}",
|
"discussiontools-preference-info-link": "{{optional|Used on [[Special:Preferences]] as a link to a page where users can learn about this Beta Feature. Defaults to a page on MediaWiki.org.}}",
|
||||||
"discussiontools-preference-label": "Used in [[Special:Preferences]].\n\nUsed as label for checkbox to enable discussion tools as Beta Feature.\n\nThe description for this checkbox is: {{msg-mw|discussiontools-preference-description}}",
|
"discussiontools-preference-label": "Used in [[Special:Preferences]].\n\nUsed as label for checkbox to enable discussion tools as Beta Feature.\n\nThe description for this checkbox is: {{msg-mw|discussiontools-preference-description}}",
|
||||||
|
"discussiontools-preference-summary": "Used in [[Special:Preferences]] in the section titled {{msg-mw|prefs-discussion}}, at the top as a summary for the whole section.",
|
||||||
"discussiontools-preference-newtopictool": "Used in [[Special:Preferences]] in the section titled {{msg-mw|prefs-discussion}}, in the same list with:\n* {{msg-mw|Discussiontools-preference-replytool}}.\n\nUsed as label for checkbox to enable the new topic tool.\n\nThe help text for this checkbox is: {{msg-mw|discussiontools-preference-newtopictool-help}}",
|
"discussiontools-preference-newtopictool": "Used in [[Special:Preferences]] in the section titled {{msg-mw|prefs-discussion}}, in the same list with:\n* {{msg-mw|Discussiontools-preference-replytool}}.\n\nUsed as label for checkbox to enable the new topic tool.\n\nThe help text for this checkbox is: {{msg-mw|discussiontools-preference-newtopictool-help}}",
|
||||||
"discussiontools-preference-newtopictool-help": "Used in [[Special:Preferences]].\n\nUsed as help text for the checkbox {{msg-mw|discussiontools-preference-newtopictool}}",
|
"discussiontools-preference-newtopictool-help": "Used in [[Special:Preferences]].\n\nUsed as help text for the checkbox {{msg-mw|discussiontools-preference-newtopictool}}",
|
||||||
"discussiontools-preference-replytool": "Used in [[Special:Preferences]] in the section titled {{msg-mw|prefs-discussion}}, in the same list with:\n* {{msg-mw|Discussiontools-preference-newtopictool}}.\n\nUsed as label for checkbox to enable the reply tool.\n\nThe help text for this checkbox is: {{msg-mw|discussiontools-preference-replytool-help}}",
|
"discussiontools-preference-replytool": "Used in [[Special:Preferences]] in the section titled {{msg-mw|prefs-discussion}}, in the same list with:\n* {{msg-mw|Discussiontools-preference-newtopictool}}.\n\nUsed as label for checkbox to enable the reply tool.\n\nThe help text for this checkbox is: {{msg-mw|discussiontools-preference-replytool-help}}",
|
||||||
|
|
|
@ -24,6 +24,14 @@ class PreferenceHooks implements
|
||||||
* @param array &$preferences
|
* @param array &$preferences
|
||||||
*/
|
*/
|
||||||
public function onGetPreferences( $user, &$preferences ) {
|
public function onGetPreferences( $user, &$preferences ) {
|
||||||
|
if ( HookUtils::isFeatureAvailableToUser( $user ) ) {
|
||||||
|
$preferences['discussiontools-summary'] = [
|
||||||
|
'type' => 'info',
|
||||||
|
'default' => wfMessage( 'discussiontools-preference-summary' )->parse(),
|
||||||
|
'raw' => true,
|
||||||
|
'section' => 'editing/discussion',
|
||||||
|
];
|
||||||
|
}
|
||||||
foreach ( HookUtils::FEATURES as $feature ) {
|
foreach ( HookUtils::FEATURES as $feature ) {
|
||||||
if ( HookUtils::isFeatureAvailableToUser( $user, $feature ) ) {
|
if ( HookUtils::isFeatureAvailableToUser( $user, $feature ) ) {
|
||||||
$preferences["discussiontools-$feature"] = [
|
$preferences["discussiontools-$feature"] = [
|
||||||
|
|
Loading…
Reference in a new issue