Fix bug with single strings

This commit is contained in:
DazedAnon 2025-01-07 11:56:08 -06:00
parent 397bdab7f7
commit 0b09fdb14d
13 changed files with 76 additions and 40 deletions

View file

@ -621,9 +621,12 @@ def translateGPT(text, history, fullPromptFlag):
if not re.search(LANGREGEX, str(tItem)):
if PBAR is not None:
PBAR.update(len(tItem))
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
if isinstance(tItem, list):
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
else:
tList[index] = cleanTranslatedText(tItem)
history = tItem[-MAXHISTORY:]
continue

View file

@ -490,9 +490,12 @@ def translateGPT(text, history, fullPromptFlag):
if not re.search(LANGREGEX, str(tItem)):
if PBAR is not None:
PBAR.update(len(tItem))
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
if isinstance(tItem, list):
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
else:
tList[index] = cleanTranslatedText(tItem)
history = tItem[-MAXHISTORY:]
continue

View file

@ -534,9 +534,12 @@ def translateGPT(text, history, fullPromptFlag):
if not re.search(LANGREGEX, str(tItem)):
if PBAR is not None:
PBAR.update(len(tItem))
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
if isinstance(tItem, list):
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
else:
tList[index] = cleanTranslatedText(tItem)
history = tItem[-MAXHISTORY:]
continue

View file

@ -549,9 +549,12 @@ def translateGPT(text, history, fullPromptFlag):
if not re.search(LANGREGEX, str(tItem)):
if PBAR is not None:
PBAR.update(len(tItem))
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
if isinstance(tItem, list):
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
else:
tList[index] = cleanTranslatedText(tItem)
history = tItem[-MAXHISTORY:]
continue

View file

@ -473,9 +473,12 @@ def translateGPT(text, history, fullPromptFlag):
if not re.search(LANGREGEX, str(tItem)):
if PBAR is not None:
PBAR.update(len(tItem))
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
if isinstance(tItem, list):
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
else:
tList[index] = cleanTranslatedText(tItem)
history = tItem[-MAXHISTORY:]
continue

View file

@ -2556,9 +2556,12 @@ def translateGPT(text, history, fullPromptFlag):
if not re.search(LANGREGEX, str(tItem)):
if PBAR is not None:
PBAR.update(len(tItem))
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
if isinstance(tItem, list):
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
else:
tList[index] = cleanTranslatedText(tItem)
history = tItem[-MAXHISTORY:]
continue

View file

@ -2556,9 +2556,12 @@ def translateGPT(text, history, fullPromptFlag):
if not re.search(LANGREGEX, str(tItem)):
if PBAR is not None:
PBAR.update(len(tItem))
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
if isinstance(tItem, list):
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
else:
tList[index] = cleanTranslatedText(tItem)
history = tItem[-MAXHISTORY:]
continue

View file

@ -685,9 +685,12 @@ def translateGPT(text, history, fullPromptFlag):
if not re.search(LANGREGEX, str(tItem)):
if PBAR is not None:
PBAR.update(len(tItem))
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
if isinstance(tItem, list):
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
else:
tList[index] = cleanTranslatedText(tItem)
history = tItem[-MAXHISTORY:]
continue

View file

@ -462,9 +462,12 @@ def translateGPT(text, history, fullPromptFlag):
if not re.search(LANGREGEX, str(tItem)):
if PBAR is not None:
PBAR.update(len(tItem))
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
if isinstance(tItem, list):
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
else:
tList[index] = cleanTranslatedText(tItem)
history = tItem[-MAXHISTORY:]
continue

View file

@ -536,9 +536,12 @@ def translateGPT(text, history, fullPromptFlag):
if not re.search(LANGREGEX, str(tItem)):
if PBAR is not None:
PBAR.update(len(tItem))
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
if isinstance(tItem, list):
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
else:
tList[index] = cleanTranslatedText(tItem)
history = tItem[-MAXHISTORY:]
continue

View file

@ -2338,9 +2338,12 @@ def translateGPT(text, history, fullPromptFlag):
if not re.search(LANGREGEX, str(tItem)):
if PBAR is not None:
PBAR.update(len(tItem))
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
if isinstance(tItem, list):
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
else:
tList[index] = cleanTranslatedText(tItem)
history = tItem[-MAXHISTORY:]
continue

View file

@ -501,9 +501,12 @@ def translateGPT(text, history, fullPromptFlag):
if not re.search(LANGREGEX, str(tItem)):
if PBAR is not None:
PBAR.update(len(tItem))
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
if isinstance(tItem, list):
for j in range(len(tItem)):
tItem[j] = cleanTranslatedText(tItem[j])
tList[index] = tItem
else:
tList[index] = cleanTranslatedText(tItem)
history = tItem[-MAXHISTORY:]
continue

View file

@ -1,10 +1,10 @@
Here are some vocabulary and terms so that you know the proper spelling and translation.
```
# Game Characters
サーシャ (Sasha) - Female
エリシア (Elicia) - Female
のアイラ (Aira) - Female
ロイ (Roy) - Male
メルメイア (Mermeia) - Female
レイリ (Reiri) - Female
スズリカ (Suzurika) - Female
ヘーゼル (Hazel) - Female
# Lewd Terms
マンコ (pussy)