fix translateAI function in multiple modules

This commit is contained in:
dazedanon 2026-03-18 00:33:32 -05:00
parent e75705435b
commit 1eb1094b1f
9 changed files with 11 additions and 11 deletions

View file

@ -350,7 +350,7 @@ def getSpeaker(speaker):
return response
return [speaker, [0, 0]]
def translateAI(text, history):
def translateAI(text, history, history_ctx=None):
"""
Legacy wrapper function for the new shared translation utility.
This maintains compatibility with existing code while using the new shared implementation.

View file

@ -410,7 +410,7 @@ def getSpeaker(speaker):
return [speaker, [0, 0]]
def translateAI(text, history):
def translateAI(text, history, history_ctx=None):
"""
Translate text using the shared translation utility.
This function maintains compatibility with existing code while using the new shared implementation.

View file

@ -506,7 +506,7 @@ def getSpeaker(speaker):
return response
return [speaker, [0, 0]]
def translateAI(text, history):
def translateAI(text, history, history_ctx=None):
"""
Legacy wrapper function for the new shared translation utility.
This maintains compatibility with existing code while using the new shared implementation.

View file

@ -3683,7 +3683,7 @@ def getSpeaker(speaker: str):
NAMESLIST.append([speaker, translated])
return [translated, response[1]]
def translateAI(text, history):
def translateAI(text, history, history_ctx=None):
"""
Legacy wrapper function for the new shared translation utility.
This maintains compatibility with existing code while using the new shared implementation.

View file

@ -1113,7 +1113,7 @@ def getSpeaker(speaker):
return response
return [speaker, [0, 0]]
def translateAI(text, history):
def translateAI(text, history, history_ctx=None):
"""
Legacy wrapper function for the new shared translation utility.
This maintains compatibility with existing code while using the new shared implementation.

View file

@ -2231,7 +2231,7 @@ def getSpeaker(speaker):
return response
def translateAI(text, history):
def translateAI(text, history, history_ctx=None, filename=None, pbar=None):
"""
Legacy wrapper function for the new shared translation utility.
This maintains compatibility with existing code while using the new shared implementation.
@ -2253,8 +2253,8 @@ def translateAI(text, history):
text=text,
history=history,
config=TRANSLATION_CONFIG,
filename=FILENAME,
pbar=PBAR,
filename=filename if filename is not None else FILENAME,
pbar=pbar if pbar is not None else PBAR,
lock=LOCK,
mismatchList=MISMATCH
)

View file

@ -341,7 +341,7 @@ def getSpeaker(speaker):
return response
return [speaker, [0, 0]]
def translateAI(text, history):
def translateAI(text, history, history_ctx=None):
"""
Legacy wrapper function for the new shared translation utility.
This maintains compatibility with existing code while using the new shared implementation.

View file

@ -435,7 +435,7 @@ def getSpeaker(speaker):
return response
return [speaker, [0, 0]]
def translateAI(text, history):
def translateAI(text, history, history_ctx=None):
"""
Legacy wrapper function for the new shared translation utility.
This maintains compatibility with existing code while using the new shared implementation.

View file

@ -331,7 +331,7 @@ def getSpeaker(speaker):
return response
return [speaker, [0, 0]]
def translateAI(text, history):
def translateAI(text, history, history_ctx=None):
"""
Legacy wrapper function for the new shared translation utility.
This maintains compatibility with existing code while using the new shared implementation.