From d4c1d16f284946cdf12383436b1ce25b2415abae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Thu, 17 Mar 2011 16:31:57 +0000 Subject: [PATCH] 4423: Web report does not handle Czech 'CH' character properly (contribution by phejl) svn: r16844 --- src/plugins/webreport/NarrativeWeb.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index 73c2092eb..39226475a 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -6870,6 +6870,17 @@ def first_letter(string): (lang_country, modifier ) = locale.getlocale() if lang_country == "sv_SE" and (letter == u'W' or letter == u'V'): letter = u'V,W' + # See : http://www.gramps-project.org/bugs/view.php?id = 4423 + elif (lang_country == "cs_CZ" or lang_country == "sk_SK") and letter == u'C' and len(string) > 1: + second_letter = normalize('NFKC', unicode(string))[1].upper() + if second_letter == u'H': + letter += u'h' + elif lang_country == "sk_SK" and letter == u'D' and len(string) > 1: + second_letter = normalize('NFKC', unicode(string))[1].upper() + if second_letter == u'Z': + letter += u'z' + elif second_letter == u'Ž': + letter += u'ž' return letter def get_first_letters(db, menu_set, key):