From 1eb1094b1fa6947beb97815e3c5c7986751ac637 Mon Sep 17 00:00:00 2001 From: dazedanon Date: Wed, 18 Mar 2026 00:33:32 -0500 Subject: [PATCH] fix translateAI function in multiple modules --- modules/lune.py | 2 +- modules/nscript.py | 2 +- modules/regex.py | 2 +- modules/rpgmakerace.py | 2 +- modules/rpgmakerplugin.py | 2 +- modules/srpg.py | 6 +++--- modules/text.py | 2 +- modules/tyrano.py | 2 +- modules/unity.py | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/lune.py b/modules/lune.py index 9c41ebf..377b173 100644 --- a/modules/lune.py +++ b/modules/lune.py @@ -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. diff --git a/modules/nscript.py b/modules/nscript.py index 114a45b..f6eecaf 100644 --- a/modules/nscript.py +++ b/modules/nscript.py @@ -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. diff --git a/modules/regex.py b/modules/regex.py index fadc059..b4e69ae 100644 --- a/modules/regex.py +++ b/modules/regex.py @@ -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. diff --git a/modules/rpgmakerace.py b/modules/rpgmakerace.py index 73ce3cc..d35f163 100644 --- a/modules/rpgmakerace.py +++ b/modules/rpgmakerace.py @@ -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. diff --git a/modules/rpgmakerplugin.py b/modules/rpgmakerplugin.py index dd18b88..161a719 100644 --- a/modules/rpgmakerplugin.py +++ b/modules/rpgmakerplugin.py @@ -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. diff --git a/modules/srpg.py b/modules/srpg.py index c22f4cf..9568574 100644 --- a/modules/srpg.py +++ b/modules/srpg.py @@ -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 ) diff --git a/modules/text.py b/modules/text.py index acda26c..d257d64 100644 --- a/modules/text.py +++ b/modules/text.py @@ -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. diff --git a/modules/tyrano.py b/modules/tyrano.py index 79149d0..733e312 100644 --- a/modules/tyrano.py +++ b/modules/tyrano.py @@ -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. diff --git a/modules/unity.py b/modules/unity.py index d19350c..d1c2f11 100644 --- a/modules/unity.py +++ b/modules/unity.py @@ -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.