Last modified: 2013-07-25 07:07:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T31266, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29266 - link to sort order for a translation stats page
link to sort order for a translation stats page
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Translate (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Niklas Laxström
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-03 18:17 UTC by Mark A. Hershberger
Modified: 2013-07-25 07:07 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Mark A. Hershberger 2011-06-03 18:17:24 UTC
I would like to provide permalinks to a statistics page with the statistics sorted in a particular order.  Specifically http://translatewiki.net/wiki/Translating:IHRIS/stats sorted by the "IHRIS Manage" or "IHRIS Common" column so that I can point to the page in emails, blog posts or what have you and have the translation coverage be immediately clear -- that is, not require the person clicking the link to also have to select a sort order.

When I spoke to Krinkle about making this a generic feature for sortable wikitables, he suggested I, instead, request that it be added to the extension that I want since, in the general case, it would be difficult to pick *which* sortable table on the page needed to be sorted.
Comment 1 Niklas Laxström 2011-06-03 19:30:32 UTC
It would not be difficult to tell the sortable code how to sort by default.
Comment 2 Krinkle 2011-06-04 18:31:16 UTC
That's right. If not already, a way to set the default column for sorting inside the wikitext when creating the "{| class='wikitable sortable' ... " should be simple.

I hadn't thought of it that way, if that's acceptable to TranslateWiki and suffices in Mark's request we can do that.

But if it's not something we'd want for all viewers of the /stats pages by default, then, imho, we only have two options:

1) Create some way, specifically on translatewiki.net, to process url parameters and manipulate a sorting-command to the table. This code could be places in MediaWiki:Common.js and checking the namespace and subpagename.

2) A much cleaner, but also more complex (imo overkill if this is the only needed advantage), implement this "/stats" functionality as a SpecialPage in the Translate-extension. Since it would output it's stuff from PHP it could use TablePager (or some other method), and could easily use url-parameters to control the initial sorting in the HTML output (this is supported by default in TablePager).

or, 3) Not exactly as request but might forfill the need, implement a way to tell the tablesorter javascript which column the default sort should be (ie. {| !class="defaultsorted"|myheading |} ).
This is the easiest to implement, but doesn't allow you to choose it (it would be hardcoded in the wikitext which column the default is), and would affect all viewers of the page.


Except for 2), I can implement without too much work. Let me know (or assign it to me), after a decision has been made :-)
Comment 3 Nemo 2012-07-30 09:33:53 UTC
Being bold and choosing (1).

(2) is not worth it. (3) doesn't work for this use case as all columns are the same except language which would still be the default; but if it's so easy to fix, it's worth another bug, all other wikis would appreciate it I think given that changing default sorting to a table is quite a pain.
Comment 4 Niklas Laxström 2012-10-19 21:24:30 UTC
https://gerrit.wikimedia.org/r/28761
Comment 5 Bartosz Dziewoński 2012-10-19 22:00:34 UTC
Not fixed yet, patch waiting for fixing and review.

Unassigning from Krinkle, Niklas and I are working on it.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links