diff --git a/buzz/translator.py b/buzz/translator.py index 0a16bd72..09629a76 100644 --- a/buzz/translator.py +++ b/buzz/translator.py @@ -76,7 +76,8 @@ class Translator(QObject): return completion.choices[0].message.content, transcript_id else: logging.error(f"Translation error! Server response: {completion}") - return _("Translation error, see logs!"), transcript_id + # Translation error + return "", transcript_id def _translate_batch(self, items: List[Tuple[str, int]]) -> List[Tuple[str, int]]: """Translate multiple transcripts in a single API call. @@ -109,7 +110,8 @@ class Translator(QObject): if not (completion and completion.choices and completion.choices[0].message): logging.error(f"Batch translation error! Server response: {completion}") - return [(_("Translation error, see logs!"), tid) for _, tid in items] + # Translation error + return [("", tid) for _, tid in items] response_text = completion.choices[0].message.content logging.debug(f"Received batch translation response: {response_text}") @@ -121,7 +123,8 @@ class Translator(QObject): if i < len(translations): results.append((translations[i], transcript_id)) else: - results.append((_("Translation error, see logs!"), transcript_id)) + # Translation error + results.append(("", transcript_id)) return results @staticmethod