Glaisher has uploaded a new change for review. https://gerrit.wikimedia.org/r/240352
Change subject: Improve "centralauth-rename-antispoofconflicts2" message ...................................................................... Improve "centralauth-rename-antispoofconflicts2" message * Link usernames to Special:CentralAuth * Add PLURAL support * Use listToText() instead of commaList Bug: T99237 Change-Id: I770175cfbd2df5474bbc500f985dabf38109fa4b --- M i18n/en.json M i18n/qqq.json M includes/specials/SpecialGlobalRenameUser.php 3 files changed, 7 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/52/240352/1 diff --git a/i18n/en.json b/i18n/en.json index 81f7a2f..25917cb 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -376,7 +376,7 @@ "centralauth-rename-alreadyinprogress" : "There is already a rename for this user in [[Special:GlobalRenameProgress/$1|progress]].", "centralauth-renameuser-global-inprogress": "There is already a global rename for $1 in [[Special:GlobalRenameProgress/$1|progress]].", "centralauth-rename-queued" : "Jobs to rename $1 to $2 have been queued on $3.\n\nView the progress at [[Special:GlobalRenameProgress/$2]].", - "centralauth-rename-antispoofconflicts2": "The chosen username is too similar to existing usernames: $1.", + "centralauth-rename-antispoofconflicts2": "The chosen username is too similar to {{PLURAL:$2|an existing username|existing usernames}}: $1.", "centralauth-rename-conflict-hidden": "username hidden", "centralauth-rename-progress-username" : "Username", "centralauth-rename-notinprogress" : "There are no renames in progress for $1. They may have already finished.", diff --git a/i18n/qqq.json b/i18n/qqq.json index b28d4c0..096e367 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -391,7 +391,7 @@ "centralauth-rename-alreadyinprogress": "Error message if the user is already being renamed. $1 the new username.", "centralauth-renameuser-global-inprogress": "Error message shown on Special:RenameUser if a local rename is attempted while a global one is in progress.\n\n* $1 is the user being renamed's username", "centralauth-rename-queued": "Message shown after the rename has started.\n\n* $1 is the user's old name\n* $2 is the user's new name\n* $3 is a list of the database names where rename jobs have been queued", - "centralauth-rename-antispoofconflicts2": "Error message shown if the username conflicts with an existing one in AntiSpoof. $1 is a comma-separated list of conflicting usernames", + "centralauth-rename-antispoofconflicts2": "Error message shown if the username conflicts with an existing one in AntiSpoof. $1 is a comma-separated list of conflicting usernames. $2 is number of conflicting usernames - for use with PLURAL.", "centralauth-rename-conflict-hidden": "Text displayed instead of the username if the user has been hidden", "centralauth-rename-progress-username": "{{identical|Username}}\nLabel for username form field on Special:RenameProgress", "centralauth-rename-notinprogress": "Message shown when there is no rename in progress for the provided user\n* $1 is the username", diff --git a/includes/specials/SpecialGlobalRenameUser.php b/includes/specials/SpecialGlobalRenameUser.php index 49ac3d5..2062ac2 100644 --- a/includes/specials/SpecialGlobalRenameUser.php +++ b/includes/specials/SpecialGlobalRenameUser.php @@ -112,8 +112,9 @@ ); if ( $conflicts ) { return Status::newFatal( - 'centralauth-rename-antispoofconflicts2', - $this->getLanguage()->commaList( $conflicts ) + $this->msg( 'centralauth-rename-antispoofconflicts2' ) + ->params( $this->getLanguage()->listToText( $conflicts ) ) + ->numParams( count( $conflicts ) ) ); } } @@ -129,7 +130,7 @@ * * @param string $oldname User's old (current) name * @param array $conflicts Conflicting usernames - * @return array Usernames that are safe for display + * @return array Usernames that are safe to display - non-hidden usernames are linked to Special:CA */ public function processAntiSpoofConflicts( $oldname, array $conflicts ) { $display = array(); @@ -142,7 +143,7 @@ if ( $ca->isHidden() ) { $display[] = $this->msg( 'centralauth-rename-conflict-hidden' )->text(); } else { - $display[] = $name; + $display[] = "[[Special:CentralAuth/$name|$name]]"; } } return $display; -- To view, visit https://gerrit.wikimedia.org/r/240352 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I770175cfbd2df5474bbc500f985dabf38109fa4b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Glaisher <glaisher.w...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits