Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/276683
Change subject: Always show a cross-wiki notifications preference, even if the beta feature is disabled ...................................................................... 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 --- M Echo.php M Hooks.php M i18n/en.json M i18n/qqq.json 4 files changed, 20 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/83/276683/1 diff --git a/Echo.php b/Echo.php index dd24a9b..500426b 100644 --- a/Echo.php +++ b/Echo.php @@ -209,6 +209,10 @@ $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 diff --git a/Hooks.php b/Hooks.php index 6fa90be..f8ffe5b 100644 --- a/Hooks.php +++ b/Hooks.php @@ -249,7 +249,7 @@ 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 @@ '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', @@ -404,6 +412,7 @@ ); } + // If we're using Echo to handle user talk page post notifications, // hide the old (non-Echo) preference for this. If Echo is moved to core // we'll want to remove this old user option entirely. For now, though, diff --git a/i18n/en.json b/i18n/en.json index 4e5269e..533eb8e 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -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.", diff --git a/i18n/qqq.json b/i18n/qqq.json index b4bd9b7..ab2bd5b 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -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.", -- To view, visit https://gerrit.wikimedia.org/r/276683 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I116bec24e0725b3d84276593a50f4315981d2ab1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Catrope <roan.katt...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits