Page MenuHomePhabricator

Table sorting is wrong on several projects (Danish, Norwegian Nynorsk, Norwegian Bokmål)
Closed, ResolvedPublic


The sort order on Danish Norwegian Nynorsk and Norwegian Bokmål is …x, y, z, æ, ø, and å, but the table sorting use the sort order …x, y, z, å, æ, and ø. The convention on those projects are also to sort "aa" as if it is "å".

I have created test pages for the table sorting at w:no:User:Jeblad/sortering, w:nn:User:Jeblad/sortering, and w:da:User:Jeblad/sortering

The table sorting does not conform to the present sorting of categories, this is checked on Norwegian Bokmål and there is a test category at w:no:Kategori:Testkategori. (This category with its content is deleted.)

I have asked for confirmation that the sort order is wrong at w:no:Wikipedia:Tinget#Sortering av norske tegn, w:nn:Wikipedia:Samfunnshuset#Tabellsortering, and w:da:Wikipedia:Landsbybrønden#Tabellsortering.

It seems like the problem also exist on Islandic and Faroese Wikipedia, w:is:User:Jeblad/tabellsortering and w:fo:User:Jeblad/tabellsortering. I've going to ask for confirmation that the sort order is actually wrong on those projects.

Event Timeline

That's probably because they didn't configure a table sort collation or collation regex defined for those languages. See for instance german wikipedia:

A more longer term fix is described at: T72157

Ok, I can ask them to create such an entry.

In Norway is since Nov. 2017 a tableSorterCollation in Common.js, in Nynorsk (nn:), Islandic (is:) also. Danish (da:) and Faroese (fo:) Wikipedia have this not yet.
But the difficult task is to transform "aa" into "å". Today we can replace only one letter with one (or more) letter. Need we this really?
w:no:Spezial:All pages from "Saa.." sort 'aa' normal after 'a'.

... oh sorry, i have tested with an older version offline. We can transform more than one letter ("aa" into "å") since Aug 2016.
But the tableSorterCollation shoud contain only lowercase letters. He work after

s = $.trim( s.toLowerCase() );
if ( ts.collationRegex ) { ...
Aklapper renamed this task from Table sorting is wrong on several projects to Table sorting is wrong on several projects (Danish, Norwegian Nynorsk, Norwegian Bokmål).Jan 7 2018, 5:11 PM

Jeblad is falsely assuming here that the Icelandic alphabet order is the same as in Norwegian. That is not the case, and even the Icelandic alphabet has some letters which are not present in Norwegian, and vice versa. I added the current table sorting on the Icelandic wikipedia after some talks with other wikipedians on the Icelandic wikipedia. The sort order configured in MediaWiki:Common.js on the Icelandic Wikipedia is completely in line with the Icelandic alphabet.

Also, when it comes to the Faroese wikipedia, the faroese alphabet is also not the same as the Danish or Norwegian one.

MatthiasDD claimed this task.