User:Simetrical/Collation

From mediawiki.org

For work on bug 164, bug 1211, bug 23682. Feel free to edit to make suggestions and whatnot.

Things still to do, some part of my actual work and some side things I may as well do while I'm at it:

  • Rewrite category paging, so that subcats and files are actually paged. Will have to change the format of URL parameters so that they don't get insanely long. Done, r69972
  • While I'm at it, make sure sorting is unique by tacking on cl_from (bug 4912).
  • Write a proper transition script. Done, r69961
  • Support omitting cl_raw_sortkey if it can be derived from the title and namespace. Done, r69961
  • Don't assume $wgCollationVersion is ordered; change ">" to "!=", so people can migrate from collation 137 to 6 if they want and don't have to increment. Done, r69961.
  • (suggested by Phillipe Verdy on bug 164) When cl_raw_sortkey is not null, append the page title (or namespace and title) before converting to a binary sortkey. This way you can give " " as a sortkey for a bunch of things and they'll all sort appropriately, for instance. Thus cl_raw_sortkey can be interpreted as a prefix, not the full sortkey. Actually, in this interpretation, it would make sense to rename it cl_sortkey_prefix and make it NOT NULL default ''. Done, r69961
  • (suggested by Phillipe Verdy on bug 164) Expose Language::convertToSortkey() and Language::firstLetterForLists() as parser functions, for use in JavaScript table sorting and so forth. (Probably this has to wait until we have a non-stub implementation of both.)
  • (suggested by various people) Allow different categories to have different collations, mostly useful for Wiktionary.
  • Once I've got final approval for the approach I'm taking, change all in-trunk users of categorylinks so that they don't break. This will be a pain. If I can't do it all at once, I'll need to do it in a branch, because that many $wgExperimentalCategorySort conditionals is going to cause a lot of unnecessary bugs.