mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 07:54:13 +00:00
Always show a cross-wiki notifications preference, even if the beta feature is disabled
In the non-BetaFeature case, put it in the Notifications tab instead. Bug: T129077 Change-Id: I116bec24e0725b3d84276593a50f4315981d2ab1
This commit is contained in:
parent
4de459b6b5
commit
cc88450477
4
Echo.php
4
Echo.php
|
@ -209,6 +209,10 @@ $wgEchoOnWikiBlacklist = 'Echo-blacklist';
|
|||
$wgEchoPerUserWhitelistFormat = '%s/Echo-whitelist';
|
||||
|
||||
// Feature flag for the cross-wiki notifications beta feature
|
||||
// If this is true, the cross-wiki notifications preference will appear in the BetaFeatures section;
|
||||
// if this is false, it'll appear in the Notifications section instead.
|
||||
// This does not control whether cross-wiki notifications are enabled by default. For that,
|
||||
// use $wgDefaultUserOptions['echo-cross-wiki-notifications'] = true;
|
||||
$wgEchoUseCrossWikiBetaFeature = false;
|
||||
|
||||
// Define the categories that notifications can belong to. Categories can be
|
||||
|
|
10
Hooks.php
10
Hooks.php
|
@ -249,7 +249,7 @@ class EchoHooks {
|
|||
public static function getPreferences( $user, &$preferences ) {
|
||||
global $wgEchoDefaultNotificationTypes, $wgAuth, $wgEchoEnableEmailBatch,
|
||||
$wgEchoNotifiers, $wgEchoNotificationCategories, $wgEchoNotifications,
|
||||
$wgEchoNewMsgAlert, $wgAllowHTMLEmail;
|
||||
$wgEchoNewMsgAlert, $wgAllowHTMLEmail, $wgEchoUseCrossWikiBetaFeature;
|
||||
|
||||
// Show email frequency options
|
||||
$never = wfMessage( 'echo-pref-email-frequency-never' )->plain();
|
||||
|
@ -396,6 +396,14 @@ class EchoHooks {
|
|||
'tooltips' => $tooltips,
|
||||
);
|
||||
|
||||
if ( !$wgEchoUseCrossWikiBetaFeature ) {
|
||||
$preferences['echo-cross-wiki-notifications'] = array(
|
||||
'type' => 'toggle',
|
||||
'label-message' => 'echo-pref-cross-wiki-notifications',
|
||||
'section' => 'echo/echocrosswiki'
|
||||
);
|
||||
}
|
||||
|
||||
if ( $wgEchoNewMsgAlert ) {
|
||||
$preferences['echo-show-alert'] = array(
|
||||
'type' => 'toggle',
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
"prefs-emailsettings": "Email options",
|
||||
"prefs-displaynotifications": "Display options",
|
||||
"prefs-echosubscriptions": "Notify me about these events",
|
||||
"prefs-echocrosswiki": "Cross-wiki notifications",
|
||||
"prefs-newmessageindicator": "New message indicator",
|
||||
"echo-pref-send-me": "Send me:",
|
||||
"echo-pref-send-to": "Send to:",
|
||||
|
@ -21,6 +22,7 @@
|
|||
"echo-pref-email-frequency-weekly": "A weekly summary of notifications",
|
||||
"echo-pref-email-format-html": "HTML",
|
||||
"echo-pref-email-format-plain-text": "Plain text",
|
||||
"echo-pref-cross-wiki-notifications": "Show notifications from other wikis",
|
||||
"echo-pref-new-message-indicator": "Show talk page message indicator in my toolbar",
|
||||
"echo-pref-beta-feature-cross-wiki-message": "Enhanced notifications",
|
||||
"echo-pref-beta-feature-cross-wiki-description": "View and organize notifications more easily. Includes cross-wiki notifications, which lets you see messages from other wikis.",
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
"prefs-emailsettings": "Header for the section of preferences that deals with how often notification emails are sent out and what address they are sent to.\n{{Identical|E-mail option}}",
|
||||
"prefs-displaynotifications": "Header for the section of preferences that deals with how notifications are displayed",
|
||||
"prefs-echosubscriptions": "Header for the section of preferences that deals with which notifications the user receives",
|
||||
"prefs-echocrosswiki": "Header for the section of preferences that deals with notifications from other wikis",
|
||||
"prefs-newmessageindicator": "Header for the section of preferences that deals with talk page message alerts",
|
||||
"echo-pref-send-me": "Label for the following email delivery options:\n* {{msg-mw|Echo-pref-email-frequency-never}}\n* {{msg-mw|Echo-pref-email-frequency-immediately}} (default)\n* {{msg-mw|Echo-pref-email-frequency-daily}}\n* {{msg-mw|Echo-pref-email-frequency-weekly}}",
|
||||
"echo-pref-send-to": "Label for the address to send email notifications to.",
|
||||
|
@ -42,9 +43,10 @@
|
|||
"echo-pref-email-frequency-weekly": "Option for users who want to receive a weekly digest of email notifications",
|
||||
"echo-pref-email-format-html": "Option for users who want to receive HTML email notification.\n\nSee also:\n* {{msg-mw|Echo-pref-email-format}}\n{{Identical|HTML}}",
|
||||
"echo-pref-email-format-plain-text": "Option for users who want to receive plain text email notification.\n\nSee also:\n* {{msg-mw|Echo-pref-email-format}}\n{{Identical|Plain text}}",
|
||||
"echo-pref-cross-wiki-notifications": "Label for a preference which enables notifications from other wikis. Only used if {{msg-mw|echo-pref-beta-feature-cross-wiki-message}} is not used.",
|
||||
"echo-pref-new-message-indicator": "Label for a preference which enables the new talk page message alert",
|
||||
"echo-pref-beta-feature-cross-wiki-message": "Label for the cross-wiki notifications Beta Feature.",
|
||||
"echo-pref-beta-feature-cross-wiki-description": "Description for the cross-wiki notifications Beta Feature, describing the feature that will be enabled.",
|
||||
"echo-pref-beta-feature-cross-wiki-message": "Label for the cross-wiki notifications Beta Feature. Only used if {{msg-mw|echo-pref-cross-wiki-notifications}} is not used.",
|
||||
"echo-pref-beta-feature-cross-wiki-description": "Description for the cross-wiki notifications Beta Feature, describing the feature that will be enabled. Only used if {{msg-mw|echo-pref-cross-wiki-notifications}} is not used.",
|
||||
"echo-learn-more": "Text for link to more information about a topic.\n{{Identical|Learn more}}",
|
||||
"echo-log": "Text for link to go to Special:Log",
|
||||
"echo-new-messages": "Message to let the user know that they have new talk page messages, displayed in the personal menu (top-right corner on Vector and Monobook).\n\nKeep this message short. It '''should not''' end in a full stop.",
|
||||
|
|
Loading…
Reference in a new issue