[PATCH] Match langs with stripped accents when filtering languages
Vratislav Podzimek
vpodzime at redhat.com
Fri Aug 16 10:10:07 UTC 2013
On Thu, 2013-08-15 at 08:58 -0400, Chris Lumens wrote:
> > 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
>
> Oh, good idea. You'll want to do the same thing in
> spokes/langsupport.py as well. Or even better, get rid of one of the
> duplicates.
Good point, thanks! I'll do the same change for the Langsupport spoke
for now and resolve it properly as part of another set of patches that
will deal with language/locale selection.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list