Page MenuHomePhabricator

Refactor GlobalBlocking messages into smaller messages
Closed, ResolvedPublic5 Estimated Story Points

Description

Background

Similar to T324601: Refactor block messages into smaller messages, the following GlobalBlocking messages are long and difficult to maintain:

  • globalblocking-blockedtext-ip
  • globalblocking-blockedtext-range
  • globalblocking-blockedtext-xff
  • globalblocking-ipblocked
  • globalblocking-ipblocked-range
  • globalblocking-ipblocked-xff

Also, the last three of those messages should be replaced with the first three, as they are the same but with a different parameter order.

Acceptance criteria
  • These messages should be refactored in a similar way to those in core (T324601: Refactor block messages into smaller messages)
  • The messages globalblocking-ipblocked globalblocking-ipblocked-range and globalblocking-ipblocked-xff should be replaced by their newer counterparts
  • The overrides in WikimediaMessages should be updated accordingly

Event Timeline

Tchanders set the point value for this task to 5.Dec 8 2022, 12:11 AM
STran removed STran as the assignee of this task.Jan 12 2023, 9:07 PM
STran subscribed.

Unlicking this cookie bc prioritized work came up.

Change 886126 had a related patch set uploaded (by AGueyte; author: AGueyte):

[mediawiki/extensions/GlobalBlocking@master] Refactor block error message into smaller ones

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

Change 886187 had a related patch set uploaded (by AGueyte; author: AGueyte):

[mediawiki/extensions/WikimediaMessages@master] Refactor Global Blocking error messages for clarity

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

Change 886187 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMessages@master] Refactor Global Blocking error messages for clarity

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

The patch to WikimediaMessages is causing problems for translatewiki.net. Please see gerrit for details.

Change 891654 had a related patch set uploaded (by AGueyte; author: AGueyte):

[mediawiki/extensions/WikimediaMessages@master] Refactor Global Blocking error messages for clarity

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

Change 886126 merged by jenkins-bot:

[mediawiki/extensions/GlobalBlocking@master] Refactor block error messages for clarity

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

Thanks for more work on that!

Some more comments:

  • 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.

Change 891654 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMessages@master] Refactor Global Blocking error messages for clarity

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

Bypassing QA since this has been checked by a lot of people already.

Thanks for more work on that!

Some more comments:

  • 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.

Thanks - filed as T332186: In GlobalBlocking block messages, re-use core messages

The new messages wikimedia-globalblocking-blockedtext-mistake and wikimedia-globalblocking-blockedtext-mistake-email-steward look unnecessary because they are the same as in the extension.

The new messages wikimedia-globalblocking-blockedtext-mistake and wikimedia-globalblocking-blockedtext-mistake-email-steward look unnecessary because they are the same as in the extension.

I think these are only defined in WikimediaMessages.

There are two similar sets of messages in wikimedia/en.json and wikimediaoverrides/en.json, which are used separately by different pathways in the GlobalBlocking extension. (This itself is some technical debt that should be cleaned up: T332402)

It would be nice if you could clean it up as quickly as possible, because it currently causes some issues in translatewiki. Wikimedia-specific messages should probably be in the WikimediaMessages extension.

It would be nice if you could clean it up as quickly as possible, because it currently causes some issues in translatewiki. Wikimedia-specific messages should probably be in the WikimediaMessages extension.

Just to be clear, the messages wikimedia-globalblocking-blockedtext-mistake and wikimedia-globalblocking-blockedtext-mistake-email-steward are not defined in the GlobalBlocking extension. Is this what you thought was causing issues?

If not, could you share more info on what the issues are or what might be causing them?

Key 8:globalblocking-blockedtext-all-wikis already belongs to ext-globalblocking-user, conflict with ext-wikimediamessages
Key 8:globalblocking-blockedtext-ip-range already belongs to ext-globalblocking-user, conflict with ext-wikimediamessages
Key 8:globalblocking-blockedtext-on-proxy already belongs to ext-globalblocking-user, conflict with ext-wikimediamessages
Key 8:globalblocking-blockedtext-on-range already belongs to ext-globalblocking-user, conflict with ext-wikimediamessages
Key 8:globalblocking-blockedtext-proxy already belongs to ext-globalblocking-user, conflict with ext-wikimediamessages

Same message key is used in different extensions and at least in some cases with different values. Existing translations are getting "messed up" depending which definition of the message translators are seeing.

It would be nice if you could clean it up as quickly as possible, because it currently causes some issues in translatewiki. Wikimedia-specific messages should probably be in the WikimediaMessages extension.

Just to be clear, the messages wikimedia-globalblocking-blockedtext-mistake and wikimedia-globalblocking-blockedtext-mistake-email-steward are not defined in the GlobalBlocking extension. Is this what you thought was causing issues?

If not, could you share more info on what the issues are or what might be causing them?

Oh, my mistake. But is it right that they appear both in Wikimedia Messages and Wikimedia Overrides? I'd guess that Wikimedia Messages is enough, but please correct me if I'm wrong.

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

[mediawiki/extensions/WikimediaMessages@master] Fix duplicate message keys in GlobalBlocking overrides

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

Key 8:globalblocking-blockedtext-all-wikis already belongs to ext-globalblocking-user, conflict with ext-wikimediamessages
Key 8:globalblocking-blockedtext-ip-range already belongs to ext-globalblocking-user, conflict with ext-wikimediamessages
Key 8:globalblocking-blockedtext-on-proxy already belongs to ext-globalblocking-user, conflict with ext-wikimediamessages
Key 8:globalblocking-blockedtext-on-range already belongs to ext-globalblocking-user, conflict with ext-wikimediamessages
Key 8:globalblocking-blockedtext-proxy already belongs to ext-globalblocking-user, conflict with ext-wikimediamessages

Same message key is used in different extensions and at least in some cases with different values. Existing translations are getting "messed up" depending which definition of the message translators are seeing.

Thanks - this should be fixed in https://gerrit.wikimedia.org/r/901136 which removes these messages, since they were unnecessary.

In T324722#8708669, @Amire80 wrote:
Oh, my mistake. But is it right that they appear both in Wikimedia Messages and Wikimedia Overrides? I'd guess that Wikimedia Messages is enough, but please correct me if I'm wrong.

Good point - the patch also removes these from wikimedia/en.json

Change 901136 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMessages@master] Fix duplicate message keys in GlobalBlocking overrides

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

wikimedia-globalblocking-blockedtext-details-queries and blockedtext-include-details-queries are identical. If there's no intention to make a special version of this message for Wikimedia sites, then wikimedia-globalblocking-blockedtext-details-queries should probably be removed.

wikimedia-globalblocking-blockedtext-details-queries and blockedtext-include-details-queries are identical. If there's no intention to make a special version of this message for Wikimedia sites, then wikimedia-globalblocking-blockedtext-details-queries should probably be removed.

Fixed in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikimediaMessages/+/903315