Mooeypoo has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/300322

Change subject: Change 'pt-notification-message' to 'pt-notification-notice'
......................................................................

Change 'pt-notification-message' to 'pt-notification-notice'

And change all CSS and JS dependent calls/tags based on the new
tooltip message and ID of the personal tool <li> item.

Change-Id: I136fabe5710f90da10eb8d4afe92acdb77571eec
---
M Hooks.php
M i18n/en.json
M i18n/qqq.json
M modules/ext.echo.init.js
M modules/nojs/mw.echo.badge.less
M modules/nojs/mw.echo.badge.monobook.less
M modules/nojs/mw.echo.badge.vector.less
M modules/styles/mw.echo.ui.NotificationBadgeWidget.monobook.less
M modules/styles/mw.echo.ui.NotificationBadgeWidget.vector.less
M modules/ui/mw.echo.ui.NotificationBadgeWidget.js
10 files changed, 16 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/22/300322/1

diff --git a/Hooks.php b/Hooks.php
index 5c55be5..d50cc38 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -927,7 +927,7 @@
                        'class' => $msgLinkClasses,
                );
 
-               $insertUrls['notifications-message'] = $msgLink;
+               $insertUrls['notifications-notice'] = $msgLink;
 
                $personal_urls = wfArrayInsertAfter( $personal_urls, 
$insertUrls, 'userpage' );
 
diff --git a/i18n/en.json b/i18n/en.json
index 87cccc3..12a538f 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -78,7 +78,6 @@
        "notifications": "Notifications",
        "tooltip-pt-notifications-alert": "{{GENDER:|Your}} alerts",
        "tooltip-pt-notifications-notice": "{{GENDER:|Your}} notices",
-       "tooltip-pt-notifications-message": "{{GENDER:|Your}} notices",
        "echo-displaynotificationsconfiguration": "Display Notifications 
configuration",
        "echo-displaynotificationsconfiguration-summary": "This is an overview 
of how Notifications are configured on this wiki.",
        
"echo-displaynotificationsconfiguration-notifications-by-category-header": 
"Notifications by category",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 658a965..983ae82 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -70,7 +70,6 @@
        "notifications": 
"{{doc-special|Notifications}}\n{{Identical|Notification}}",
        "tooltip-pt-notifications-alert": "This is used for the title 
(mouseover text) of the alert notifications user tool.",
        "tooltip-pt-notifications-notice": "This is used for the title 
(mouseover text) of the notice notifications user tool.",
-       "tooltip-pt-notifications-message": "This is used for the title 
(mouseover text) of the notice notifications user tool.",
        "echo-displaynotificationsconfiguration": 
"{{doc-special|DisplayNotificationsConfiguration}}\n\nThis could be rephrased 
as \"Display the configuration of Notifications\".",
        "echo-displaynotificationsconfiguration-summary": "Summary of the 
DisplayNotificationsConfiguration special page",
        
"echo-displaynotificationsconfiguration-notifications-by-category-header": 
"Header on DisplayNotificationsConfiguration for a list of which notifications 
are in each category",
diff --git a/modules/ext.echo.init.js b/modules/ext.echo.init.js
index 67422be..d2bb610 100644
--- a/modules/ext.echo.init.js
+++ b/modules/ext.echo.init.js
@@ -14,7 +14,7 @@
        $( document ).ready( function () {
                var myWidget, echoApi,
                        $existingAlertLink = $( '#pt-notifications-alert a' ),
-                       $existingMessageLink = $( '#pt-notifications-message a' 
),
+                       $existingMessageLink = $( '#pt-notifications-notice a' 
),
                        numAlerts = $existingAlertLink.text(),
                        numMessages = $existingMessageLink.text(),
                        hasUnseenAlerts = $existingAlertLink.hasClass( 
'mw-echo-unseen-notifications' ),
diff --git a/modules/nojs/mw.echo.badge.less b/modules/nojs/mw.echo.badge.less
index 6886642..d29f55a 100644
--- a/modules/nojs/mw.echo.badge.less
+++ b/modules/nojs/mw.echo.badge.less
@@ -3,7 +3,7 @@
 /* We have to include the #pt-notifications selector due to monobook */
 .mw-echo-notifications-badge {
        #pt-notifications-alert &,
-       #pt-notifications-message & {
+       #pt-notifications-notice & {
                font-weight: bold;
                cursor: pointer;
                text-decoration: none;
@@ -41,7 +41,7 @@
                }
        }
 
-       #pt-notifications-message & {
+       #pt-notifications-notice & {
                margin-left: @badge-distance-adjustment;
 
                body.ltr & + .oo-ui-popupWidget {
diff --git a/modules/nojs/mw.echo.badge.monobook.less 
b/modules/nojs/mw.echo.badge.monobook.less
index d4bcd46..f1f2a00 100644
--- a/modules/nojs/mw.echo.badge.monobook.less
+++ b/modules/nojs/mw.echo.badge.monobook.less
@@ -4,7 +4,7 @@
 /* We have to include the #pt-notifications selector due to monobook */
 .mw-echo-notifications-badge {
        #pt-notifications-alert &,
-       #pt-notifications-message & {
+       #pt-notifications-notice & {
                color: @badge-text-color-idle;
                opacity: 0.6;
 
@@ -23,7 +23,7 @@
                #pt-notifications-alert & {
                        background-color: @badge-background-unseen-alert;
                }
-               #pt-notifications-message & {
+               #pt-notifications-notice & {
                        background-color: @badge-background-unseen-message;
                }
        }
