Wikimedia

Change description message on Special:Unusedfiles when $wgCountCategorizedImagesAsUsed true

If $wgCountCategorizedImagesAsUsed is set to true in LocalSettings.php, then Special:Unusedfiles doesn't display files that are categorized (as it should be).

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

Instructions:

Download and setup a development copy of mediawiki. See https://www.mediawiki.org/wiki/MediaWiki-Vagrant for info

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

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}},

Test your change. Test that the proper behaviour happens both with $wgCountCategorizedImagesAsUsed set to true, and with it set to false in LocalSettings.php

Commit and upload to gerrit

Wait 10 minutes until jenkins bot leaves a comment to ensure that jenkins bot didn't flag any issues

Task tags

  • mediawiki
  • php

Students who completed this task

refeed

Task type

  • code Code
close

2018