From da52e4cdcb19d43551c240b909e9c296e0d34847 Mon Sep 17 00:00:00 2001 From: Serge Noiraud Date: Fri, 1 May 2009 08:06:21 +0000 Subject: [PATCH] Narrativeweb : Swedish specific alphabet sort. svn: r12499 --- src/plugins/webreport/NarrativeWeb.py | 55 ++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 6 deletions(-) diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index 0c60871d3..5b1089018 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -284,6 +284,19 @@ class BasePage: sorted_set = {} + # The comment below from the glibc locale sv_SE in + # localedata/locales/sv_SE : + # + # % The letter w is normally not present in the Swedish alphabet. It + # % exists in some names in Swedish and foreign words, but is accounted + # % for as a variant of 'v'. Words and names with 'w' are in Swedish + # % ordered alphabetically among the words and names with 'v'. If two + # % words or names are only to be distinguished by 'v' or % 'w', 'v' is + # % placed before 'w'. + # + # See : http://www.gramps-project.org/bugs/view.php?id=2933 + # + (lang_country, modifier ) = locale.getlocale() for ltr in get_first_letters(db, handle_list, key): try: sorted_set[ltr] += 1 @@ -298,7 +311,10 @@ class BasePage: of.write('\t\n') else: @@ -309,8 +325,11 @@ class BasePage: of.write('\t\t