diff --git a/modules/nojs/mw.echo.badge.vector.less 
b/modules/nojs/mw.echo.badge.vector.less
index 4452c0f..688aa1c 100644
--- a/modules/nojs/mw.echo.badge.vector.less
+++ b/modules/nojs/mw.echo.badge.vector.less
@@ -4,7 +4,7 @@
 /* We have to include the #pt-notifications selector due to monobook */
 .mw-echo-notifications-badge {
        #pt-notifications-alert &,
-       #pt-notifications-message & {
+       #pt-notifications-notice & {
                border-radius: 0.2em;
                background-color: #d2d2d2;
                font-size: 1.125em;
@@ -21,7 +21,7 @@
                #pt-notifications-alert & {
                        background-color: @badge-background-unseen-alert;
                }
-               #pt-notifications-message & {
+               #pt-notifications-notice & {
                        background-color: @badge-background-unseen-message;
                }
        }
diff --git a/modules/styles/mw.echo.ui.NotificationBadgeWidget.monobook.less 
b/modules/styles/mw.echo.ui.NotificationBadgeWidget.monobook.less
index 4e3a1c7..703991b 100644
--- a/modules/styles/mw.echo.ui.NotificationBadgeWidget.monobook.less
+++ b/modules/styles/mw.echo.ui.NotificationBadgeWidget.monobook.less
@@ -31,6 +31,6 @@
        background-color: @badge-background-unseen-alert;
 }
 
-#pt-notifications-message 
.mw-echo-notifications-badge.oo-ui-flaggedElement-unseen {
+#pt-notifications-notice 
.mw-echo-notifications-badge.oo-ui-flaggedElement-unseen {
        background-color: @badge-background-unseen-message;
 }
diff --git a/modules/styles/mw.echo.ui.NotificationBadgeWidget.vector.less 
b/modules/styles/mw.echo.ui.NotificationBadgeWidget.vector.less
index 6c79900..bd5ea33 100644
--- a/modules/styles/mw.echo.ui.NotificationBadgeWidget.vector.less
+++ b/modules/styles/mw.echo.ui.NotificationBadgeWidget.vector.less
@@ -7,6 +7,6 @@
        background-color: @badge-background-unseen-alert;
 }
 
-#pt-notifications-message 
.mw-echo-notifications-badge.oo-ui-flaggedElement-unseen {
+#pt-notifications-notice 
.mw-echo-notifications-badge.oo-ui-flaggedElement-unseen {
        background-color: @badge-background-unseen-message;
 }
diff --git a/modules/ui/mw.echo.ui.NotificationBadgeWidget.js 
b/modules/ui/mw.echo.ui.NotificationBadgeWidget.js
index 9ef18bd..54afbcb 100644
--- a/modules/ui/mw.echo.ui.NotificationBadgeWidget.js
+++ b/modules/ui/mw.echo.ui.NotificationBadgeWidget.js
@@ -188,13 +188,17 @@
                } );
 
                this.$element
-                       .prop( 'id', 'pt-notifications-' + 
this.controller.getTypeString() )
+                       .prop( 'id', 'pt-notifications-' + (
+                               this.controller.getTypeString() === 'message' ? 
'notice' : 'alert'
+                       ) )
                        // The following classes can be used here:
                        // mw-echo-ui-notificationBadgeButtonPopupWidget-alert
                        // mw-echo-ui-notificationBadgeButtonPopupWidget-message
                        .addClass(
                                'mw-echo-ui-notificationBadgeButtonPopupWidget 
' +
-                               
'mw-echo-ui-notificationBadgeButtonPopupWidget-' + 
this.controller.getTypeString()
+                               
'mw-echo-ui-notificationBadgeButtonPopupWidget-' + (
+                                       this.controller.getTypeString() === 
'message' ? 'notice' : 'alert'
+                               )
                        )
                        .append(
                                this.badgeButton.$element,

-- 
To view, visit https://gerrit.wikimedia.org/r/300322
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I136fabe5710f90da10eb8d4afe92acdb77571eec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <mor...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to