async def make_ui(self): if not self.app.rich_mode: raise Skip() language = await self.endpoint.GET() i18n.switch_language(language) self.serial = self.app.opts.run_on_serial return WelcomeView(self, language, self.serial)
async def make_ui(self): language = await self.endpoint.GET() i18n.switch_language(language) serial = self.app.opts.run_on_serial if serial: ips = await self.app.client.network.global_addresses.GET() else: ips = None return WelcomeView(self, language, serial, ips)
def switch_language(self, code): self.selected_language = code i18n.switch_language(code)
def switch_language(self, code): self.selected_language = code self.signal.emit_signal('l10n:language-selected', code) i18n.switch_language(code)
def done(self, code): log.debug("WelcomeController.done %s next_screen", code) i18n.switch_language(code) self.signal.emit_signal('l10n:language-selected', code) self.app.next_screen(self.endpoint.POST(code))
def done(self, code): log.debug("WelcomeController.done %s next_screen", code) i18n.switch_language(code) self.app.next_screen(self.endpoint.POST(code))