Skip to content

Commit

Permalink
Will start translation on settings dialog close (#1025)
Browse files Browse the repository at this point in the history
  • Loading branch information
raivisdejus authored Dec 15, 2024
1 parent 4e46e41 commit a1a81c1
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,16 @@ def on_translate_button_clicked(self):
return

if self.transcription_options.llm_model == "" or self.transcription_options.llm_prompt == "":
self.transcription_options_dialog.accepted.connect(self.run_translation)
self.transcription_options_dialog.show()
return

self.run_translation()

def run_translation(self):
if self.transcription_options.llm_model == "" or self.transcription_options.llm_prompt == "":
return

segments = self.table_widget.segments()
for segment in segments:
self.translator.enqueue(segment.value("text"), segment.value("id"))
Expand Down

0 comments on commit a1a81c1

Please sign in to comment.