Page MenuHomePhabricator

Alphabetic operation logic of sort order function for numeric data in tables in russian language
Closed, DeclinedPublic

Description

Author: Jumanjero

Description:
Screenshot of an article in russian wiki, "Внешний долг" column sortder in desc order

In russian wiki version when you try to sort data in a table in any (asc or desc) order it uses alphabetic sort logic instead of numeric, this way, number line 1, 2, 3, 10, 11, 20, 30 will be shown in the following order: 1, 10, 11, 2, 20, 3, 30.
I've noticed that bug when using russian version, however, I could not reproduce that in english version.
http://ru.wikipedia.org/wiki/%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA_%D1%81%D1%82%D1%80%D0%B0%D0%BD_%D0%BF%D0%BE_%D0%B2%D0%BD%D0%B5%D1%88%D0%BD%D0%B5%D0%BC%D1%83_%D0%B4%D0%BE%D0%BB%D0%B3%D1%83
http://en.wikipedia.org/wiki/List_of_countries_by_external_debt


Version: 1.21.x
Severity: major
URL: http://ru.wikipedia.org/wiki/%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA_%D1%81%D1%82%D1%80%D0%B0%D0%BD_%D0%BF%D0%BE_%D0%B2%D0%BD%D0%B5%D1%88%D0%BD%D0%B5%D0%BC%D1%83_%D0%B4%D0%BE%D0%BB%D0%B3%D1%83
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=42924

Attached:

Sort_order_ru_wiki.png (1×1 px, 201 KB)

Details

Reference
bz43165

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:49 AM
bzimport set Reference to bz43165.
bzimport added a subscriber: Unknown Object (MLST).

I don't think this is related to 42924. To determine the type (alpabetic / numeric / etc. ) the code looks at the first ~ 5 rows. In this case there are non-numeric values in the first row (более 70 600 000), so the type is set to alphabetic. You can fix this by setting the type manually (as I did: https://ru.wikipedia.org/w/index.php?title=%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA_%D1%81%D1%82%D1%80%D0%B0%D0%BD_%D0%BF%D0%BE_%D0%B2%D0%BD%D0%B5%D1%88%D0%BD%D0%B5%D0%BC%D1%83_%D0%B4%D0%BE%D0%BB%D0%B3%D1%83&diff=prev&oldid=50777415)
See [[m:Help:Sorting]] for more information.
The column with the dates still doesn't sort correctly, you have to use data-sort-value to fix this, as explained in the documentation.