Page MenuHomePhabricator

Sorting language pane by article size
Closed, DeclinedPublic

Description

Author: ymeroz

Description:
Typically, versions of a given article in different languages vary in detail. It is no longer the case that the English version is the
canonical, or the most detailed one.

For us multilingual readers, it would be handy to have an option to sort the language pane for a given article by some metric of
detail, for example word count or character count (depending on the language).

Another possibility is to give a list of, say, the three longest versions, at the bottom of the language list.


Version: unspecified
Severity: enhancement

Details

Reference
bz6559

Related Objects

StatusSubtypeAssignedTask
DeclinedNone
OpenFeatureNone

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:18 PM
bzimport set Reference to bz6559.
bzimport added a subscriber: Unknown Object (MLST).

That would need DB access for all the interwikied wikis, plus the page length is
not AFAIK easy to compute (even worse for the word count!)
This would be most times unused because sorting would be done for each view,
while users are not going to pay much attention to it.

Could be a nice project for JavaScript

That information is not available for JavaScript either.

(In reply to comment #2)

That information is not available for JavaScript either.

I'm not so sure. The pagelength is stored in the revision table, and is available through the API with the 'info' propeties module as the 'lenght' prop [2].

A JavaScript gadget could get the languagelinks from the document, make API requests to those wikis to retrieve the page length and do something with it (ie. display it next to the link, put it in the tooltip, change the size of the text and sort by it, change the background color relatively, you name it).

The size of the current page coud be taken into account as well. eg:

Languages:

  • Dutch (+10)
  • English (+401) // biggest article
  • German (+12)
  • Spanish (+0) // same size as current article
  • Frysian (-1) // smallest article
  • Chinese (+21)

Lots of possiblities :0

Krinkle

[1] http://www.mediawiki.org/wiki/API:Properties#info_.2F_in
[2] http://en.wikipedia.org/w/api.php?action=query&titles=Albert+Einstein&prop=info&format=jsonfm

Pagelength is bytes which is useless for length comparison.

I was wrong 5 years ago. rev_len was added in r20222 (2007) but page_len in r7653 (2005).
The bytes parameter could be transformed with an approximation (eg. Chinese articles of the same length use ~3x bytes than English).

Seems something to add when the interwiki system is changed (Interlanguage extension?), where it would be easy to add the real length.

Amire80 subscribed.

This should not be a part of the general-purpose language-switching component.

People need a language they know, not the longer or the better article.

Advanced Wikipedia editors may need such a thing, but to avoid feature creep, it's better to get such info using an external tool or gadget and not through the main thing that all the readers see.