Page MenuHomePhabricator

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

Description

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.

Instructions:

  1. Download and setup a development copy of mediawiki. See https://www.mediawiki.org/wiki/MediaWiki-Vagrant 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

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

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

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