From 4917628f9e94b2ff14019ff6d66735744cf824c5 Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Thu, 1 Sep 2016 19:05:54 -0700 Subject: [PATCH] sort custom filter names with German-umlaut chars correctly --- gramps/gen/filters/_filterlist.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gramps/gen/filters/_filterlist.py b/gramps/gen/filters/_filterlist.py index 5270b508c..34975738e 100644 --- a/gramps/gen/filters/_filterlist.py +++ b/gramps/gen/filters/_filterlist.py @@ -36,6 +36,7 @@ import collections #------------------------------------------------------------------------- from ._filterparser import FilterParser from ..plug import BasePluginManager +from ..const import GRAMPS_LOCALE as glocale PLUGMAN = BasePluginManager.get_instance() #------------------------------------------------------------------------- @@ -129,7 +130,8 @@ class FilterList: file.write(' \n' % namespace) filter_list = self.filter_namespaces[namespace] sorted_filters = sorted([(filter.get_name(), filter) - for filter in filter_list]) + for filter in filter_list], + key=lambda x: glocale.sort_key(x[0])) for (name, the_filter) in sorted_filters: # enable a diff file.write('