Page MenuHomePhabricator

linter-pager-* messages are duplicated in MediaWiki core and Linter extension
Closed, ResolvedPublic

Description

@Nikerabbit pointed out on IRC that the linter-pager-* messages are duplicated in core and Linter itself. They were added to core as part of https://gerrit.wikimedia.org/r/c/mediawiki/core/+/569062 by @matmarex

Luckily they both have the same message contents, but eventually they'll fall out of sync accidentally and "bad(tm) things would happen".

Presumably these should just be removed from Linter.

Event Timeline

Hmm, sorry about that, I probably should have removed them from Linter when I moved them into core. I must have forgotten (or maybe I thought I'd get away with it).

They should also probably be renamed in core (I suggest linterror-*). I'm not sure if it's easier to do at the same time, or separately?

I'll submit patches for both things tomorrow.

Why do these messages to belong in core? If they belong in core, implicitly, we are saying that linter belongs in core and not an extension. It could either be core functionality OR in the nature of a "core extensions" like nowiki, gallery, parserfunctions, Scribunto. If that is right, we should probably think of migrating linter code into the core repo.

They're in core for the signature validation feature (https://www.mediawiki.org/wiki/New_requirements_for_user_signatures). You get an error with these messages if you try to save a signature with invalid HTML in your preferences. It doesn't depend on Linter, only on Parsoid.

Change 725004 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/Linter@master] Remove messages for lint errors (moved to core)

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

Eh, I notice now that Linter also has another set of messages, 'linter-category-*', which seems somehow related to the 'linter-pager-*' ones.

Maybe the proper solution is to rename the messages copied to core (effectively duplicating them), and leave those in Linter alone? I'm not sure how to proceed here.

Let me know how it should be solved, and I'll solve it. Sorry about the mess I made.

Maybe the proper solution is to rename the messages copied to core (effectively duplicating them), and leave those in Linter alone? I'm not sure how to proceed here.

This made sense to me before you said it :D. Different context, different use, potentially different message.

What @Izno said. I think the core ones shouldn't be called "-pager-" messages since DT isn't displaying tables of lint errors. We could move them to Parsoid. While Parsoid typically doesn't have anything user-facing yet, with the migration to parsoid read views, some of the error messages might need i18n support.

Change 725004 abandoned by Bartosz Dziewoński:

[mediawiki/extensions/Linter@master] Remove messages for lint errors (moved to core)

Reason:

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

OK. Thanks.

To explain myself, I didn't want to do this, because these terms are fairly difficult to translate, and I wanted to avoid a situation where we have different translations for the same technical term, since that makes the translated error messages impossible to google for. But if we already have 2, then 3 won't be that much worse, and maybe it's not a big deal anyway.

Change 725040 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] Rename linter-pager-* messages to avoid conflict with Linter extension

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

Change 725040 merged by jenkins-bot:

[mediawiki/core@master] Rename linter-pager-* messages to avoid conflict with Linter extension

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