Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 def switch_language(self, code):
     self.selected_language = code
     i18n.switch_language(code)
Exemplo n.º 4
0
 def switch_language(self, code):
     self.selected_language = code
     self.signal.emit_signal('l10n:language-selected', code)
     i18n.switch_language(code)
Exemplo n.º 5
0
 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))
Exemplo n.º 6
0
 def done(self, code):
     log.debug("WelcomeController.done %s next_screen", code)
     i18n.switch_language(code)
     self.app.next_screen(self.endpoint.POST(code))