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

Method queue_selection_translation

dialect/window.py:544–550  ·  view source on GitHub ↗

Call `translate_selection` or queue it until the window is focused

(self, src_lang: str | None, dest_lang: str | None)

Source from the content-addressed store, hash-verified

542 self.send_notification(_("Couldn’t read selection clip board!"))
543
544 def queue_selection_translation(self, src_lang: str | None, dest_lang: str | None):
545 """Call `translate_selection` or queue it until the window is focused"""
546 if self.props.is_active:
547 self.translate_selection(src_lang, dest_lang)
548 else:
549 self.selection_translation_queued = True
550 self.selection_translation_langs = (src_lang, dest_lang)
551
552 def save_settings(self, *args, **kwargs):
553 if not self.is_maximized():

Callers 1

process_command_lineMethod · 0.80

Calls 1

translate_selectionMethod · 0.95

Tested by

no test coverage detected