Mooeypoo has uploaded a new change for review.

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

Change subject: Change 'messages' to 'notices' throughout the interface
......................................................................

Change 'messages' to 'notices' throughout the interface

Bug: T139520
Change-Id: Ib7f4dc4ea1ff4c5d1fccdc5fdf0c66b049162cb2
---
M Resources.php
M i18n/en.json
M i18n/qqq.json
M includes/formatters/EchoForeignPresentationModel.php
M includes/special/SpecialDisplayNotificationsConfiguration.php
M modules/ui/mw.echo.ui.CrossWikiNotificationItemWidget.js
M modules/ui/mw.echo.ui.NotificationBadgeWidget.js
7 files changed, 41 insertions(+), 23 deletions(-)


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

diff --git a/Resources.php b/Resources.php
index 010b885..42a5c72 100644
--- a/Resources.php
+++ b/Resources.php
@@ -132,13 +132,13 @@
                        'echo-more-info',
                        'echo-feedback',
                        'echo-notification-alert',
-                       'echo-notification-message',
+                       'echo-notification-notice',
                        'echo-notification-loginrequired',
                        'echo-notification-popup-loginrequired',
                        'notification-link-text-expand-all',
                        'notification-link-text-collapse-all',
                        "notification-link-text-expand-alert-count",
-                       "notification-link-text-expand-message-count",
+                       "notification-link-text-expand-notice-count",
                        "notification-link-text-expand-all-count",
                        "notification-timestamp-ago-seconds",
                        "notification-timestamp-ago-minutes",
@@ -153,11 +153,11 @@
                        'echo-notification-markasread-tooltip',
                        'echo-notification-more-options-tooltip',
                        'echo-notification-alert-text-only',
-                       'echo-notification-message-text-only',
+                       'echo-notification-notice-text-only',
                        'echo-email-batch-bullet',
                        'echo-notification-placeholder',
                        'tooltip-pt-notifications-alert',
-                       'tooltip-pt-notifications-message',
+                       'tooltip-pt-notifications-notice',
                        'mytalk',
                        'mypreferences',
                        'sunday',
diff --git a/i18n/en.json b/i18n/en.json
index 5bc9086..1cc1e95 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -79,7 +79,7 @@
        "echo-error-no-formatter": "No formatting defined for notification.",
        "notifications": "Notifications",
        "tooltip-pt-notifications-alert": "{{GENDER:|Your}} alerts",
-       "tooltip-pt-notifications-message": "{{GENDER:|Your}} messages",
+       "tooltip-pt-notifications-notice": "{{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",
@@ -121,7 +121,7 @@
        "echo-notification-more-options-tooltip": "More options",
        "notification-link-text-expand-all": "Expand",
        "notification-link-text-expand-alert-count": "View {{PLURAL:$1|$1 
alert|$1 alerts}}",
-       "notification-link-text-expand-message-count": "View {{PLURAL:$1|$1 
message|$1 messages}}",
+       "notification-link-text-expand-notice-count": "View {{PLURAL:$1|$1 
notice|$1 notices}}",
        "notification-link-text-expand-all-count": "View {{PLURAL:$1|$1 
notification|$1 notifications}}",
        "notification-link-text-collapse-all": "Collapse",
        "notification-link-text-view-message": "View message",
@@ -211,9 +211,9 @@
        "echo-email-html-footer-preference-link-text": "check your preferences",
        "echo-email-html-footer-with-link": "To control which emails we send 
you, $1.",
        "echo-notification-alert": "{{PLURAL:$1|Alert ($1)|Alerts 
($1)|100=Alerts (99+)}}",
-       "echo-notification-message": "{{PLURAL:$1|Message ($1)|Messages 
($1)|100=Messages (99+)}}",
+       "echo-notification-notice": "{{PLURAL:$1|Notice ($1)|Notices 
($1)|100=Notices (99+)}}",
        "echo-notification-alert-text-only": "Alerts",
-       "echo-notification-message-text-only": "Messages",
+       "echo-notification-notice-text-only": "Notices",
        "echo-overlay-link": "All notifications",
        "echo-overlay-title": "<b>Notifications</b>",
        "echo-overlay-title-overflow": 
"<b>{{PLURAL:$1|Notification|Notifications}}</b> (showing $1 of $2 unread)",
@@ -234,7 +234,7 @@
        "echo-email-batch-link-text-view-all-notifications": "View all 
notifications",
        "echo-rev-deleted-text-view": "This page revision has been suppressed.",
        "notification-header-foreign-alert": "More alerts from 
{{PLURAL:$5|another wiki|$5 other wikis}}",
-       "notification-header-foreign-message": "More messages from 
{{PLURAL:$5|another wiki|$5 other wikis}}",
+       "notification-header-foreign-notice": "More notices from 
{{PLURAL:$5|another wiki|$5 other wikis}}",
        "notification-header-foreign-all": "More notifications from 
{{PLURAL:$5|another wiki|$5 other wikis}}",
        "notification-body-foreign": "$1",
        "echo-foreign-wiki-lang": "$1 - $2",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 495e30a..2580558 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -70,7 +70,7 @@
        "echo-error-no-formatter": "Error message displayed when no formatting 
has been defined for a notification. In other words, the extension doesn't know 
how to properly display the notification.",
        "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-message": "This is used for the title 
(mouseover text) of the message notifications user tool.",
+       "tooltip-pt-notifications-notice": "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",
@@ -112,7 +112,7 @@
        "echo-notification-more-options-tooltip": "Tooltip for the button to 
show the hidden secondary actions.",
        "notification-link-text-expand-all": "Label for the button that expands 
a bundled notification.\n{{Identical|Expand}}",
        "notification-link-text-expand-alert-count": "Label for the button that 
expands a bundled alert notification.\n\nParameters:\n* $1 - The count of 
messages that the bundle holds.\n{{Identical|View alert}}",
-       "notification-link-text-expand-message-count": "Label for the button 
that expands a bundled message notification.\n\nParameters:\n* $1 - The count 
of messages that the bundle holds.\n{{Identical|View message}}",
+       "notification-link-text-expand-notice-count": "Label for the button 
that expands a bundled notice notification.\n\nParameters:\n* $1 - The count of 
messages that the bundle holds.\n{{Identical|View message}}",
        "notification-link-text-expand-all-count": "Label for the button that 
expands a bundled notification.\n\nParameters:\n* $1 - The count of messages 
that the bundle holds.\n{{Identical|View notification}}",
        "notification-link-text-collapse-all": "Label for the button that 
collapses a bundled notification.\n{{Identical|Collapse}}",
        "notification-link-text-view-message": "Label for button that links to 
a message on your talk page.\n{{Identical|View message}}",
@@ -201,10 +201,10 @@
        "echo-email-plain-footer": "Footer content for Echo text e-mail 
notifications.\n\nFor HTML version, see {{msg-mw|echo-email-html-footer}}.",
        "echo-email-html-footer-preference-link-text": "Text of link to the 
preference page in the footer of HTML emails.",
        "echo-email-html-footer-with-link": "Footer content of the HTML 
email.\n* $1 - complete HTML link to the preference page.\n\nSee 
{{msg-mw|echo-email-html-footer-preference-link-text}} for the text of the 
link.",
-       "echo-notification-alert": "Label for alert notifications (= non 
discussion notifications) tab in Echo overlay. Parameters:\n* $1 - the number 
of unread alerts. The number cannot be higher than 100.\nSee also:\n* 
{{msg-mw|Echo-notification-message}}\n{{Identical|Alert}}",
-       "echo-notification-message": "Label for message notifications (= 
discussion notifications) tab in Echo overlay. Parameters:\n* $1 - the number 
of unread messages. The number cannot be higher than 100.\nSee also:\n* 
{{msg-mw|Echo-notification-alert}}\n{{Identical|Message}}",
+       "echo-notification-alert": "Label for alert notifications (= non 
discussion notifications) tab in Echo overlay. Parameters:\n* $1 - the number 
of unread alerts. The number cannot be higher than 100.\nSee also:\n* 
{{msg-mw|Echo-notification-notice}}\n{{Identical|Alert}}",
        "echo-notification-alert-text-only": "Label for alert notifications (= 
non discussion notifications) tab in Echo overlay without alert notification 
count next to it\n{{Identical|Alert}}",
-       "echo-notification-message-text-only": "Label for message notifications 
(= discussion notifications) tab in Echo overlay without message notification 
count next to it\n{{Identical|Message}}",
+       "echo-notification-notice": "Label for notice notifications (= 
discussion notifications) tab in Echo overlay. Parameters:\n* $1 - the number 
of unread alerts. The number cannot be higher than 100.\nSee also:\n* 
{{msg-mw|Echo-notification-notice}}\n{{Identical|Alert}}",
+       "echo-notification-notice-text-only": "Label for notice notifications 
(= discussion notifications) tab in Echo overlay without message notification 
count next to it\n{{Identical|Message}}",
        "echo-overlay-link": "Link to \"all notifications\" at the bottom of 
the overlay.\n{{Identical|All notifications}}",
        "echo-overlay-title": "Title at the top of the notifications overlay. 
Should include bold tags.\n{{Identical|Notification}}",
        "echo-overlay-title-overflow": "Title at the top of the notifications 
overlay when there are additional unread notifications that are not being 
shown.\n\nParameters:\n* $1 - the number of unread notifications being shown\n* 
$2 - the total number of unread notifications that exist",
@@ -225,7 +225,7 @@
        "echo-email-batch-link-text-view-all-notifications": "The link text for 
the primary action in daily and weekly email digest",
        "echo-rev-deleted-text-view": "Short message displayed instead of edit 
content when revision text is suppressed.",
        "notification-header-foreign-alert": "Flyout-specific format for 
displaying notification header of having alert notifications on foreign 
wikis.\n\nParameters:\n* $1 - the formatted username of the current user.\n* $2 
- the username for GENDER\n* $3 (deprecated) - 1 of the foreign wikis you have 
notifications on\n* $4 (deprecated) - the number of remaining other wikis you 
have notifications on\n*$5 - the number of other wikis you have notifications 
on",
-       "notification-header-foreign-message": "Flyout-specific format for 
displaying notification header of having message notifications on foreign 
wikis.\n\nParameters:\n* $1 - the formatted username of the current user.\n* $2 
- the username for GENDER\n* $3 (deprecated) - 1 of the foreign wikis you have 
notifications on\n* $4 (deprecated) - the number of remaining other wikis you 
have notifications on\n*$5 - the number of other wikis you have notifications 
on",
+       "notification-header-foreign-notice": "Flyout-specific format for 
displaying notification header of having notice notifications on foreign 
wikis.\n\nParameters:\n* $1 - the formatted username of the current user.\n* $2 
- the username for GENDER\n* $3 (deprecated) - 1 of the foreign wikis you have 
notifications on\n* $4 (deprecated) - the number of remaining other wikis you 
have notifications on\n*$5 - the number of other wikis you have notifications 
on",
        "notification-header-foreign-all": "Flyout-specific format for 
displaying notification header of having notifications (combined alerts and 
messages) on foreign wikis.\n\nParameters:\n* $1 - the formatted username of 
the current user.\n* $2 - the username for GENDER\n* $3 (deprecated) - 1 of the 
foreign wikis you have notifications on\n* $4 (deprecated) - the number of 
remaining other wikis you have notifications on\n*$5 - the number of other 
wikis you have notifications on",
        "notification-body-foreign": "{{notranslate}}",
        "echo-foreign-wiki-lang": "Title of the wiki for which you're seeing 
foreign notifications:\n\nParameters:\n* $1 - the name of the site (e.g. 
'Wikipedia', 'Wikiversity', ...)\n* $2 - the language of the website (e.g. 
'English', 'Deutsch', ...)",
diff --git a/includes/formatters/EchoForeignPresentationModel.php 
b/includes/formatters/EchoForeignPresentationModel.php
index 8dc6b50..0e0cc7a 100644
--- a/includes/formatters/EchoForeignPresentationModel.php
+++ b/includes/formatters/EchoForeignPresentationModel.php
@@ -11,8 +11,10 @@
 
        protected function getHeaderMessageKey() {
                $data = $this->event->getExtra();
-               $section = $data['section'];
+               $section = $data['section'] == 'message' ? 'notice' : 
$data['section'];
 
+               // notification-header-foreign-alert
+               // notification-header-foreign-notice
                return "notification-header-{$this->type}-{$section}";
        }
 
diff --git a/includes/special/SpecialDisplayNotificationsConfiguration.php 
b/includes/special/SpecialDisplayNotificationsConfiguration.php
index b86a8f6..40298be 100644
--- a/includes/special/SpecialDisplayNotificationsConfiguration.php
+++ b/includes/special/SpecialDisplayNotificationsConfiguration.php
@@ -192,8 +192,9 @@
 
                foreach ( EchoAttributeManager::$sections as $section ) {
                        $types = $this->attributeManager->getEventsForSection( 
$section );
-                       // echo-notification-alert-text-only, 
echo-notification-message-text-only
-                       $flippedSectionNames[$this->msg( 'echo-notification-' . 
$section . '-text-only' )->text()] = $section;
+                       // echo-notification-alert-text-only, 
echo-notification-notice-text-only
+                       $msgSection = $section == 'message' ? 'notice' : 
$section;
+                       $flippedSectionNames[$this->msg( 'echo-notification-' . 
$msgSection . '-text-only' )->text()] = $section;
                        foreach ( $types as $type ) {
                                $bySectionValue[] = "$section-$type";
                        }
diff --git a/modules/ui/mw.echo.ui.CrossWikiNotificationItemWidget.js 
b/modules/ui/mw.echo.ui.CrossWikiNotificationItemWidget.js
index c3ca9aa..918e94d 100644
--- a/modules/ui/mw.echo.ui.CrossWikiNotificationItemWidget.js
+++ b/modules/ui/mw.echo.ui.CrossWikiNotificationItemWidget.js
@@ -315,8 +315,13 @@
                                mw.msg( 'notification-link-text-collapse-all' ) 
:
                                // Messages that appear here are:
                                // notification-link-text-expand-alert-count
-                               // notification-link-text-expand-message-count
-                               mw.msg( 'notification-link-text-expand-' + type 
+ '-count', this.model.getCount() )
+                               // notification-link-text-expand-notice-count
+                               mw.msg(
+                                       'notification-link-text-expand-' +
+                                               ( type === 'message' ? 'notice' 
: type ) +
+                                               '-count',
+                                       this.model.getCount()
+                               )
                );
                this.toggleExpandButton.setIcon(
                        this.expanded ?
diff --git a/modules/ui/mw.echo.ui.NotificationBadgeWidget.js 
b/modules/ui/mw.echo.ui.NotificationBadgeWidget.js
index 7c32354..c0619c7 100644
--- a/modules/ui/mw.echo.ui.NotificationBadgeWidget.js
+++ b/modules/ui/mw.echo.ui.NotificationBadgeWidget.js
@@ -69,8 +69,10 @@
                        badgeIcon: config.badgeIcon,
                        // The following messages can be used here:
                        // tooltip-pt-notifications-alert
-                       // tooltip-pt-notifications-message
-                       title: mw.msg( 'tooltip-pt-notifications-' + 
this.controller.getTypeString() ),
+                       // tooltip-pt-notifications-notice
+                       title: mw.msg( 'tooltip-pt-notifications-' +
+                               this.controller.getTypeString() === 'message' ? 
'notice' : this.controller.getTypeString()
+                       ),
                        href: config.href
                } );
 
@@ -140,7 +142,15 @@
                        // The following messages can be used here:
                        // echo-notification-alert-text-only
                        // echo-notification-message-text-only
-                       label: mw.msg( 'echo-notification-' + 
this.controller.getTypeString() + '-text-only' ),
+                       label: mw.msg(
+                               'echo-notification-' +
+                               (
+                                       this.controller.getTypeString() === 
'message' ?
+                                               'notice' :
+                                               this.controller.getTypeString()
+                               ) +
+                               '-text-only'
+                       ),
                        classes: [ 
'mw-echo-ui-notificationBadgeButtonPopupWidget-popup' ]
                } );
                // HACK: Add an icon to the popup head label

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib7f4dc4ea1ff4c5d1fccdc5fdf0c66b049162cb2
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