config: language_short_hand -> language_code
This commit is contained in:
@@ -59,7 +59,7 @@ def _load_default_config():
|
||||
def _set_testing_defaults(config):
|
||||
'''Default values used when skipping pages during testing.'''
|
||||
config["language"] = 'English for Dummies'
|
||||
config["language_short_hand"] = 'en_US'
|
||||
config["language_code"] = 'en_US'
|
||||
config["locale"] = 'en_US.UTF-8'
|
||||
config["disk_device_path"] = '/dev/null'
|
||||
config["disk_is_partition"] = False
|
||||
|
||||
@@ -107,7 +107,7 @@ class KeyboardLayoutPage(Gtk.Box, Page):
|
||||
def load_once(self):
|
||||
# page gets reconstructed if different app language is chosen
|
||||
self.default_language = global_state.get_config('language')
|
||||
self.default_language_code = global_state.get_config('language_short_hand')
|
||||
self.default_language_code = global_state.get_config('language_code')
|
||||
keyboard_info = get_default_layout(self.default_language_code)
|
||||
self._load_overview(keyboard_info)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class SoftwarePage(Gtk.Box, Page):
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
Gtk.Box.__init__(self, **kwargs)
|
||||
language_code = global_state.get_config('language_short_hand')
|
||||
language_code = global_state.get_config('language_code')
|
||||
self.software_list.bind_model(
|
||||
self.software_model, lambda o: SoftwareRow(o.package, language_code))
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ def set_system_keyboard_layout(keyboard_layout, short_hand):
|
||||
|
||||
def set_system_language(language_info):
|
||||
global_state.set_config('language', language_info.name)
|
||||
global_state.set_config('language_short_hand', language_info.language_code)
|
||||
global_state.set_config('language_code', language_info.language_code)
|
||||
locale = Locale.normalize(language_info.locale)
|
||||
global_state.set_config('locale', locale)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user