Page MenuHomePhabricator

Make $wgCountCategorizedImagesAsUsed change the description message of Special:Unusedfiles
Closed, ResolvedPublic


If $wgCountCategorizedImagesAsUsed is set to true in LocalSettings.php, then Special:Unusedfiles won't display files that are categorized.

This can be kind of confusing, we should change the header message (unusedimagestext) to say that categorized images aren't considered unused.


  1. Download and setup a development copy of mediawiki. See for info
  2. In includes/specials/SpecialUnusedimages.php find getPageHeader(). Change it to be an if condition based on $this->getConfig()->get( 'CountCategorizedImagesAsUsed' ) so that it returns a different message name if that config is on
  3. Add the new message to languages/i18n/en.json . Add info for translators under what circumstance the message is used to languages/i18n/qqq.json and mention that it is sometimes used in place of the other message (linking to the other message by doing {{msg-mw|message name here}},
  4. Test your change. Test that the proper behaviour happens both with $wgCountCategorizedImagesAsUsed set to true, and with it set to false in LocalSettings.php
  5. Commit and upload to gerrit
  6. Wait 10 minutes until jenkins bot leaves a comment to ensure that jenkins bot didn't flag any issues

This bug was reported by niso on irc.

Event Timeline

Change 478289 had a related patch set uploaded (by Rafidaslam; owner: Rafid Aslam):
[mediawiki/core@master] SpecialUnusedimages: Change message when CountCategorizedImagesAsUsed

Change 478289 merged by jenkins-bot:
[mediawiki/core@master] SpecialUnusedimages: Change message when CountCategorizedImagesAsUsed