Replace locale.strcoll with locale.strxfmt for performance and Python 3.0 compliance

svn: r12739
This commit is contained in:
Gerald Britton
2009-06-30 14:05:57 +00:00
parent b1dd135363
commit d022d0187b
6 changed files with 109 additions and 15 deletions

View File

@@ -57,8 +57,8 @@ import gen.lib
#------------------------------------------------------------------------
def _get_sort_functions(sort):
return [
(_("Birth Date"),sort.by_birthdate),
(_("Name"),sort.by_last_name),
(_("Birth Date"),sort.by_birthdate_key),
(_("Name"),sort.by_last_name_key),
]
#------------------------------------------------------------------------
@@ -134,7 +134,7 @@ class TimeLine(Report):
length = len(self.plist)
self.progress.set_pass(_('Sorting dates...'), 1)
self.plist.sort(self.sort_func)
self.plist.sort(key=self.sort_func)
self.progress.set_pass(_('Calculating timeline...'), len(self.plist))
for p_id in self.plist: