LocaleController.start() check model language
- This is just a preparation for a feature which affects system_setup. - The proposed change enables locale controller to respect the model selected_language if initialized before LocaleController.start(). - This will be used in the feature which will allow prefilling installation UI screens during WSL installation with information acquired from Windows environment.
This commit is contained in:
parent
8b996f9ba5
commit
9f52bd92bf
|
@ -36,8 +36,10 @@ class LocaleController(SubiquityController):
|
|||
os.environ["LANG"] = data
|
||||
|
||||
def start(self):
|
||||
self.model.selected_language = os.environ.get("LANG") \
|
||||
or self.autoinstall_default
|
||||
# Language may have been initialized before start() is called.
|
||||
if self.model.selected_language == None:
|
||||
self.model.selected_language = os.environ.get("LANG") \
|
||||
or self.autoinstall_default
|
||||
self.app.aio_loop.create_task(self.configured())
|
||||
self.app.hub.subscribe(
|
||||
(InstallerChannels.CONFIGURED, 'source'), self._set_source)
|
||||
|
|
Loading…
Reference in New Issue