[PATCH 2/3] Hook the Geolocation module to Anaconda
Chris Lumens
clumens at redhat.com
Wed Apr 17 15:46:37 UTC 2013
> @@ -137,12 +148,22 @@ class LanguageMixIn(object):
> self._selection = self.builder.get_object(self._selectionName)
> self._view = self.builder.get_object(self._viewName)
>
> - # TODO We can use the territory from geoip here
> + # We can use the territory from geolocation here
> # to preselect the translation, when it's available.
> - # Until then, use None.
> - territory = None
> + territory = geoloc.get_territory_code()
> self.language = Language(LOCALE_PREFERENCES, territory=territory)
> -
> + # check if there is one and only one locale for the territory
> + if len(self.language.preferred_locales) != 1:
> + log.info(_("Didn't get a single locale from Geolocation,"
> + " falling back to default locale."))
You missed a translated log message here.
- Chris
More information about the anaconda-patches
mailing list