==== Background
Blocks can be reported to the user via several different block error messages. `BlockErrorFormatter::getBlockErrorMessageKey` chooses which message to use, depending on the type of block.
After {T317201}, extensions can tell `BlockErrorFormatter` which error message key to use. GlobalBlocking should have a handler for this hook that uses one of the extension's block messages.
==== Acceptance criteria
* If there is a GlobalBlock and no other block, the error message displayed is one of 'globalblocking-ipblocked', 'globalblocking-ipblocked-range' or 'globalblocking-ipblocked-xff'
* ~~If there is a CompositeBlock that includes a GlobalBock, the block reason is updated to include details of the global block~~ (see end of T317308#8276750)
* The hooks `onGlobalBlockingBlockedIpMsg`, `onGlobalBlockingBlockedIpRangeMsg` and `onGlobalBlockingBlockedIpXffMsg` are run so that WikimediaMessages can alter the message keys
* If there is no global block, nothing is changed
==== Notes
See `GlobalBlocking::getUserBlockDetails` for how the message keys are currently chosen
==== Testing notes
This task affects anywhere that throws a `UserBlockedError` with a global block. One example in core is [[ https://gerrit.wikimedia.org/g/mediawiki/core/+/e76a6d8aa4ca00ebfcf74fa0a157a049a327cd2c/includes/specials/SpecialUpload.php#220 | SpecialUpload ]].
Before testing:
* This should be tested with and without the WikimediaMessages extension. (This might mean it needs to be tested locally?)
* This needs to be tested with T317201. (That patch has been merged, but if testing locally core may need updating.)
* Where testing with WikimediaMessages, this should be tested with (TODO)
Steps to test (without WikimediaMessages):
* Globally block your IP address. (Make sure there are no local blocks or other local blocks against your IP address.)
* Log out and visit Special:Upload
* Before this change, the message to tell you you are blocked is `blockedtext`
* After this change, the blocked message should be `globalblocking-ipblocked`
Repeat this, but in the first 2 steps:
* block an IP range covering your IP address. The new message should be `globalblocking-ipblocked-range`
* change your XFF header using a browser extension such as [[ chrome://extensions/?id=hkghghbnihliadkabmlcmcgmffllglin | this one ]], and block that IP address. The new message should be `globalblocking-ipblocked-xff`.
Repeat all of the above with WikiMediaMessages enabled. The messages should be as above, prefixed with `wikimedia-`.