Last modified: 2013-06-18 14:44:11 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 T31788, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29788 - Swedish-language wikis should use Swedish-locale sorting (ie. ÅÄÖ should sort correctly)
Swedish-language wikis should use Swedish-locale sorting (ie. ÅÄÖ should sort...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
unspecified
All All
: Low minor with 3 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: i18n
Depends on:
Blocks: 30673
  Show dependency treegraph
 
Reported: 2011-07-09 16:29 UTC by Lejonel
Modified: 2013-06-18 14:44 UTC (History)
11 users (show)

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


Attachments

Description Lejonel 2011-07-09 16:29:18 UTC
MediaWiki sorts the Swedish letters Å, Ä and Ö in the order ÄÅÖ, but in the [[Swedish alphabet]] they are in the order ÅÄÖ.

Questions about this have been asked several times at Swedish Wikipedia. Usually the answer has been this is bug 164 in MediaWiki. But now that bug is marked fixed and says other sorting orders are possible.

It would be nice if Swedish Wikipedia (and maybe also other Swedish projects) used a sorting order where those letters are in Swedish alphabetical order.

(A current question about this is at [[sv:Wikipedia:WF#ABC....C3.84.C3.85.C3.96]])
Comment 1 Brion Vibber 2011-07-11 21:14:42 UTC
I..... _think_ Collation::factory() would need to be extended to accept new collation names like 'uca-sv' (?) which would then return an IcuCollation with a different base locale ('sv_SE'?)

And then .... $wgCategoryCollation is a per-site setting. Ugh! This all feels awfully awkward.

Of course this will still only apply to category sorting, not to alpha sorting of other page lists, user lists, etc.
Comment 2 Roan Kattouw 2011-07-15 00:12:56 UTC
(In reply to comment #1)
> I..... _think_ Collation::factory() would need to be extended to accept new
> collation names like 'uca-sv' (?) which would then return an IcuCollation with
> a different base locale ('sv_SE'?)
> 
I think that's pretty much what Aryeh intended when he built this system. I do know for sure that he intended creation of e.g. Swedish collations to be possible.

> And then .... $wgCategoryCollation is a per-site setting. Ugh! This all feels
> awfully awkward.
> 
How is it awkward that this is per-site? We can just set it on all Swedish-language wikis. I guess ideally you'd be able to set it per-category, I've heard that request before.

> Of course this will still only apply to category sorting, not to alpha sorting
> of other page lists, user lists, etc.
Yup, that's right.
Comment 3 Bawolff (Brian Wolff) 2011-08-23 23:36:00 UTC
>But now that bug is marked fixed and says other sorting orders are possible.

Its "fixed", but the fix is not turned on ;)

(In reply to comment #1)
> I..... _think_ Collation::factory() would need to be extended to accept new
> collation names like 'uca-sv' (?) which would then return an IcuCollation with
> a different base locale ('sv_SE'?)
> 

That's not even necessary - the default uca-default collation sorts things fine for Swedish (or at least in my test A Å Ä Ö was sorted in the order of AÅÄÖ). So once Wikimedia wikis switch to uca-default from uppercase collation, this issue should disappear.

>per-category

That's bug 28397 for reference.
Comment 4 Roan Kattouw 2011-08-24 11:16:37 UTC
(In reply to comment #3)
> That's not even necessary - the default uca-default collation sorts things fine
> for Swedish (or at least in my test A Å Ä Ö was sorted in the order of AÅÄÖ).
> So once Wikimedia wikis switch to uca-default from uppercase collation, this
> issue should disappear.
> 
The Swedish alphabet is A B C ... X Y Z Å Ä Ö  . Does it sort correctly with that in mind?
Comment 5 Bawolff (Brian Wolff) 2011-08-24 19:58:55 UTC
Whoops. No it doesn't, so some specific sv collation would have to be created.
Comment 6 Brion Vibber 2011-08-24 20:27:26 UTC
Adding bug 164 as a dependency. Reopened it since there's no way to set a Swedish locale currently without writing additional code, which seems rather nonsensical.
Comment 7 Mark A. Hershberger 2011-09-21 13:44:18 UTC
lowering priority since this isn't going to be fixed THIS WEEK.
Comment 8 mats 2013-01-05 16:46:52 UTC
This is ridiculous! How can such a bug as this be present?
Immagine if x was sorted after z, how could ANYONE treat this as anything but top prio?
Comment 9 Andre Klapper 2013-01-07 12:48:31 UTC
(In reply to comment #8)
> This is ridiculous! How can such a bug as this be present?

Very likely because nobody has fixed the problem yet. Contributing patches is very welcome to speed up the process. See http://www.mediawiki.org/wiki/Developer_access for more information.

Also, an example link would be great so everybody can see the problem in practice.

> Immagine if x was sorted after z, how could ANYONE treat this as anything but
> top prio?

Because it is not the same category as "Swedish Wikipedia completely down" or "All content on Swedish Wikipedia is scrambled" or "No images load anymore".
Comment 10 mats 2013-01-07 13:06:11 UTC
A suggested fix was posted here http://sv.wikipedia.org/wiki/Wikipedia:Wikipediafr%C3%A5gor#Sortering.2C_finns_det_n.C3.A5n_workaround.3F but unfortunately it doesn't work in my installation, any suggestions are apreciated.

My test site: http://privat.mohsart.se/mats/tbwiki/index.php?title=Kategori:%C3%85%C3%A4%C3%B6

In a perfect world, á, à etc would be sorted as a etc. and the last Swedish characters as åäö after xyz.

(The suggested fix for tables works btw)
Comment 11 Bawolff (Brian Wolff) 2013-01-07 13:13:35 UTC
Or the same as sorting is broken on all wikis. Plus there is a workaround of specifing fake sortkeys, albeit an annoying workarround that doesnt work that great

I know it can be frustrating waiting for a fix for an issue that's important to you, but everyone has an issue that they think is super important.  They can't all be top priority.

If it makes you feel better, this is an issue that I would really like to see fixed and will work on in some mythical future when I have less to do
Comment 12 Bawolff (Brian Wolff) 2013-01-07 13:21:13 UTC
(In reply to comment #10)
> A suggested fix was posted here
> http://sv.wikipedia.org/wiki/Wikipedia:Wikipediafr%C3%A5gor#Sortering.
> 2C_finns_det_n.C3.A5n_workaround.3F
> but unfortunately it doesn't work in my installation, any suggestions are
> apreciated.
> 
> My test site:
> http://privat.mohsart.se/mats/tbwiki/index.php?title=Kategori:
> %C3%85%C3%A4%C3%B6
> 
> In a perfect world, á, à etc would be sorted as a etc. and the last Swedish
> characters as åäö after xyz.
> 
> (The suggested fix for tables works btw)

That looks like it would work. Ideal world  use something based on uca but no point waiting for sn ideal world.

On your test wiki you may have to run updateCollation.php
Comment 13 mats 2013-01-07 13:37:15 UTC
Thanks, updateCollation.php did not help, if this http://www.mediawiki.org/wiki/Manual:Upgrading#Web_updater is the correct way to run it.
Comment 14 Bawolff (Brian Wolff) 2013-01-07 15:40:05 UTC
(In reply to comment #13)
> Thanks, updateCollation.php did not help, if this
> http://www.mediawiki.org/wiki/Manual:Upgrading#Web_updater is the correct way
> to run it.

I believe the web updater should work.

I'll try to poke at the code either later today or tomorrow.
Comment 15 Bawolff (Brian Wolff) 2013-01-08 17:58:17 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > Thanks, updateCollation.php did not help, if this
> > http://www.mediawiki.org/wiki/Manual:Upgrading#Web_updater is the correct way
> > to run it.
> 
> I believe the web updater should work.
> 
> I'll try to poke at the code either later today or tomorrow.

Works good on my test install. Sorting order is ...Z Å Ä Ö
Comment 16 Bawolff (Brian Wolff) 2013-01-08 17:59:55 UTC
Next step to getting this code deployed to svwiki would be to put it in the Wikimedia version control. Who is the author of the extension (for the credit line) and what copyright license is it under (GPL is a good choice if you don't care which one).
Comment 17 Lejonel 2013-01-08 20:12:05 UTC
I am the author and I am credited as "Lejonel" for my other contributions to MediaWiki. This code is mostly based on UppercaseCollation in MediaWiki core, so I think the code has to use the same GPL license.

(Thanks for testing this and helping making it a usable extension for svwiki.)
Comment 18 Bawolff (Brian Wolff) 2013-01-08 22:25:20 UTC
(In reply to comment #17)
> I am the author and I am credited as "Lejonel" for my other contributions to
> MediaWiki. This code is mostly based on UppercaseCollation in MediaWiki core,
> so I think the code has to use the same GPL license.
> 
> (Thanks for testing this and helping making it a usable extension for
> svwiki.)

I requested a git repository be created to put the extension in. ( https://www.mediawiki.org/wiki/Git/New_repositories/Requests )
Comment 19 Bawolff (Brian Wolff) 2013-01-10 23:42:11 UTC
Initial commit of extension in Gerrit change #43372. Next step is to get a senior developer to review the extension and deploy it.
Comment 20 Bawolff (Brian Wolff) 2013-01-15 21:18:40 UTC
(In reply to comment #19)
> Initial commit of extension in Gerrit change #43372. Next step is to get a
> senior developer to review the extension and deploy it.

Now gerrit change Id39406c3 as a core change
Comment 21 Mark A. Hershberger 2013-01-17 16:29:35 UTC
Could someone familiar with this change help this user: https://www.mediawiki.org/wiki/Thread:Project:Support_desk/I_suspect_a_problem_with_my_installation...
Comment 22 mats 2013-01-17 16:36:26 UTC
(In reply to comment #21)
> Could someone familiar with this change help this user:
> https://www.mediawiki.org/wiki/Thread:Project:Support_desk/
> I_suspect_a_problem_with_my_installation...

:-D
I asked there and not here, because I thought this was the wrong forum for my problems
Comment 23 Bawolff (Brian Wolff) 2013-01-17 17:54:02 UTC
Ive been exchanging emails with the user. I have no idea why he is experiancing the behavoir he is describing.
Comment 24 mats 2013-01-18 13:30:46 UTC
Did someone verify this on MediaWiki 1.20.2?
If so, could that person please email me all relevant files (except for localsettings.php ofc), ie extensions/SwedishCollation.php, includes/Collation.php, and if there are other files that could affect the behaviour...

Thanks,

mats@mohsart.se
Comment 25 Bawolff (Brian Wolff) 2013-02-06 00:13:35 UTC
Tim merged the change into core. Next step is to get it enabled on svwiki.
Comment 26 Alex Monk 2013-02-16 22:27:01 UTC
(In reply to comment #25)
> Tim merged the change into core. Next step is to get it enabled on svwiki.

Sounds like the MediaWiki part of this is done then.
Comment 27 Bawolff (Brian Wolff) 2013-02-17 08:03:01 UTC
(In reply to comment #26)
> (In reply to comment #25)
> > Tim merged the change into core. Next step is to get it enabled on svwiki.
> 
> Sounds like the MediaWiki part of this is done then.

Well no one has switched the config yet. But I suppose that could be a separate bug.
Comment 28 Bartosz Dziewoński 2013-02-18 22:50:53 UTC
I submitted I838484b9 to fix this "properly".
Comment 29 Bartosz Dziewoński 2013-02-26 20:27:04 UTC
(Removing bug 31235 tracker, the idea of making this an extension was dropped.)
Comment 30 Bartosz Dziewoński 2013-02-26 20:30:44 UTC
Reopening. This needs cleaning up now that I838484b9 is merged.

I propose removing the 'uppercase-sv' collation entirely, and setting sv.wikipedia to 'uca-sv' collation. I created bug 45446 to track this.
Comment 31 Bartosz Dziewoński 2013-02-26 21:17:37 UTC
(In reply to comment #30)
> I propose removing the 'uppercase-sv' collation entirely

Doing this in I2cd22ad8.
Comment 32 Bartosz Dziewoński 2013-02-27 22:51:44 UTC
Merged, so I'm finally making this bug as properly RESOLVED FIXED.
Comment 33 Lejonel 2013-03-01 17:49:17 UTC
> Merged, so I'm finally making this bug as properly RESOLVED FIXED.

The original version of this bug was Wikimedia bug "Sort Swedish letters ÅÄÖ correctly on Swedish Wikipedia" is not fixed. But I assume that is now the same (more or less) as bug 45446.

Someone changed this to MediaWiki bug "Swedish-language wikis should use Swedish-locale sorting (ie. ÅÄÖ should sort correctly)". Is this really fixed? Now it is possible to use Swedish sorting, but I think creating a newly installed Swedish language wiki will still use the old non-Swedish sort order.
Comment 34 Bartosz Dziewoński 2013-03-01 18:16:19 UTC
I split off that bug mostly for clarity, as most of the discussion here is no longer relevant.

And yes, the default is still the 'uppercase' collation. You inspired me to create bug 45611 to discuss changing this, as I'm not sure if this is a good idea, and I have no idea how to go about this.

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


Navigation
Links