Page MenuHomePhabricator

Show number of members for categories in search results
Closed, ResolvedPublic

Description

When searching on Commons results gives information about the size of pages.

In most cases it is something like:

203 B (20 words) - 10:40, 14 February 2010

For images this is changed to the image size:

2,112×2,816 (2,681,964 bytes) - 02:26, 12 August 2009

For categories I think number of category members is a more useful measure of size. The info could be presented as:

123 category members (100 pages, 20 files, 3 subcategories) - 10:40, 14 February 2010

Version: 1.17.x
Severity: enhancement

Details

Reference
bz22647

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:07 PM
bzimport added a project: MediaWiki-Search.
bzimport set Reference to bz22647.
bzimport added a subscriber: Unknown Object (MLST).

patch to display category sizes differently in search results

attachment categorysearch.diff ignored as obsolete

I made a patch to do this.

(It is in standard MediaWiki, so changing component from Extensions.)

  1. Numbers should go through $wgLang->formatNum().
  2. New message should go in messages.inc.
  3. Minor nitpick: we usually say 'n pages', rather than 'n members'

a new patch where I tried to fix the mentioned problems

Here is another try.
*$wgLang->formatNum is used on numbers
*The new message is added to messages.inc
*It is not very important to me, but I choose the word "members" because (as far as I can see) the number is the total of pages, subcategories and files in the category. It is the same as the message 'nmembers' used in Special:Categories.

Attached: