From a3954ae3823ae93bb76bf369182672beb3ba37b2 Mon Sep 17 00:00:00 2001 From: David MENTRE Date: Sun, 20 Dec 2009 23:43:20 +0100 Subject: [PATCH] Partial fix for bug 27421 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Idea of Gaël: do not match French street name which is only made of a prefix. Example: "(Impasse)" => "Impasse" for "Besançon" city. --- ocitysmap/i18n.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocitysmap/i18n.py b/ocitysmap/i18n.py index f0a58d8..ae1d781 100644 --- a/ocitysmap/i18n.py +++ b/ocitysmap/i18n.py @@ -68,7 +68,7 @@ class i18n_fr_FR_UTF8(i18n): u" de", u" d'", u"" ] SPACE_REDUCE = re.compile(r"\s+") - PREFIX_REGEXP = re.compile(r"^(?P(%s)(%s)?)\s?\b(?P.*)" % + PREFIX_REGEXP = re.compile(r"^(?P(%s)(%s)?)\s?\b(?P.+)" % ("|".join(APPELLATIONS), "|".join(DETERMINANTS)), re.IGNORECASE | re.UNICODE)