MCPcopy Create free account
hub / github.com/dialect-app/dialect / show_translator_error_view

Method show_translator_error_view

dialect/window.py:423–437  ·  view source on GitHub ↗
(
        self,
        title: str = _("Failed loading the translation service"),
        description: str = _("Please report this in the Dialect bug tracker if the issue persists."),
        detail: str | None = None,
    )

Source from the content-addressed store, hash-verified

421 self.translator_loading = False
422
423 def show_translator_error_view(
424 self,
425 title: str = _("Failed loading the translation service"),
426 description: str = _("Please report this in the Dialect bug tracker if the issue persists."),
427 detail: str | None = None,
428 ):
429 if detail: # Add detail bellow description
430 if description:
431 description += "\n\n"
432 description += "<small><tt>" + detail + "</tt></small>"
433
434 self.error_page.props.title = title
435 self.error_page.props.description = description
436
437 self.main_stack.props.visible_child_name = "error"
438
439 def show_translator_api_key_view(self, required=False):
440 if not self.provider["trans"]:

Callers 1

load_translatorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected