← Back to team overview

schooltool-developers team mailing list archive

Re: Sorting person titles

 

Hey,

On 12/22/2010 06:51 PM, Douglas Cerna wrote:
Hello everybody.

I've added ICollator sorting support for the gradebook and I'd like your opinion on this sorting:

http://img101.imageshack.us/img101/209/pantallazo1zy.png

Does it look good? I'm kind of sure about "Á" coming after "A" and "Ñ" after "N", and I remember Justas told me once "Š" comes after "S". Does "Č" come before "C"?

  It depends :)   See table 1 at http://www.unicode.org/reports/tr10/

Currently collator is retrieved by locale in the request, or forced from schooltool.conf (or in case of multiple languages in .conf, the setting selected in web UI by every user IIRC). The result is that people who browse the gradebook in spanish will have *different person order* than those browsing in english.

A better implementation is to add a setting of preferred collator to use when sorting *names*. Check out key/type pairs in http://www-01.ibm.com/software/globalization/topics/xml_rep/language.jsp ; also locales like German Phonebook Order or Hindi Direct Order at http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fnls%2Frbagsicusortsequencetables.htm .

Users should be able to specify the default language of person names, in .conf or maybe in manage->site preferences:
lang de
person_name_lang de@collation=phonebook

If person_name_lang is not configured, it may be reasonable to use server's locale (as opposed to browser's locale for lang).

Of course, even that is not enough to sort person names correctly, but that's a start. Somewhat related: https://blueprints.launchpad.net/schooltool/+spec/personal-name-schemas

Cheers,
Justas



References