EBernhardson (WMF) has uploaded a new change for review.
https://gerrit.wikimedia.org/r/61940
Change subject: Tooltips for echo notification settings
......................................................................
Tooltips for echo notification settings
Bug: 47094
Change-Id: I3556aafe90d5f9a42f0774e783adb06991bc5088
---
M Echo.i18n.php
M Echo.php
M Hooks.php
3 files changed, 19 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo
refs/changes/40/61940/1
diff --git a/Echo.i18n.php b/Echo.i18n.php
index e077a5b..a3c0d01 100644
--- a/Echo.i18n.php
+++ b/Echo.i18n.php
@@ -39,6 +39,12 @@
'echo-category-title-other' => '{{PLURAL:$1|Other}}',
'echo-category-title-system' => '{{PLURAL:$1|System}}',
+ // Category tooltips
+ 'echo-pref-tooltip-edit-user-talk' => 'Notify me when someone posts a
message or replies on my talk page.',
+ 'echo-pref-tooltip-article-linked' => 'Notify me when someone links to
a page I created from an article page.',
+ 'echo-pref-tooltip-reverted' => 'Notify me when someone reverts an edit
I made, by using the undo or rollback tool.',
+ 'echo-pref-tooltip-mention' => 'Notify me when someone links to my user
page from any talk page.',
+
// Errors
'echo-no-agent' => '[Nobody]',
'echo-no-title' => '[No page]',
@@ -2104,7 +2110,7 @@
$4',
'notification-edit-talk-page-email-batch-body2' => '$1
{{GENDER:$1|כתב|כתבה}} הדף השיחה שלך',
'notification-page-linked-email-subject' => 'מישהו קישר אל הדף שיצרת
באתר {{SITENAME}}',
- 'notification-page-linked-email-body' => '$1
+ 'notification-page-linked-email-body' => '$1
כל הקישורים אל הדף הזה:
diff --git a/Echo.php b/Echo.php
index a1f6cb7..5160b7d 100644
--- a/Echo.php
+++ b/Echo.php
@@ -258,8 +258,8 @@
);
// Define the categories that notifications can belong to. Categories can be
-// assigned the following parameters: priority, nodismiss, and usergroups. All
-// parameters are optional.
+// assigned the following parameters: priority, nodismiss, tooltip, and
usergroups.
+// All parameters are optional.
// If a notifications type doesn't have a category parameter, it is
// automatically assigned to the 'other' category which is lowest priority and
// has no preferences or dismissibility.
@@ -283,15 +283,19 @@
'edit-user-talk' => array(
'priority' => 1,
'no-dismiss' => array( 'web' ),
+ 'tooltip' => 'echo-pref-tooltip-edit-user-talk',
),
'reverted' => array(
'priority' => 9,
+ 'tooltip' => 'echo-pref-tooltip-reverted',
),
'article-linked' => array(
'priority' => 5,
+ 'tooltip' => 'echo-pref-tooltip-article-linked',
),
'mention' => array(
'priority' => 4,
+ 'tooltip' => 'echo-pref-tooltip-mention',
),
);
diff --git a/Hooks.php b/Hooks.php
index 5646e75..4c808e7 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -321,9 +321,13 @@
// Build the rows (notification categories)
$rows = array();
+ $tooltips = array();
foreach ( $validSortedCategories as $category ) {
$categoryMessage = wfMessage( 'echo-category-title-' .
$category )->numParams( 1 )->escaped();
$rows[$categoryMessage] = $category;
+ if ( isset(
$wgEchoNotificationCategories[$category]['tooltip'] ) ) {
+ $tooltips[$categoryMessage] = wfMessage(
$wgEchoNotificationCategories[$category]['tooltip'] )->escaped();
+ }
}
// Figure out the individual exceptions in the matrix and make
them disabled
@@ -354,6 +358,7 @@
'rows' => $rows,
'columns' => $columns,
'remove-options' => $removeOptions,
+ 'tooltips' => $tooltips,
);
// If we're using Echo to handle user talk page post
notifications,
@@ -501,7 +506,7 @@
}
// Handle only
- // 1. inserts to pagelinks table &&
+ // 1. inserts to pagelinks table &&
// 2. content namespace pages &&
// 3. non-transcluding pages &&
// 4. non-redirect pages
--
To view, visit https://gerrit.wikimedia.org/r/61940
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3556aafe90d5f9a42f0774e783adb06991bc5088
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: EBernhardson (WMF) <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits