Error messages should be wrapped in a container which allows it to style or modify them with CSS and/or JavaScript. Currently, some error messages aren't wrapped in such. Your task is to add a css class, like mw-error-cannotundelete, to the usage of the cannotundelete interface message.
Description
Details
- Reference
- bz18819
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Add id attribute to error message "mw-error-cannotundelete" | mediawiki/core | master | +3 -5 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | divadsn | T20819 Add id attribute to error message "mw-error-cannotundelete" | |||
Resolved | None | T23047 Wrap cannotdelete Msg |
Event Timeline
rahul14m93 wrote:
Can you shed a little more light on the problem espcially where to find these error messages?Thank you
(In reply to comment #1)
Can you shed a little more light on the problem espcially where to find these
error messages?
Where to find them in the code or what else? Platonides already said the names of some of them, e.g. [[MediaWiki:Missing-article]].
So this task is basically about wrapping an error message into a class, similar to $outputPage->wrapWikiMsg( "<div class=\"error mw-error-cannotdelete\">\n$1\n</div>" in /includes/page/Article.php or $wgOut->wrapWikiMsg( "<div class='error' id='mw-edit-longpageerror'>\n$1\n</div>", in ./includes/EditPage.php ?
That includes: cannotdelete, cannotundelete, missing-article...
How would a potential patch contributor find the places to fix?
For example, running grep -r "cannotundelete" . I get:
./maintenance/dictionary/mediawiki.dic:cannotundelete ./includes/api/ApiUndelete.php: $this->dieUsageMsg( 'cannotundelete' ); ./includes/api/ApiBase.php: 'cannotundelete' => [ ./includes/specials/SpecialUndelete.php: 'cannotundelete', ./includes/specials/SpecialUndelete.php: 'cannotundelete'
so I guess I would have to patch includes/specials/SpecialUndelete.php in that case?
And for missing-article I cannot find anything (except for translations). Could someone clarify?
Ok, cannotdelete has already a wrapping container with a class:
https://github.com/wikimedia/mediawiki/blob/f7ae4d41b8675d714edf502288fd5308ad1e53db/includes/page/Article.php#L1558-L1560
As missing-article seems to isn't used in MediaWIki/core (anymore), we should first think about this message, before changing anything :P So, this task is easy and easy enough for GCI! :D
To better understand the scope here, this is only about wrapping mw-error-cannotundelete?
Or are patch contributors expected to find more such cases themselves (how)?
Change 328943 had a related patch set uploaded (by Divadsn):
Add id attribute to error message "mw-error-cannotundelete"
Change 328943 merged by jenkins-bot:
Add id attribute to error message "mw-error-cannotundelete"