def apply(self): (store, itr) = self._localeSelection.get_selected() locale = store[itr][1] localization.setup_locale(locale, self.data.lang) # Skip timezone and keyboard default setting for kickstart installs. # The user may have provided these values via kickstart and if not, we # need to prompt for them. if flags.flags.automatedInstall: return geoloc_timezone = geoloc.get_timezone() loc_timezones = localization.get_locale_timezones(self.data.lang.lang) if geoloc_timezone: # (the geolocation module makes sure that the returned timezone is # either a valid timezone or None) self.data.timezone.timezone = geoloc_timezone elif loc_timezones and not self.data.timezone.timezone: # no data is provided by Geolocation, try to get timezone from the # current language self.data.timezone.timezone = loc_timezones[0] # setup Gtk direction (RTL/LTR) now that we have the language # configuration applied setup_gtk_direction() self._set_keyboard_defaults(self.data.lang.lang)
def apply(self): (store, itr) = self._localeSelection.get_selected() locale = store[itr][1] localization.setup_locale(locale, self.data.lang) # Skip timezone and keyboard default setting for kickstart installs. # The user may have provided these values via kickstart and if not, we # need to prompt for them. if flags.flags.automatedInstall: return geoloc_timezone = geoloc.get_timezone() loc_timezones = localization.get_locale_timezones(self.data.lang.lang) if geoloc_timezone: # (the geolocation module makes sure that the returned timezone is # either a valid timezone or None) self.data.timezone.timezone = geoloc_timezone elif loc_timezones and not self.data.timezone.timezone: # no data is provided by Geolocation, try to get timezone from the # current language self.data.timezone.timezone = loc_timezones[0] # setup Gtk direction (RTL/LTR) now that we have the language # configuration applied setup_gtk_direction() self._set_keyboard_defaults(self.data.lang.lang)
def on_locale_selection_changed(self, selection): (store, selected) = selection.get_selected_rows() if hasattr(self.window, "set_may_continue"): self.window.set_may_continue(len(selected) > 0) if selected: lang = store[selected[0]][1] lang = localization.setup_locale(lang) self._set_lang(lang) self.retranslate() # Reset the text direction setup_gtk_direction() # Redraw the window to reset the sidebar to where it needs to be self.window.queue_draw()
def on_locale_selection_changed(self, selection): (store, selected) = selection.get_selected_rows() if hasattr(self.window, "set_may_continue"): self.window.set_may_continue(len(selected) > 0) if selected: lang = store[selected[0]][1] self._set_lang(lang) localization.setup_locale(lang) self.retranslate() # Reset the text direction setup_gtk_direction() # Redraw the window to reset the sidebar to where it needs to be self.window.queue_draw()