Page MenuHomePhabricator

In GlobalBlocking block messages, re-use core messages
Closed, ResolvedPublic1 Estimated Story Points

Description

Background

We can further improve the GlobalBlocking block messages to save work for translators, following T324722: Refactor GlobalBlocking messages into smaller messages.

  • Instead of adding globalblocking-blockedtext-details-queries, you can probably reuse blockedtext-include-details-queries from core. Reusing messages is often not recommended, but in this case, I think it's OK.
  • "The block was made by", "The reason given is", "Start of block", and "Expiration of block" are also available in core, and can be reused in Global Blocking.

We can re-use the following core messages:

  • "Please include all above details" - {{int:blockedtext-include-details-queries}}
  • "The block was made by" - {{int:blockedtext-made-by|$n}}
  • "The reason given is" - {{int:blockedtext-reason-comment|$n}}
  • "Start of block" - {{int:blockedtext-start-time|$n}}
  • "Expiration of block" - {{int:blockedtext-expiration-time|$n}}
  • "Your current IP address is" - {{int:blockedtext-block-ip|$n}}

Event Timeline

Tchanders set the point value for this task to 1.Mar 15 2023, 3:18 PM
Tchanders updated the task description. (Show Details)
Tchanders added a subscriber: AGueyte.

Change 899656 had a related patch set uploaded (by Tchanders; author: Tchanders):

[mediawiki/extensions/GlobalBlocking@master] Re-use core block messages to save work for translators

https://gerrit.wikimedia.org/r/899656

Change 899656 merged by jenkins-bot:

[mediawiki/extensions/GlobalBlocking@master] Re-use core block messages to save work for translators

https://gerrit.wikimedia.org/r/899656

dom_walden subscribed.

I compared each changed interface message between enwiki beta and testwiki (by going to MediaWiki:<message key>).

The only difference was globalblocking-blockedtext-range:

beta:

Your IP address is in a range that has been blocked on all Wikimedia Foundation wikis.

The block was made by $1. The reason given is $2.

    Start of block: $8
    Expiry of block: $6

Your current IP address is $3. The blocked range is $7.

Please include all above details in any queries you make. If you believe you were blocked by mistake, you can find additional information and instructions in the No open proxies global policy. Otherwise, to discuss the block please post a request for review on Meta-Wiki. You could also send an email to the stewards VRT queue at stewards@wikimedia.org including all above details.

testwiki:

Your IP address is in a range that has been blocked on all Wikimedia Foundation wikis.

The block was made by $1. The reason given is $2.

    Start of block: $8
    Expiry of block: $6

Your current IP address is $3 and the blocked range is $7. Please include all above details in any queries you make.

If you believe you were blocked by mistake, you can find additional information and instructions in the No open proxies global policy. Otherwise, to discuss the block please post a request for review on Meta-Wiki or send an email to the stewards VRT queue at stewards@wikimedia.org including all above details.

Which appears to be the same information but slightly differently worded/structured.

I then tested how the actual block messages appear to a blocked user on enwiki and commons beta (to test that the variables are being passed correctly and there are no cross-wiki bugs).

I could only test globalblocking-blockedtext-ip, globalblocking-blockedtext-range and globalblocking-blockedtext-xff. I could not work out how to see any of the three globalblocking-ipblocked-* messages.

Test environments: