Use words for describing notification counts in HTML text node

The text is hidden by CSS so this will not affect regular users.

Bug: T160277
Change-Id: Iabb557a6ea2de82b488a5a40c9b5fd966270f1b0
This commit is contained in:
Ed Sanders 2017-03-12 13:04:20 +00:00
parent fb768a72c2
commit d4d325e7e6
2 changed files with 9 additions and 6 deletions

View file

@ -921,8 +921,11 @@ class EchoHooks {
$sk->getOutput()->addJsConfigVars( 'wgEchoShowSpecialPageInvitation', true );
}
$msgText = EchoNotificationController::formatNotificationCount( $msgCount );
$alertText = EchoNotificationController::formatNotificationCount( $alertCount );
$msgFormattedCount = EchoNotificationController::formatNotificationCount( $msgCount );
$alertFormattedCount = EchoNotificationController::formatNotificationCount( $alertCount );
$msgText = wfMessage( 'echo-notification-notice', $msgCount );
$alertText = wfMessage( 'echo-notification-alert', $alertCount );
$url = SpecialPage::getTitleFor( 'Notifications' )->getLocalURL();
@ -971,7 +974,7 @@ class EchoHooks {
'class' => $alertLinkClasses,
'data' => [
'counter-num' => $alertCount,
'counter-text' => $alertText,
'counter-text' => $alertFormattedCount,
],
];
@ -986,7 +989,7 @@ class EchoHooks {
'class' => $msgLinkClasses,
'data' => [
'counter-num' => $msgCount,
'counter-text' => $msgText,
'counter-text' => $msgFormattedCount,
],
];

View file

@ -9,14 +9,14 @@ Feature: Testing notification types
Given another user mentions me
When I refresh the page
Then the alert badge is showing unseen notifications
And the alert badge value is "1"
And the alert badge value is "Alert (1)"
@skip
Scenario: Someone writes on my talk page
Given another user writes on my talk page
When I refresh the page
Then the alert badge is showing unseen notifications
And the alert badge value is "1"
And the alert badge value is "Alert (1)"
When I click the alert badge
And I see the alert popup
Then there are "1" unread notifications in the alert popup