From e2af90ec609dcf57622bf7625a4669e7bbd05b86 Mon Sep 17 00:00:00 2001 From: DazedAnon Date: Wed, 17 Jul 2024 12:48:51 -0500 Subject: [PATCH] Fix bug with 356 --- modules/csv.py | 9 ++++----- modules/rpgmakermvmz.py | 16 ++++++++-------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/modules/csv.py b/modules/csv.py index ef9117e..7d2464f 100644 --- a/modules/csv.py +++ b/modules/csv.py @@ -132,7 +132,6 @@ def getResultString(translatedData, translationTime, filename): def parseCSV(readFile, writeFile, filename): totalTokens = [0,0] totalLines = 0 - textHistory = [] global LOCK format = '' @@ -643,10 +642,10 @@ def translateGPT(text, history, fullPromptFlag): subbedT = varResponse[0] # Things to Check before starting translation (Comment if not translating from Japanese) - if not re.search(r'[一-龠ぁ-ゔァ-ヴーa-zA-Z0-9]+', subbedT): - if PBAR is not None: - PBAR.update(len(tItem)) - continue + # if not re.search(r'[一-龠ぁ-ゔァ-ヴーa-zA-Z0-9]+', subbedT): + # if PBAR is not None: + # PBAR.update(len(tItem)) + # continue # Create Message characters, system, user = createContext(fullPromptFlag, subbedT) diff --git a/modules/rpgmakermvmz.py b/modules/rpgmakermvmz.py index b813f5f..ae6520b 100644 --- a/modules/rpgmakermvmz.py +++ b/modules/rpgmakermvmz.py @@ -58,24 +58,24 @@ POSITION = 0 LEAVE = False # Dialogue / Scroll -CODE401 = True +CODE401 = False CODE405 = False CODE408 = False # Choices -CODE102 = True +CODE102 = False # Variables CODE122 = False # Names -CODE101 = True +CODE101 = False # Other CODE355655 = False CODE357 = False CODE657 = False -CODE356 = False +CODE356 = True CODE320 = False CODE324 = False CODE111 = False @@ -1418,11 +1418,11 @@ def searchCodes(page, pbar, jobList, filename): # Want to translate this script if 'D_TEXT ' in jaString: regex = r'D_TEXT\s(.*?)\s.+' - elif 'ShowInfo': + elif 'ShowInfo' in jaString: regex = r'ShowInfo\s(.*)' - elif 'PushGab': + elif 'PushGab' in jaString: regex = r'PushGab\s(.*)' - elif 'addLog': + elif 'addLog' in jaString: regex = r'addLog\s(.*)' else: regex = r'' @@ -1432,7 +1432,7 @@ def searchCodes(page, pbar, jobList, filename): # Capture Arguments and text textMatch = re.search(regex, jaString) - if textMatch != None: + if textMatch.group() != '': text = textMatch.group(1) # Using this to keep track of 401's in a row. Throws IndexError at EndOfList (Expected Behavior)