mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/LoginNotify
synced 2024-09-23 10:20:21 +00:00
i18n: Use native digits in login notify messages
Whenever a number should be put inside a message, `numParams` should be used instead of `params` as the former considers number formatting needed for locales having their own numerals. Change-Id: I1d331040a6f872fbf12ebe142257e53c46f5a219
This commit is contained in:
parent
1a75dd2331
commit
f08f38032d
|
@ -41,7 +41,7 @@ class PresentationModel extends EchoEventPresentationModel {
|
|||
case 'login-fail-new':
|
||||
$msg = $this->msg( 'notification-loginnotify-login-fail-email-subject' );
|
||||
$msg->params( $this->getUser()->getName() );
|
||||
$msg->params( $this->event->getExtraParam( 'count', 0 ) );
|
||||
$msg->numParams( $this->event->getExtraParam( 'count', 0 ) );
|
||||
break;
|
||||
default:
|
||||
$msg = $this->msg( 'notification-loginnotify-login-success-email-subject' );
|
||||
|
@ -61,7 +61,7 @@ class PresentationModel extends EchoEventPresentationModel {
|
|||
// Known IP? Don't bundle because we issue notifications after every 5 attempts anyway
|
||||
case 'login-fail-known':
|
||||
$msg = $this->msg( 'notification-known-header-login-fail' );
|
||||
$msg->params( $this->event->getExtraParam( 'count', 0 ) );
|
||||
$msg->numParams( $this->event->getExtraParam( 'count', 0 ) );
|
||||
break;
|
||||
// New IP?
|
||||
case 'login-fail-new':
|
||||
|
@ -75,12 +75,12 @@ class PresentationModel extends EchoEventPresentationModel {
|
|||
},
|
||||
0
|
||||
);
|
||||
$msg->params( $totalAttempts );
|
||||
$msg->numParams( $totalAttempts );
|
||||
} else {
|
||||
// If the bundle is read or user goes to Special:Notifications, show
|
||||
// one notification per attempt (aligned with how unbundled bundles work)
|
||||
$msg = $this->msg( 'notification-new-unbundled-header-login-fail' );
|
||||
$msg->params( $this->event->getExtraParam( 'count', 0 ) );
|
||||
$msg->numParams( $this->event->getExtraParam( 'count', 0 ) );
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue