Fix bug with 356
This commit is contained in:
parent
6089acb1b9
commit
e2af90ec60
2 changed files with 12 additions and 13 deletions
|
|
@ -132,7 +132,6 @@ def getResultString(translatedData, translationTime, filename):
|
||||||
def parseCSV(readFile, writeFile, filename):
|
def parseCSV(readFile, writeFile, filename):
|
||||||
totalTokens = [0,0]
|
totalTokens = [0,0]
|
||||||
totalLines = 0
|
totalLines = 0
|
||||||
textHistory = []
|
|
||||||
global LOCK
|
global LOCK
|
||||||
|
|
||||||
format = ''
|
format = ''
|
||||||
|
|
@ -643,10 +642,10 @@ def translateGPT(text, history, fullPromptFlag):
|
||||||
subbedT = varResponse[0]
|
subbedT = varResponse[0]
|
||||||
|
|
||||||
# Things to Check before starting translation (Comment if not translating from Japanese)
|
# Things to Check before starting translation (Comment if not translating from Japanese)
|
||||||
if not re.search(r'[一-龠ぁ-ゔァ-ヴーa-zA-Z0-9]+', subbedT):
|
# if not re.search(r'[一-龠ぁ-ゔァ-ヴーa-zA-Z0-9]+', subbedT):
|
||||||
if PBAR is not None:
|
# if PBAR is not None:
|
||||||
PBAR.update(len(tItem))
|
# PBAR.update(len(tItem))
|
||||||
continue
|
# continue
|
||||||
|
|
||||||
# Create Message
|
# Create Message
|
||||||
characters, system, user = createContext(fullPromptFlag, subbedT)
|
characters, system, user = createContext(fullPromptFlag, subbedT)
|
||||||
|
|
|
||||||
|
|
@ -58,24 +58,24 @@ POSITION = 0
|
||||||
LEAVE = False
|
LEAVE = False
|
||||||
|
|
||||||
# Dialogue / Scroll
|
# Dialogue / Scroll
|
||||||
CODE401 = True
|
CODE401 = False
|
||||||
CODE405 = False
|
CODE405 = False
|
||||||
CODE408 = False
|
CODE408 = False
|
||||||
|
|
||||||
# Choices
|
# Choices
|
||||||
CODE102 = True
|
CODE102 = False
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
CODE122 = False
|
CODE122 = False
|
||||||
|
|
||||||
# Names
|
# Names
|
||||||
CODE101 = True
|
CODE101 = False
|
||||||
|
|
||||||
# Other
|
# Other
|
||||||
CODE355655 = False
|
CODE355655 = False
|
||||||
CODE357 = False
|
CODE357 = False
|
||||||
CODE657 = False
|
CODE657 = False
|
||||||
CODE356 = False
|
CODE356 = True
|
||||||
CODE320 = False
|
CODE320 = False
|
||||||
CODE324 = False
|
CODE324 = False
|
||||||
CODE111 = False
|
CODE111 = False
|
||||||
|
|
@ -1418,11 +1418,11 @@ def searchCodes(page, pbar, jobList, filename):
|
||||||
# Want to translate this script
|
# Want to translate this script
|
||||||
if 'D_TEXT ' in jaString:
|
if 'D_TEXT ' in jaString:
|
||||||
regex = r'D_TEXT\s(.*?)\s.+'
|
regex = r'D_TEXT\s(.*?)\s.+'
|
||||||
elif 'ShowInfo':
|
elif 'ShowInfo' in jaString:
|
||||||
regex = r'ShowInfo\s(.*)'
|
regex = r'ShowInfo\s(.*)'
|
||||||
elif 'PushGab':
|
elif 'PushGab' in jaString:
|
||||||
regex = r'PushGab\s(.*)'
|
regex = r'PushGab\s(.*)'
|
||||||
elif 'addLog':
|
elif 'addLog' in jaString:
|
||||||
regex = r'addLog\s(.*)'
|
regex = r'addLog\s(.*)'
|
||||||
else:
|
else:
|
||||||
regex = r''
|
regex = r''
|
||||||
|
|
@ -1432,7 +1432,7 @@ def searchCodes(page, pbar, jobList, filename):
|
||||||
|
|
||||||
# Capture Arguments and text
|
# Capture Arguments and text
|
||||||
textMatch = re.search(regex, jaString)
|
textMatch = re.search(regex, jaString)
|
||||||
if textMatch != None:
|
if textMatch.group() != '':
|
||||||
text = textMatch.group(1)
|
text = textMatch.group(1)
|
||||||
|
|
||||||
# Using this to keep track of 401's in a row. Throws IndexError at EndOfList (Expected Behavior)
|
# Using this to keep track of 401's in a row. Throws IndexError at EndOfList (Expected Behavior)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue