View Single Post
Old 10-16-2011, 11:49 AM   #28
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Noughty View Post
Thanks for the comments with them I managed to make edit easily. Now just to figure out how to sort the list
That is easy (if you know how ). Replace the "return ..." line with the following two lines.
Code:
	from calibre.utils.icu import sort_key
	return ', '.join(sorted(res, key=sort_key))
This sorts the list in order respecting the current language rules, then converts it to a string.
chaley is offline   Reply With Quote