[PATCH] Match langs with stripped accents when filtering languages
Vratislav Podzimek
vpodzime at redhat.com
Thu Aug 15 11:13:56 UTC 2013
This e.g. allows to search for "Čeština" by typing "cest" in the filtering
entry which was a common user behaviour appearing in the usability testing.
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
pyanaconda/ui/gui/spokes/welcome.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/welcome.py b/pyanaconda/ui/gui/spokes/welcome.py
index db3b6a2..f2316b6 100644
--- a/pyanaconda/ui/gui/spokes/welcome.py
+++ b/pyanaconda/ui/gui/spokes/welcome.py
@@ -35,7 +35,7 @@ from pyanaconda import timezone
from pyanaconda import flags
from pyanaconda import geoloc
from pyanaconda.i18n import _, N_
-from pyanaconda.iutil import is_unsupported_hw
+from pyanaconda.iutil import is_unsupported_hw, strip_accents
import logging
log = logging.getLogger("anaconda")
@@ -258,7 +258,8 @@ class WelcomeLanguageSpoke(StandaloneSpoke):
# Otherwise, filter the list showing only what is matched by the
# text entry. Either the English or native names can match.
lowered = entry.lower()
- if lowered in native.lower() or lowered in english.lower():
+ translit = strip_accents(unicode(native, "utf-8")).lower()
+ if lowered in native.lower() or lowered in english.lower() or lowered in translit:
return True
else:
return False
--
1.7.11.7
More information about the anaconda-patches
mailing list