Page MenuHomePhabricator

Remove operators and functions from abusefilter-edit-builder-* messages
Closed, ResolvedPublicBUG REPORT

Description

Many translatable messages whose keys are abusefilter-edit-builder-* include the operator itself within the message. This is problematic for several reasons:

  1. Some of those operators are incorrectly identified by CI as HTML that has to be manually reviewed in translations (see T358384).
  2. By their nature, they are identical in all the languages, so copying each of them is a waste of translators' time.
  3. In RTL languages, some of them may be displayed incorrectly, especially those that include characters like < and !.

There are workarounds for each of these issues by itself, but given that there are several of them, it would be nice to fix them thoroughly.

A simple solution is to remove the explicit functions and operators from the translatable messages, and to add them automatically in the code. Each message would have ($1) in the end, and the $1 would have the operator or the function wrapped in bidi isolation (they can't use <span dir="ltr"> because they are used in <option>).

Event Timeline

Change #1014119 had a related patch set uploaded (by Amire80; author: Amire80):

[mediawiki/extensions/AbuseFilter@master] Reorder messages that describe operators

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

Change #1014119 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] Reorder messages that describe operators

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

Change #1026971 had a related patch set uploaded (by Amire80; author: Amire80):

[mediawiki/extensions/AbuseFilter@master] WIP: Automatically add operators to description messages

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

Change #1027152 had a related patch set uploaded (by Amire80; author: Amire80):

[mediawiki/extensions/MobileFrontend@master] Add a parameter to AbuseFilter message

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

Change #1027160 had a related patch set uploaded (by Amire80; author: Amire80):

[mediawiki/extensions/TorBlock@master] Add a parameter to an AbuseFilter message

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

Change #1026971 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] Automatically add operators to description messages

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

Change #1027173 had a related patch set uploaded (by Amire80; author: Amire80):

[mediawiki/extensions/HitCounters@master] Add a parameter to an AbuseFilter message

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

Change #1027175 had a related patch set uploaded (by Amire80; author: Amire80):

[mediawiki/extensions/CentralAuth@master] Add a parameter to an AbuseFilter message

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

Change #1027152 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Add a parameter to AbuseFilter message

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

Change #1027173 merged by jenkins-bot:

[mediawiki/extensions/HitCounters@master] Add a parameter to an AbuseFilter message

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

Change #1027175 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] Add a parameter to an AbuseFilter message

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

Change #1027256 had a related patch set uploaded (by Amire80; author: Amire80):

[mediawiki/extensions/Translate@master] Add a parameter to an AbuseFilter message

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

Change #1027262 had a related patch set uploaded (by Amire80; author: Amire80):

[mediawiki/extensions/MobileApp@master] Add a parameter to an AbuseFilter message

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

Change #1027263 had a related patch set uploaded (by Amire80; author: Amire80):

[mediawiki/extensions/Flow@master] Add a parameter to an AbuseFilter message

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

Change #1027266 had a related patch set uploaded (by Amire80; author: Amire80):

[mediawiki/extensions/StopForumSpam@master] Add a parameter to an AbuseFilter message

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

Change #1027274 had a related patch set uploaded (by Amire80; author: Amire80):

[mediawiki/extensions/OAuth@master] Add a parameter to an AbuseFilter message

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

Change #1027262 merged by jenkins-bot:

[mediawiki/extensions/MobileApp@master] Add a parameter to an AbuseFilter message

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

Change #1027274 merged by jenkins-bot:

[mediawiki/extensions/OAuth@master] Add a parameter to an AbuseFilter message

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

Change #1027266 merged by jenkins-bot:

[mediawiki/extensions/StopForumSpam@master] Add a parameter to an AbuseFilter message

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

Change #1027160 merged by jenkins-bot:

[mediawiki/extensions/TorBlock@master] Add a parameter to an AbuseFilter message

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

Change #1027263 merged by jenkins-bot:

[mediawiki/extensions/Flow@master] Add a parameter to an AbuseFilter message

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

I noticed an issue with this change, because these descriptions are also used elsewhere:

  1. Go to Special:AbuseLog.
  2. Click on an « examine » link to go to such page, for example Special:AbuseLog/37900276.
  3. In the left column of the table, all descriptions are unexpectedly followed by a « ($1) » text.

Change #1046054 had a related patch set uploaded (by Matěj Suchánek; author: Matěj Suchánek):

[mediawiki/extensions/AbuseFilter@master] Fix variable descriptions showing raw "($1)"

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

Change #1046054 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] Fix variable descriptions showing raw "($1)"

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

A bot should be used to update the translation messages, otherwise the legacy messages will probably stay for a long time…

To see the messages that need to be updated: https://github.com/wikimedia/mediawiki-extensions-AbuseFilter/commit/1904cf8d1b6cb5e1f1ae4fc64e1ff84155720159

Some searches on Translatewiki:

I'd like to know, would running a bot to update as much as 8,788 messages be acceptable? In addition to the edits listed on translatewiki, that would result in a gigantic commit in the AbuseFilter repository…

Another thing: the messages may be prefixed with the keyword !!FUZZY!!. And these keywords were not added by this issue, they date back from 2009-2010. Should these !!FUZZY!! be boldly deleted, or kept out of an abundance of caution?