Followup Ib7f4dc4ea: Bring back message tooltip with 'notice' text

The message for tooltip-pt-notifications-message was removed to comply
with the new naming. The problem is that in the back end, sections are
still defined as 'message' vs 'alerts' and the sections in the user
toolbar are defined with those terms. In no-JS mode (which is before
the user clicks any of the badges) this tooltip is created automatically
by MediaWiki based on class names.

It's easier to return the message key with different text for translation
and wait for the bigger tech debt to correct all instances of 'message'
to 'notice' (including in the API, which would require a much more
massive work)

Bug: T139520
Change-Id: I6368b63e38f64aa065f2580df812de1c63a93716
This commit is contained in:
Moriel Schottlender 2016-07-07 17:05:52 -07:00
parent 7879f0c9f8
commit 4b137b3208
3 changed files with 5 additions and 1 deletions

View file

@ -80,6 +80,7 @@
"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",

View file

@ -71,6 +71,7 @@
"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",

View file

@ -71,7 +71,9 @@
// tooltip-pt-notifications-alert
// tooltip-pt-notifications-notice
title: mw.msg( 'tooltip-pt-notifications-' +
this.controller.getTypeString() === 'message' ? 'notice' : this.controller.getTypeString()
(
this.controller.getTypeString() === 'message' ? 'notice' : this.controller.getTypeString()
)
),
href: config.href
} );