Last modified: 2011-04-30 01:16:48 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 T20599, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 18599 - 'edit watchlist' sorting issue, plus bonus complaint
'edit watchlist' sorting issue, plus bonus complaint
Status: RESOLVED DUPLICATE of bug 164
Product: MediaWiki
Classification: Unclassified
Watchlist (Other open bugs)
1.14.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-26 17:45 UTC by Bruno
Modified: 2011-04-30 01:16 UTC (History)
2 users (show)

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


Attachments

Description Bruno 2009-04-26 17:45:06 UTC
this is utterly trivial, but I just noticed that the 'Special:Watchlist/edit' page uses ASCII sorting rather than natural language sorting.  This mostly has to do with capitalization: the pages 'Historic Anglicans' and 'Historic animals' would end up nowhere near each other if you have a number of other pages beginning with 'Historic...'.  I think this is trivial to fix in PHP, no?

plus, while you're at it, could you get rid of the absolutely spurious list bullets?  list bullets before checkboxes are pointless (since the checkbox itself will do double-duty as a bullet), and IMO, they look dorky.  :-)
Comment 1 Niklas Laxström 2009-04-27 07:38:03 UTC
(In reply to comment #0)
> I think this is trivial to fix in PHP, no?

Unfortunately it is not. Getting and setting the correct locale for the user language is next to impossible in PHP, because it just uses the underlying system's locales verbatim. 

> plus

One issue in one bug please.
Comment 2 Bruno 2009-04-27 13:20:14 UTC
err...  maybe I'm confused, but (a) wikimedia projects are already generally speaking localized (en.wikipedia, es.wiktionary...), and (b) each user can set their language localization in their preferences (which I'm assuming is stored in an easily accessible cookie, and probably defaults to the the encoding of the project they're working on).  given that (and cribbing from the PHP manual at http://www.php.net/manual/en/function.sort.php):

<?php
     setlocale( 'LC_ALL', $lang_code ); // $lang_code form a cookie or project, as above, possibly LC_COLLATE would be sufficient
     sort( $array_of_watchlist_article_names, SORT_LOCALE_STRNG ); 
     // ...continue processing the list normally
?>

might be a few extra lines of housekeeping code needed, but otherwise why wouldn't something like this work?  also, I think this behavior changed in PHP 6, so there might need to be code to account for that.  
Comment 3 Niklas Laxström 2009-04-27 13:47:25 UTC
(In reply to comment #2)
>      setlocale( 'LC_ALL', $lang_code ); // $lang_code form a cookie or project,
See the examples at:
http://www.php.net/manual/en/function.setlocale.php

Also: "Different systems have different naming schemes for locales."

We are not going to maintain list of codes for each language in each supported platform.
Comment 4 Roan Kattouw 2009-04-27 13:55:54 UTC
(In reply to comment #3)
> (In reply to comment #2)
> >      setlocale( 'LC_ALL', $lang_code ); // $lang_code form a cookie or project,
> See the examples at:
> http://www.php.net/manual/en/function.setlocale.php
> 
> Also: "Different systems have different naming schemes for locales."
> 
> We are not going to maintain list of codes for each language in each supported
> platform.
> 

To clarify: we'd need a one-to-one mapping from the languages that MediaWiki support to system locales. Such a one-to-one correspondence might not exist for all languages, and naming schemes for locales vary across systems, which makes creating and maintaining this mapping pretty much impossible.

A more viable option would be to specify the sort order for each language in the language file; leaving it up to the i18n folks to decide whether this is desired.
Comment 5 Bruno 2009-04-27 14:22:49 UTC
a 1:1 mapping would be nice, but not necessary: you make the best mapping you can, check if the mapping fails, and use the (current/default) ASCII sort where it does.  Special:watchlist/edit is not an article page: it's unique to each user, so you don't need to worry about consistency the way you need to with more public pages.

but never mind.  as I said, this is a trivial annoyance, and it's apparently less trouble to live with it than to discuss it.
Comment 6 Brion Vibber 2009-07-20 03:53:08 UTC

*** This bug has been marked as a duplicate of bug 164 ***

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


Navigation
Links