GNOME Bugzilla – Bug 753579
The order of the language in a persons page is not intuitive
Last modified: 2015-08-15 09:15:30 UTC
The select input sorts capitalized languages before un-capitalized so French and Spanish are after Tunkish.
Created attachment 309194 [details] [review] Patch to make the order of the list of languages case insensitive in a user's page This adds a new util function lc_sorted which is a localized version of the built-in sorted function (using pyicu).
Created attachment 309195 [details] [review] Make the order of the list of languages case insensitive in a user's page This adds a new util function lc_sorted which is a localized version of the built-in sorted function (using pyicu).
Review of attachment 309195 [details] [review]: ::: common/utils.py @@ +49,3 @@ l.translated_name = _(getattr(l, tr_field)) templist = [(obj_.translated_name.lower(), obj_) for obj_ in lst] + templist = sorted(templist, key=operator.itemgetter(0)) Is it wanted to use sorted here instead of lc_sorted?
(In reply to Claude Paroz from comment #4) > Review of attachment 309195 [details] [review] [review]: > > ::: common/utils.py > @@ +49,3 @@ > l.translated_name = _(getattr(l, tr_field)) > templist = [(obj_.translated_name.lower(), obj_) for obj_ in lst] > + templist = sorted(templist, key=operator.itemgetter(0)) > > Is it wanted to use sorted here instead of lc_sorted? Hum, probably not :-/
Created attachment 309246 [details] [review] Fix language order (corrected) trans_sort_object_list is now correctly refactored to use the new function. This also adds a new dependency to the mock package, but only for the test suite (the mock package is included in the standard library in later versions of python but not yet in 2.X).
Thanks, patch slightly amended and pushed in https://git.gnome.org/browse/damned-lies/commit/?id=c1ff657e0dec62fc58cc6bb5872b7e2188908d69