From 37e89f4e2dd4cf101db96145d7cd0ee271f2be55 Mon Sep 17 00:00:00 2001 From: Pmlineditor Date: Sun, 13 Nov 2016 22:13:45 +0530 Subject: [PATCH] Add GENDER support for "you are blocked" messages in ChangeTags Bug: T150420 Change-Id: Ie33eb7e630f7cb10c95bd3b0480728d274b2b97a --- includes/changetags/ChangeTags.php | 12 ++++++------ languages/i18n/en.json | 6 +++--- languages/i18n/qqq.json | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/includes/changetags/ChangeTags.php b/includes/changetags/ChangeTags.php index 993f0b7591..e3035be630 100644 --- a/includes/changetags/ChangeTags.php +++ b/includes/changetags/ChangeTags.php @@ -397,7 +397,7 @@ class ChangeTags { if ( !$user->isAllowed( 'applychangetags' ) ) { return Status::newFatal( 'tags-apply-no-permission' ); } elseif ( $user->isBlocked() ) { - return Status::newFatal( 'tags-apply-blocked' ); + return Status::newFatal( 'tags-apply-blocked', $user->getName() ); } } @@ -468,7 +468,7 @@ class ChangeTags { if ( !$user->isAllowed( 'changetags' ) ) { return Status::newFatal( 'tags-update-no-permission' ); } elseif ( $user->isBlocked() ) { - return Status::newFatal( 'tags-update-blocked' ); + return Status::newFatal( 'tags-update-blocked', $user->getName() ); } } @@ -790,7 +790,7 @@ class ChangeTags { if ( !$user->isAllowed( 'managechangetags' ) ) { return Status::newFatal( 'tags-manage-no-permission' ); } elseif ( $user->isBlocked() ) { - return Status::newFatal( 'tags-manage-blocked' ); + return Status::newFatal( 'tags-manage-blocked', $user->getName() ); } } @@ -858,7 +858,7 @@ class ChangeTags { if ( !$user->isAllowed( 'managechangetags' ) ) { return Status::newFatal( 'tags-manage-no-permission' ); } elseif ( $user->isBlocked() ) { - return Status::newFatal( 'tags-manage-blocked' ); + return Status::newFatal( 'tags-manage-blocked', $user->getName() ); } } @@ -917,7 +917,7 @@ class ChangeTags { if ( !$user->isAllowed( 'managechangetags' ) ) { return Status::newFatal( 'tags-manage-no-permission' ); } elseif ( $user->isBlocked() ) { - return Status::newFatal( 'tags-manage-blocked' ); + return Status::newFatal( 'tags-manage-blocked', $user->getName() ); } } @@ -1050,7 +1050,7 @@ class ChangeTags { if ( !$user->isAllowed( 'deletechangetags' ) ) { return Status::newFatal( 'tags-delete-no-permission' ); } elseif ( $user->isBlocked() ) { - return Status::newFatal( 'tags-manage-blocked' ); + return Status::newFatal( 'tags-manage-blocked', $user->getName() ); } } diff --git a/languages/i18n/en.json b/languages/i18n/en.json index a033eddb69..295fe1071c 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -3704,7 +3704,7 @@ "tags-deactivate": "deactivate", "tags-hitcount": "$1 {{PLURAL:$1|change|changes}}", "tags-manage-no-permission": "You do not have permission to manage change tags.", - "tags-manage-blocked": "You cannot manage change tags while you are blocked.", + "tags-manage-blocked": "You cannot manage change tags while {{GENDER:$1|you}} are blocked.", "tags-create-heading": "Create a new tag", "tags-create-explanation": "By default, newly created tags will be made available for use by users and bots.", "tags-create-tag-name": "Tag name:", @@ -3740,11 +3740,11 @@ "tags-deactivate-not-allowed": "It is not possible to deactivate the tag \"$1\".", "tags-deactivate-submit": "Deactivate", "tags-apply-no-permission": "You do not have permission to apply change tags along with your changes.", - "tags-apply-blocked": "You cannot apply change tags along with your changes while you are blocked.", + "tags-apply-blocked": "You cannot apply change tags along with your changes while {{GENDER:$1|you}} are blocked.", "tags-apply-not-allowed-one": "The tag \"$1\" is not allowed to be manually applied.", "tags-apply-not-allowed-multi": "The following {{PLURAL:$2|tag is|tags are}} not allowed to be manually applied: $1", "tags-update-no-permission": "You do not have permission to add or remove change tags from individual revisions or log entries.", - "tags-update-blocked": "You cannot add or remove change tags while you are blocked.", + "tags-update-blocked": "You cannot add or remove change tags while {{GENDER:$1|you}} are blocked.", "tags-update-add-not-allowed-one": "The tag \"$1\" is not allowed to be manually added.", "tags-update-add-not-allowed-multi": "The following {{PLURAL:$2|tag is|tags are}} not allowed to be manually added: $1", "tags-update-remove-not-allowed-one": "The tag \"$1\" is not allowed to be removed.", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index e5df378ab2..c645ea25ab 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -3888,7 +3888,7 @@ "tags-deactivate": "Used on [[Special:Tags]]. Verb. Used as display text on a link to deactivate a tag.\n{{Identical|Delete}}", "tags-hitcount": "Shown in the \"{{msg-mw|Tags-hitcount-header}}\" column in [[Special:Tags]]. For more information on tags see [[mw:Manual:Tags|MediaWiki]].\n\nParameters:\n* $1 - the number of changes marked with the tag", "tags-manage-no-permission": "Error message on [[Special:Tags]]", - "tags-manage-blocked": "Error message on [[Special:Tags]]", + "tags-manage-blocked": "Error message on [[Special:Tags]]\n\nParameters:\n* $1 - user name for gender", "tags-create-heading": "The title of a fieldset, beneath which lies a form used to create a tag. For more information on tags see [[mw:Manual:Tags|MediaWiki]].", "tags-create-explanation": "The first paragraph of an explanation to tell users what they are about to do.", "tags-create-tag-name": "Form field label for the name of the tag to be created.", @@ -3924,11 +3924,11 @@ "tags-deactivate-not-allowed": "Error message on [[Special:Tags]]", "tags-deactivate-submit": "The label of the form \"submit\" button when the user is about to deactivate a tag.\n{{Identical|Deactivate}}", "tags-apply-no-permission": "Error message seen via the API when a user lacks the permission to apply change tags.", - "tags-apply-blocked": "Error message seen via the API when a user is blocked and attempted to apply change tags.", + "tags-apply-blocked": "Error message seen via the API when a user is blocked and attempted to apply change tags.\n\nParameters:\n* $1 - user name for gender", "tags-apply-not-allowed-one": "Error message seen via the API when a user tries to apply a single tag that is not properly defined. This message is only ever used in the case of 1 tag.\n\nParameters:\n* $1 - tag name", "tags-apply-not-allowed-multi": "Error message seen via the API when a user tries to apply more than one tag that is not properly defined.\n\nParameters:\n* $1 - comma-separated list of tag names\n* $2 - number of tags", "tags-update-no-permission": "Error message seen via the API when a user lacks the permission to add or remove change tags after the fact.", - "tags-update-blocked": "Error message seen via the API when a user is blocked and attempted to add or remove change tags after the fact.", + "tags-update-blocked": "Error message seen via the API when a user is blocked and attempted to add or remove change tags after the fact.\n\nParameters:\n* $1 - user name for gender", "tags-update-add-not-allowed-one": "Error message seen via the API when a user tries to add a single tag that is not properly defined. This message is only ever used in the case of 1 tag.\n\nParameters:\n* $1 - tag name", "tags-update-add-not-allowed-multi": "Error message seen via the API when a user tries to add more than one tag that is not properly defined.\n\nParameters:\n* $1 - comma-separated list of tag names\n* $2 - number of tags", "tags-update-remove-not-allowed-one": "Error message seen via the API when a user tries to remove a single tag that is not properly defined. This message is only ever used in the case of 1 tag.\n\nParameters:\n* $1 - tag name", -- 2.20.1