Gender support for viewing user in user-rights notifications

Bug: T125251
Change-Id: Iadd341a3bb555c91152528bbddaf2a660b8dcc77
This commit is contained in:
Stephane Bisson 2016-01-29 16:07:39 -05:00
parent 44ae5aefae
commit a4b91ebef8
3 changed files with 9 additions and 6 deletions

View file

@ -92,9 +92,9 @@
"notification-header-mention-article-talkpage": "$1 {{GENDER:$2|mentioned}} {{GENDER:$3|you}} on the '''$4''' talk page in \"$5\".",
"notification-header-mention-article-talkpage-nosection": "$1 {{GENDER:$2|mentioned}} {{GENDER:$3|you}} on the '''$4''' talk page.",
"notification-user-rights": "Your user rights [[Special:Log/rights/$1|were {{GENDER:$1|changed}}]] by [[User:$1|$1]]. $2. [[Special:ListGroupRights|Learn more]]",
"notification-header-user-rights-add-only": "Your user rights were {{GENDER:$1|changed}}: You are now a member of the $2 {{PLURAL:$3|group|groups}}.",
"notification-header-user-rights-remove-only": "Your user rights were {{GENDER:$1|changed}}: You are no longer a member of the $2 {{PLURAL:$3|group|groups}}.",
"notification-header-user-rights-add-and-remove": "Your user rights were {{GENDER:$1|changed}}: You are now a member of the $2 {{PLURAL:$3|group|groups}}. You are no longer a member of the $4 {{PLURAL:$5|group|groups}}.",
"notification-header-user-rights-add-only": "{{GENDER:$4|Your}} user rights were {{GENDER:$1|changed}}: You are now a member of the $2 {{PLURAL:$3|group|groups}}.",
"notification-header-user-rights-remove-only": "{{GENDER:$4|Your}} user rights were {{GENDER:$1|changed}}: You are no longer a member of the $2 {{PLURAL:$3|group|groups}}.",
"notification-header-user-rights-add-and-remove": "{{GENDER:$6|Your}} user rights were {{GENDER:$1|changed}}: You are now a member of the $2 {{PLURAL:$3|group|groups}}. You are no longer a member of the $4 {{PLURAL:$5|group|groups}}.",
"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-welcome-link": "",

View file

@ -113,9 +113,9 @@
"notification-header-mention-article-talkpage": "Header text for a notification when you are mentioned by another user in a section on an article talk page.\n* $1 - user's name (not suitable for GENDER).\n* $2 - user's name for use in GENDER.\n* $3 - name of the user viewing the notification, can be used for GENDER\n* $4 - name of the article whose talk page you are mentioned in (without namespace).\n* $5 - name of the section they were mentioned in",
"notification-header-mention-article-talkpage-nosection": "Header text for a notification when you are mentioned by another user on an article talk page.\n* $1 - user's name (not suitable for GENDER).\n* $2 - user's name for use in GENDER.\n* $3 - name of the user viewing the notification, can be used for GENDER\n* $4 - name of the article whose talk page you are mentioned in (without namespace)",
"notification-user-rights": "Format for displaying notifications of a user right change in notification page.\n\nParameters:\n* $1 - the username of the person who made the user right change. Can be used for GENDER support.\n* $2 - a semicolon separated list of {{msg-mw|Notification-user-rights-add}}, {{msg-mw|Notification-user-rights-remove}}",
"notification-header-user-rights-add-only": "Notifications header message when a user is added to groups. Parameters:\n* $1 - the raw username of the person who made the user rights change, can be used for GENDER support\n* $2 - a localized list of the groups that were added\n* $3 - the number of groups that were added, can be used for PLURAL",
"notification-header-user-rights-remove-only": "Notifications header message when a user is removed from groups. Parameters:\n* $1 - the raw username of the person who made the user rights change, can be used for GENDER support\n* $2 - a localized list of the groups that were removed\n* $3 - the number of groups that were removed, can be used for PLURAL",
"notification-header-user-rights-add-and-remove": "Notifications header message when a user is added to groups and removed from groups. Parameters:\n* $1 - the raw username of the person who made the user rights change, can be used for GENDER support\n* $2 - a localized list of the groups that were added\n* $3 - the number of groups that were added, can be used for PLURAL\n* $4 - a localized list of the groups that were removed\n* $5 - the number of groups that were removed, can be used for PLURAL",
"notification-header-user-rights-add-only": "Notifications header message when a user is added to groups. Parameters:\n* $1 - the raw username of the person who made the user rights change, can be used for GENDER support\n* $2 - a localized list of the groups that were added\n* $3 - the number of groups that were added, can be used for PLURAL\n* $4 - name of the user viewing the notification, can be used for GENDER",
"notification-header-user-rights-remove-only": "Notifications header message when a user is removed from groups. Parameters:\n* $1 - the raw username of the person who made the user rights change, can be used for GENDER support\n* $2 - a localized list of the groups that were removed\n* $3 - the number of groups that were removed, can be used for PLURAL\n* $4 - name of the user viewing the notification, can be used for GENDER",
"notification-header-user-rights-add-and-remove": "Notifications header message when a user is added to groups and removed from groups. Parameters:\n* $1 - the raw username of the person who made the user rights change, can be used for GENDER support\n* $2 - a localized list of the groups that were added\n* $3 - the number of groups that were added, can be used for PLURAL\n* $4 - a localized list of the groups that were removed\n* $5 - the number of groups that were removed, can be used for PLURAL\n* $6 - name of the user viewing the notification, can be used for GENDER",
"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-welcome-link": "{{notranslate}}",

View file

@ -18,12 +18,14 @@ class EchoUserRightsPresentationModel extends EchoEventPresentationModel {
$msg->params( $genderName );
$msg->params( $this->language->listToText( $add ) );
$msg->params( count( $add ) );
$msg->params( $this->getViewingUserForGender() );
return $msg;
} elseif ( !$add && $remove ) {
$msg = $this->msg( 'notification-header-user-rights-remove-only' );
$msg->params( $genderName );
$msg->params( $this->language->listToText( $remove ) );
$msg->params( count( $remove ) );
$msg->params( $this->getViewingUserForGender() );
return $msg;
} else {
$msg = $this->msg( 'notification-header-user-rights-add-and-remove' );
@ -32,6 +34,7 @@ class EchoUserRightsPresentationModel extends EchoEventPresentationModel {
$msg->params( count( $add ) );
$msg->params( $this->language->listToText( $remove ) );
$msg->params( count( $remove ) );
$msg->params( $this->getViewingUserForGender() );
return $msg;
}
}