mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 16:04:35 +00:00
Merge "Add a presentation model for Echo "Welcome" notification"
This commit is contained in:
commit
bc4888169d
1
Echo.php
1
Echo.php
|
@ -296,6 +296,7 @@ $wgEchoNotifications = array(
|
|||
'category' => 'system',
|
||||
'group' => 'positive',
|
||||
'section' => 'alert',
|
||||
'presentation-model' => 'EchoWelcomePresentationModel',
|
||||
'title-message' => 'notification-new-user',
|
||||
'title-params' => array( 'agent' ),
|
||||
'icon' => 'site',
|
||||
|
|
|
@ -92,6 +92,7 @@ $wgAutoloadClasses += array(
|
|||
'EchoUserNotificationGatewayTest' => __DIR__ . '/tests/phpunit/gateway/UserNotificationGatewayTest.php',
|
||||
'EchoUserRightsFormatter' => __DIR__ . '/includes/formatters/UserRightsFormatter.php',
|
||||
'EchoUserRightsPresentationModel' => __DIR__ . '/includes/formatters/UserRightsPresentationModel.php',
|
||||
'EchoWelcomePresentationModel' => __DIR__ . '/includes/formatters/WelcomePresentationModel.php',
|
||||
'FilteredSequentialIteratorTest' => __DIR__ . '/tests/phpunit/iterator/FilteredSequentialIteratorTest.php',
|
||||
'MWEchoDbFactory' => __DIR__ . '/includes/EchoDbFactory.php',
|
||||
'MWEchoDbFactoryTest' => __DIR__ . '/tests/phpunit/EchoDbFactoryTest.php',
|
||||
|
|
|
@ -78,6 +78,7 @@
|
|||
"notification-user-rights-add": "You are now a member of {{PLURAL:$2|this group|these groups}}: $1",
|
||||
"notification-user-rights-remove": "You are no longer a member of {{PLURAL:$2|this group|these groups}}: $1",
|
||||
"notification-new-user": "Welcome to {{SITENAME}}, $1! We're glad you're here.",
|
||||
"notification-header-welcome": "{{GENDER:$2|Welcome}} to {{SITENAME}}, $1! We're glad {{GENDER:$2|you're}} here.",
|
||||
"notification-reverted2": "Your {{PLURAL:$4|edit on [[:$2]] has|edits on [[:$2]] have}} been {{GENDER:$1|reverted}} by [[$5|$1]]. $3",
|
||||
"notification-reverted-flyout2": "Your {{PLURAL:$4|edit on $2 has|edits on $2 have}} been {{GENDER:$1|reverted}} by $1. $3",
|
||||
"notification-emailuser": "[[User:$1|$1]] {{GENDER:$1|sent}} you an email.",
|
||||
|
|
|
@ -99,6 +99,7 @@
|
|||
"notification-user-rights-add": "Message indicating that a user was added to a user group. Parameters:\n* $1 - a comma separated list of user group names\n* $2 - the number of user groups, this is used for PLURAL support\nSee also:\n* {{msg-mw|Notification-user-rights-remove}}",
|
||||
"notification-user-rights-remove": "Message indicating that a user was removed from a user group. Parameters:\n* $1 - a comma separated list of user group names\n* $2 - the number of user groups, this is used for PLURAL support\nSee also:\n* {{msg-mw|Notification-user-rights-add}}",
|
||||
"notification-new-user": "Text of the welcome notification. Parameters:\n* $1 - the name of the new user\nSee also:\n* {{msg-mw|Guidedtour-tour-gettingstarted-start-title}}",
|
||||
"notification-header-welcome": "Text of the welcome notification. Parameters:\n* $1 - the name of the new user.Parameters:\n* $1 - the formatted username of the new user\n* $2 - the username for gender purposes\nSee also:\n* {{msg-mw|Guidedtour-tour-gettingstarted-start-title}}",
|
||||
"notification-reverted2": "Format for displaying notifications of a user's edit being reverted. Parameters:\n* $1 - the username of the person who reverted, plain text. Can be used for GENDER.\n* $2 - the page that was reverted, formatted\n* $3 - a diff link which is labeled {{msg-mw|Showdiff}}\n* $4 - the number of edits that were reverted. NOTE: This will only be set to 1 or 2, with 2 actually meaning 'an unknown number greater than 0'.\n* $5 - Page for reverting user.\nUser page if logged in, or user's contributions page if logged out.\n{{Related|Notification-reverted}}",
|
||||
"notification-reverted-flyout2": "Flyout-specific format for displaying notifications of a user's edit being reverted.\n\nParameters:\n* $1 - the username of the person who reverted, plain text. Can be used for GENDER.\n* $2 - the page that was reverted, formatted\n* $3 - a diff link which is labeled {{msg-mw|Showdiff}}\n* $4 - the number of edits that were reverted. NOTE: This will only be set to 1 or 2, with 2 actually meaning \"an unknown number greater than 0\".\n{{Related|Notification-reverted}}",
|
||||
"notification-emailuser": "Format for displaying notifications of a user has sent an email to another user. Parameters:\n* $1 - the username of the person the email, plain text. Can be used for GENDER.",
|
||||
|
|
12
includes/formatters/WelcomePresentationModel.php
Normal file
12
includes/formatters/WelcomePresentationModel.php
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
class EchoWelcomePresentationModel extends EchoEventPresentationModel {
|
||||
|
||||
public function getIconType() {
|
||||
return 'site';
|
||||
}
|
||||
|
||||
public function getPrimaryLink() {
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue