Wolf changes yaaaay
This commit is contained in:
parent
428541391f
commit
4cd070ab44
3 changed files with 206 additions and 276 deletions
316
modules/wolf.py
316
modules/wolf.py
|
|
@ -81,17 +81,17 @@ PBAR = None
|
|||
FILENAME = None
|
||||
|
||||
# Dialogue / Choices
|
||||
CODE101 = False
|
||||
CODE101 = True
|
||||
CODE102 = False
|
||||
|
||||
# Set String (Fragile but necessary)
|
||||
CODE122 = False
|
||||
CODE150 = True
|
||||
CODE150 = False
|
||||
|
||||
# Other
|
||||
CODE210 = False
|
||||
CODE300 = False
|
||||
CODE250 = False
|
||||
CODE250 = True
|
||||
|
||||
# Database
|
||||
SCENARIOFLAG = False
|
||||
|
|
@ -102,7 +102,7 @@ DBVALUEFLAG = False
|
|||
ITEMFLAG = False
|
||||
STATEFLAG = False
|
||||
ENEMYFLAG = False
|
||||
ARMORFLAG = False
|
||||
ARMORFLAG = True
|
||||
WEAPONFLAG = False
|
||||
SKILLFLAG = False
|
||||
|
||||
|
|
@ -265,13 +265,15 @@ def searchCodes(events, pbar, jobList, filename):
|
|||
stringList = jobList[0]
|
||||
list210 = jobList[1]
|
||||
list300 = jobList[2]
|
||||
list150TL = jobList[3] # Add this line
|
||||
list150 = jobList[3]
|
||||
list250 = jobList[4]
|
||||
setData = True
|
||||
else:
|
||||
stringList = []
|
||||
list210 = []
|
||||
list300 = []
|
||||
list150TL = [] # Add this line
|
||||
list150 = []
|
||||
list250 = []
|
||||
setData = False
|
||||
|
||||
# Other
|
||||
|
|
@ -302,7 +304,7 @@ def searchCodes(events, pbar, jobList, filename):
|
|||
while i < len(codeList):
|
||||
### Event Code: 101 Message
|
||||
if codeList[i]["code"] == 101 and CODE101 == True:
|
||||
speakerRegex = r"^(.+?)\n" # Default: r"@\d+\r?\n(.*):\r?\n"
|
||||
speakerRegex = r"^(.+?):\n" # Default: r"@\d+\r?\n(.*):\r?\n"
|
||||
textRegex = r"@?\d*\r?\n?\u3000*([\w\W]+)\r?\n?" # Default: r"@?\d*\r?\n?\u3000*([\w\W]+)\r?\n?"
|
||||
|
||||
# Grab String
|
||||
|
|
@ -540,11 +542,11 @@ def searchCodes(events, pbar, jobList, filename):
|
|||
):
|
||||
# Pass 1 (Save Text to List)
|
||||
if not setData:
|
||||
list150TL.append(jaString)
|
||||
list150.append(jaString)
|
||||
|
||||
# Pass 2 (Set Text)
|
||||
else:
|
||||
translatedText = list150TL[0]
|
||||
translatedText = list150[0]
|
||||
|
||||
# Textwrap
|
||||
# translatedText = textwrap.fill(translatedText, WIDTH)
|
||||
|
|
@ -553,14 +555,14 @@ def searchCodes(events, pbar, jobList, filename):
|
|||
codeList[i]["stringArgs"][0] = re.sub(r'\\f\[(\d+)\]', lambda x: f'\\f[{int(x.group(1))-2}]', translatedText)
|
||||
|
||||
# Pop processed item
|
||||
list150TL.pop(0)
|
||||
list150.pop(0)
|
||||
|
||||
### Event Code: 300 Common Events
|
||||
if codeList[i]["code"] == 300 and CODE300 == True and "stringArgs" in codeList[i] and len(codeList[i]["stringArgs"]) > 1:
|
||||
# Choices
|
||||
if codeList[i]["stringArgs"][0] == "[共]汎用ウィンドウ生成" or codeList[i]["stringArgs"][0] == "[共]選択生成":
|
||||
if codeList[i]["stringArgs"][0] == "[共]汎用ウィンドウ生成" or codeList[i]["stringArgs"][0] == "選択肢/確認":
|
||||
# Grab String
|
||||
choiceList = codeList[i]["stringArgs"][1].split("\r\n")
|
||||
choiceList = codeList[i]["stringArgs"][1].split(",")
|
||||
|
||||
# # Translate Question
|
||||
# question = codeList[i]['stringArgs'][2]
|
||||
|
|
@ -573,7 +575,10 @@ def searchCodes(events, pbar, jobList, filename):
|
|||
# codeList[i]['stringArgs'][2] = translatedText
|
||||
|
||||
# Translate Choices
|
||||
response = translateGPT(choiceList, translatedText, True)
|
||||
if 'jaString' in locals() and jaString:
|
||||
response = translateGPT(choiceList, jaString, True)
|
||||
else:
|
||||
response = translateGPT(choiceList, f"Reply with the {LANGUAGE} translation of the dialogue choice", True)
|
||||
choiceListTL = response[0]
|
||||
totalTokens[0] += response[1][0]
|
||||
totalTokens[1] += response[1][1]
|
||||
|
|
@ -583,7 +588,7 @@ def searchCodes(events, pbar, jobList, filename):
|
|||
choiceListTL[j] = choiceListTL[j].replace(", ", "、")
|
||||
|
||||
# Convert to String and Set
|
||||
translatedText = "\r\n".join(choiceListTL)
|
||||
translatedText = ",".join(choiceListTL)
|
||||
codeList[i]["stringArgs"][1] = translatedText
|
||||
|
||||
# Dialogue
|
||||
|
|
@ -670,44 +675,43 @@ def searchCodes(events, pbar, jobList, filename):
|
|||
|
||||
### Event Code: 250 DB Read/Writes
|
||||
if codeList[i]["code"] == 250 and CODE250 == True:
|
||||
foundTerm = False
|
||||
|
||||
# Validate size
|
||||
if len(codeList[i]["stringArgs"]) == 4:
|
||||
if codeList[i]["stringArgs"][1] == "┣所持アイテム個数" and codeList[i]["stringArgs"][2] != "":
|
||||
if codeList[i]["stringArgs"][1] == "万能ウィンドウ一時DB" and codeList[i]["stringArgs"][0] != "":
|
||||
# Font Size
|
||||
fontSize = 18
|
||||
|
||||
# Grab String
|
||||
jaString = codeList[i]["stringArgs"][2]
|
||||
jaString = codeList[i]["stringArgs"][0]
|
||||
|
||||
# Catch Vars that may break the TL
|
||||
varString = ""
|
||||
matchList = re.findall(r"^[\\_]+[\w]+\[[a-zA-Z0-9\\\[\]\_,\s-]+\]", jaString)
|
||||
if len(matchList) != 0:
|
||||
varString = matchList[0]
|
||||
jaString = jaString.replace(matchList[0], "")
|
||||
# Remove Textwrap
|
||||
# jaString = jaString.replace("\r", "")
|
||||
# jaString = jaString.replace("\n", " ")
|
||||
|
||||
# Check if term already translated
|
||||
for j in range(len(TERMSLIST)):
|
||||
if jaString == TERMSLIST[j][0]:
|
||||
translatedText = TERMSLIST[j][1]
|
||||
foundTerm = True
|
||||
# Pass 1 (Save Text to List)
|
||||
if not setData:
|
||||
list250.append(jaString)
|
||||
|
||||
# Translate
|
||||
if foundTerm == False:
|
||||
response = translateGPT(
|
||||
jaString,
|
||||
f"Reply with the {LANGUAGE} translation of the text.",
|
||||
True,
|
||||
)
|
||||
translatedText = response[0]
|
||||
totalTokens[0] += response[1][0]
|
||||
totalTokens[1] += response[1][1]
|
||||
TERMSLIST.append([jaString, translatedText])
|
||||
# Pass 2 (Set Text)
|
||||
else:
|
||||
translatedText = list250[0]
|
||||
list250.pop(0)
|
||||
|
||||
# Add back Potential Variables in String
|
||||
translatedText = varString + translatedText
|
||||
# Textwrap
|
||||
# translatedText = textwrap.fill(translatedText, WIDTH)
|
||||
|
||||
# Set Data
|
||||
codeList[i]["stringArgs"][2] = translatedText
|
||||
# Add/Replace font formatting
|
||||
# Remove existing font command if present
|
||||
translatedText = re.sub(r'\\f\[\d+\]', '', translatedText)
|
||||
if fontSize:
|
||||
# Add new font command if fontSize is not 0
|
||||
if fontSize != "0" and fontSize != 0:
|
||||
translatedText = f"\\f[{fontSize}]{translatedText}"
|
||||
|
||||
# Set Data
|
||||
codeList[i]["stringArgs"][0] = translatedText
|
||||
|
||||
|
||||
|
||||
### Iterate
|
||||
i += 1
|
||||
|
|
@ -715,6 +719,8 @@ def searchCodes(events, pbar, jobList, filename):
|
|||
# EOF
|
||||
stringListTL = []
|
||||
list210TL = []
|
||||
list150TL = []
|
||||
list250TL = []
|
||||
list300TL = []
|
||||
setData = False
|
||||
|
||||
|
|
@ -748,6 +754,21 @@ def searchCodes(events, pbar, jobList, filename):
|
|||
else:
|
||||
setData = True
|
||||
|
||||
# 250 List
|
||||
if len(list250) > 0:
|
||||
pbar.total = len(list250)
|
||||
pbar.refresh()
|
||||
response = translateGPT(list250, textHistory, True)
|
||||
list250TL = response[0]
|
||||
totalTokens[0] += response[1][0]
|
||||
totalTokens[1] += response[1][1]
|
||||
if len(list250TL) != len(list250):
|
||||
with LOCK:
|
||||
if filename not in MISMATCH:
|
||||
MISMATCH.append(filename)
|
||||
else:
|
||||
setData = True
|
||||
|
||||
# 300 List
|
||||
if len(list300) > 0:
|
||||
pbar.total = len(list300)
|
||||
|
|
@ -764,34 +785,34 @@ def searchCodes(events, pbar, jobList, filename):
|
|||
setData = True
|
||||
|
||||
# 150 List
|
||||
if len(list150TL) > 0:
|
||||
if len(list150) > 0:
|
||||
# Progress Bar
|
||||
pbar.total = len(list150TL)
|
||||
pbar.total = len(list150)
|
||||
pbar.refresh()
|
||||
|
||||
# Translate
|
||||
response = translateGPT(
|
||||
list150TL,
|
||||
list150,
|
||||
textHistory,
|
||||
True,
|
||||
)
|
||||
stringList150TL = response[0]
|
||||
list150TL = response[0]
|
||||
totalTokens[0] += response[1][0]
|
||||
totalTokens[1] += response[1][1]
|
||||
|
||||
# Check Mismatch
|
||||
if len(stringList150TL) != len(list150TL):
|
||||
if len(list150TL) != len(list150):
|
||||
with LOCK:
|
||||
if filename not in MISMATCH:
|
||||
MISMATCH.append(filename)
|
||||
else:
|
||||
list150TL = stringList150TL
|
||||
list150 = list150TL
|
||||
setData = True
|
||||
|
||||
# Update jobList before recursive call
|
||||
if setData == True:
|
||||
stringList = []
|
||||
jobList = [stringListTL, list210TL, list300TL, list150TL] # Add list150TL
|
||||
jobList = [stringListTL, list210TL, list300TL, list150TL, list250TL] # Add list150TL
|
||||
searchCodes(events, pbar, jobList, filename)
|
||||
|
||||
else:
|
||||
|
|
@ -869,7 +890,7 @@ def searchDB(events, pbar, jobList, filename):
|
|||
weaponsList = [[], [], [], []]
|
||||
skillList = [[], [], [], [], []]
|
||||
stateList = [[], [], [], [], [], [], [], []]
|
||||
optionsList = [[], [], [], []]
|
||||
optionsList = [[], [], []]
|
||||
dbNameList = [[]]
|
||||
dbValueList = [[]]
|
||||
setData = False
|
||||
|
|
@ -889,16 +910,17 @@ def searchDB(events, pbar, jobList, filename):
|
|||
try:
|
||||
for table in tableList:
|
||||
# Grab Armors
|
||||
if table["name"] == "ステータス" and NPCFLAG == True:
|
||||
if table["name"] == "アクター" and NPCFLAG == True:
|
||||
with open("translations.txt", "a", encoding="utf-8") as file:
|
||||
file.write(f"\n#Actors")
|
||||
if setData:
|
||||
file.write(f"\n#Actors\n")
|
||||
for npc in table["data"]:
|
||||
dataList = npc["data"]
|
||||
|
||||
# Parse
|
||||
for j in range(len(dataList)):
|
||||
# Name
|
||||
if "キャラ名" in dataList[j].get("name"):
|
||||
if "名前" in dataList[j].get("name"):
|
||||
# Pass 1 (Grab Data)
|
||||
if setData == False:
|
||||
if dataList[j].get("value") != "":
|
||||
|
|
@ -907,6 +929,10 @@ def searchDB(events, pbar, jobList, filename):
|
|||
# Pass 2 (Set Data)
|
||||
else:
|
||||
if dataList[j].get("value") != "":
|
||||
# Write Name
|
||||
file.write(f"{dataList[j].get('value')} ({npcList[0][0]})\n")
|
||||
|
||||
# Set
|
||||
dataList[j].update({"value": npcList[0][0]})
|
||||
npcList[0].pop(0)
|
||||
|
||||
|
|
@ -998,82 +1024,61 @@ def searchDB(events, pbar, jobList, filename):
|
|||
dataList[j].update({"value": dataList[j].get("value").replace(jaString, translatedText)})
|
||||
|
||||
# Grab Options
|
||||
if table["name"] == "選択肢説明" and OPTIONSFLAG == True:
|
||||
if table["name"] == "if分岐名" and OPTIONSFLAG == True:
|
||||
for option in table["data"]:
|
||||
dataList = option["data"]
|
||||
|
||||
# Parse
|
||||
for j in range(len(dataList)):
|
||||
# Name
|
||||
if "表示名" in dataList[j].get("name"):
|
||||
# Pass 1 (Grab Data)
|
||||
if setData == False:
|
||||
if dataList[j].get("value") != "":
|
||||
optionsList[0].append(dataList[j].get("value"))
|
||||
if "性癖ヒント" in dataList[j].get("name"):
|
||||
if dataList[j].get("value"):
|
||||
jaString = dataList[j].get("value")
|
||||
# Pass 1 (Grab Data)
|
||||
if setData == False:
|
||||
jaString = jaString.replace("\n", " ")
|
||||
jaString = jaString.replace("\r", "")
|
||||
optionsList[0].append(jaString)
|
||||
|
||||
# Pass 2 (Set Data)
|
||||
else:
|
||||
if dataList[j].get("value") != "":
|
||||
dataList[j].update({"value": optionsList[0][0]})
|
||||
# Pass 2 (Set Data)
|
||||
else:
|
||||
translatedText = optionsList[0][0]
|
||||
optionsList[0].pop(0)
|
||||
dataList[j].update({"value": dataList[j].get("value").replace(jaString, translatedText)})
|
||||
|
||||
# Description
|
||||
if "選択肢1" in dataList[j].get("name"):
|
||||
if setData == False:
|
||||
if dataList[j].get("value") != "":
|
||||
# Grab Choices
|
||||
optionsList[1] = dataList[j].get("value").split("\r\n")
|
||||
# Description 1
|
||||
if "プロフ" in dataList[j].get("name"):
|
||||
if dataList[j].get("value"):
|
||||
jaString = dataList[j].get("value")
|
||||
# Pass 1 (Grab Data)
|
||||
if setData == False:
|
||||
jaString = jaString.replace("\n", " ")
|
||||
jaString = jaString.replace("\r", "")
|
||||
optionsList[1].append(jaString)
|
||||
|
||||
# Translate
|
||||
response = translateGPT(
|
||||
optionsList[1],
|
||||
"Reply with the English translation of the dialogue choices",
|
||||
True,
|
||||
)
|
||||
totalTokens[0] += response[1][0]
|
||||
totalTokens[1] += response[1][1]
|
||||
translatedText = "\r\n".split(response[0])
|
||||
# Pass 2 (Set Data)
|
||||
else:
|
||||
translatedText = optionsList[1][0]
|
||||
optionsList[1].pop(0)
|
||||
translatedText = textwrap.fill(translatedText, LISTWIDTH)
|
||||
dataList[j].update({"value": dataList[j].get("value").replace(jaString, translatedText)})
|
||||
|
||||
# Set Data
|
||||
dataList[j].update({"value": translatedText})
|
||||
# Description
|
||||
if "選択肢1" in dataList[j].get("name"):
|
||||
if setData == False:
|
||||
if dataList[j].get("value") != "":
|
||||
# Grab Choices
|
||||
optionsList[1] = dataList[j].get("value").split("\r\n")
|
||||
# Description 2
|
||||
if "防御破壊文言" in dataList[j].get("name"):
|
||||
if dataList[j].get("value"):
|
||||
jaString = dataList[j].get("value")
|
||||
# Pass 1 (Grab Data)
|
||||
if setData == False:
|
||||
jaString = jaString.replace("\n", " ")
|
||||
jaString = jaString.replace("\r", "")
|
||||
optionsList[2].append(jaString)
|
||||
|
||||
# Translate
|
||||
response = translateGPT(
|
||||
optionsList[1],
|
||||
"Reply with the English translation of the dialogue choices",
|
||||
True,
|
||||
)
|
||||
totalTokens[0] += response[1][0]
|
||||
totalTokens[1] += response[1][1]
|
||||
translatedText = "\r\n".split(response[0])
|
||||
|
||||
# Set Data
|
||||
dataList[j].update({"value": translatedText})
|
||||
# Description
|
||||
if "選択肢1" in dataList[j].get("name"):
|
||||
if setData == False:
|
||||
if dataList[j].get("value") != "":
|
||||
# Grab Choices
|
||||
optionsList[1] = dataList[j].get("value").split("\r\n")
|
||||
|
||||
# Translate
|
||||
response = translateGPT(
|
||||
optionsList[1],
|
||||
"Reply with the English translation of the dialogue choices",
|
||||
True,
|
||||
)
|
||||
totalTokens[0] += response[1][0]
|
||||
totalTokens[1] += response[1][1]
|
||||
translatedText = "\r\n".split(response[0])
|
||||
|
||||
# Set Data
|
||||
dataList[j].update({"value": translatedText})
|
||||
# Pass 2 (Set Data)
|
||||
else:
|
||||
translatedText = optionsList[2][0]
|
||||
optionsList[2].pop(0)
|
||||
translatedText = textwrap.fill(translatedText, LISTWIDTH)
|
||||
dataList[j].update({"value": dataList[j].get("value").replace(jaString, translatedText)})
|
||||
|
||||
# Grab DB Names
|
||||
if table["name"] == "マップ設定" and DBNAMEFLAG == True:
|
||||
|
|
@ -1250,14 +1255,14 @@ def searchDB(events, pbar, jobList, filename):
|
|||
|
||||
# Grab Armors
|
||||
if table["name"] == "防具" and ARMORFLAG == True:
|
||||
font = "16"
|
||||
font = ""
|
||||
for armor in table["data"]:
|
||||
dataList = armor["data"]
|
||||
|
||||
# Parse
|
||||
for j in range(len(dataList)):
|
||||
# Name
|
||||
if "防具の名前" in dataList[j].get("name"):
|
||||
if "名前" in dataList[j].get("name"):
|
||||
# Pass 1 (Grab Data)
|
||||
if setData == False:
|
||||
if dataList[j].get("value") != "":
|
||||
|
|
@ -1270,7 +1275,7 @@ def searchDB(events, pbar, jobList, filename):
|
|||
armorList[0].pop(0)
|
||||
|
||||
# Description
|
||||
if "防具の説明" in dataList[j].get("name"):
|
||||
if "説明" in dataList[j].get("name"):
|
||||
# Pass 1 (Grab Data)
|
||||
if setData == False:
|
||||
if dataList[j].get("value") != "":
|
||||
|
|
@ -1824,6 +1829,7 @@ def searchDB(events, pbar, jobList, filename):
|
|||
|
||||
# Translation
|
||||
scenarioListTL = [[], [], []]
|
||||
optionsListTL = [[], [], []]
|
||||
npcListTL = [[], [], [], []]
|
||||
itemListTL = [[], [], [], []]
|
||||
stateListTL = [[], [], [], [], [], [], [], []]
|
||||
|
|
@ -1831,7 +1837,6 @@ def searchDB(events, pbar, jobList, filename):
|
|||
enemyListTL = [[], []]
|
||||
weaponsListTL = [[], [], []]
|
||||
skillListTL = [[], [], [], [], []]
|
||||
optionsListTL = [[], [], [], []]
|
||||
dbNameListTL = [[]]
|
||||
dbValueListTL = [[]]
|
||||
|
||||
|
|
@ -1922,13 +1927,50 @@ def searchDB(events, pbar, jobList, filename):
|
|||
totalTokens[0] += response[1][0]
|
||||
totalTokens[1] += response[1][1]
|
||||
|
||||
# OPTIONS
|
||||
if optionsList[0] or optionsList[1]:
|
||||
# Progress Bar
|
||||
total = 0
|
||||
for optionsArray in optionsList:
|
||||
total += len(optionsArray)
|
||||
pbar.total = total
|
||||
pbar.refresh()
|
||||
|
||||
# Name
|
||||
response = translateGPT(
|
||||
optionsList[0],
|
||||
"Reply with only the " + LANGUAGE + " translation",
|
||||
True,
|
||||
)
|
||||
nameListTL = response[0]
|
||||
totalTokens[0] += response[1][0]
|
||||
totalTokens[1] += response[1][1]
|
||||
# Desc 1
|
||||
response = translateGPT(
|
||||
optionsList[1],
|
||||
"reply with only the gender neutral " + LANGUAGE + " translation of the NPC name",
|
||||
True,
|
||||
)
|
||||
descListTL1 = response[0]
|
||||
totalTokens[0] += response[1][0]
|
||||
totalTokens[1] += response[1][1]
|
||||
# Desc 2
|
||||
response = translateGPT(
|
||||
optionsList[2],
|
||||
"reply with only the gender neutral " + LANGUAGE + " translation of the NPC name",
|
||||
True,
|
||||
)
|
||||
descListTL2 = response[0]
|
||||
totalTokens[0] += response[1][0]
|
||||
totalTokens[1] += response[1][1]
|
||||
|
||||
# Check Mismatch
|
||||
if len(nameListTL) != len(scenarioList[0]) or len(descListTL1) != len(scenarioList[1]) or len(descListTL2) != len(scenarioList[2]):
|
||||
if len(nameListTL) != len(optionsList[0]) or len(descListTL1) != len(optionsList[1]) or len(descListTL2) != len(optionsList[2]):
|
||||
with LOCK:
|
||||
if filename not in MISMATCH:
|
||||
MISMATCH.append(filename)
|
||||
else:
|
||||
scenarioListTL = [nameListTL, descListTL1, descListTL2]
|
||||
optionsListTL = [nameListTL, descListTL1, descListTL2]
|
||||
translate = True
|
||||
|
||||
# ITEMS
|
||||
|
|
@ -2281,30 +2323,6 @@ def searchDB(events, pbar, jobList, filename):
|
|||
]
|
||||
translate = True
|
||||
|
||||
# OPTIONS
|
||||
if len(optionsList[0]) > 0 or len(optionsList[1]) > 0:
|
||||
# Progress Bar
|
||||
total = 0
|
||||
for optionsArray in optionsList:
|
||||
total += len(optionsArray)
|
||||
pbar.total = total
|
||||
pbar.refresh()
|
||||
|
||||
# Name
|
||||
response = translateGPT(itemList[0], "Reply with only the " + LANGUAGE + " translation", True)
|
||||
nameListTL = response[0]
|
||||
totalTokens[0] += response[1][0]
|
||||
totalTokens[1] += response[1][1]
|
||||
|
||||
# Check Mismatch
|
||||
if len(nameListTL) != len(optionsList[0]):
|
||||
with LOCK:
|
||||
if filename not in MISMATCH:
|
||||
MISMATCH.append(filename)
|
||||
else:
|
||||
optionsListTL = [nameListTL]
|
||||
translate = True
|
||||
|
||||
# DB Names
|
||||
if len(dbNameList[0]) > 0:
|
||||
# Progress Bar
|
||||
|
|
|
|||
|
|
@ -189,13 +189,13 @@ def translateWOLF(data, translatedList, pbar, filename):
|
|||
|
||||
while i < len(data):
|
||||
# Speaker
|
||||
matchList = re.findall(r"(.*):", data[i])
|
||||
matchList = re.findall(r"^([^/]*):", data[i])
|
||||
if len(matchList) != 0:
|
||||
response = getSpeaker(matchList[0])
|
||||
speaker = response[0]
|
||||
tokens[0] += response[1][0]
|
||||
tokens[1] += response[1][1]
|
||||
data[i] = f"{speaker}:\n"
|
||||
data[i] = data[i].replace(matchList[0], f"{speaker}")
|
||||
i += 1
|
||||
else:
|
||||
speaker = ""
|
||||
|
|
@ -252,7 +252,7 @@ def translateWOLF(data, translatedList, pbar, filename):
|
|||
|
||||
# Add Speaker (If there is one)
|
||||
if speaker != "":
|
||||
jaString = f"{speaker}: {jaString}"
|
||||
jaString = f"[{speaker}]: {jaString}"
|
||||
|
||||
# Add String
|
||||
stringList.append(jaString)
|
||||
|
|
@ -271,8 +271,10 @@ def translateWOLF(data, translatedList, pbar, filename):
|
|||
if len(translatedList) <= 0:
|
||||
translatedList = None
|
||||
|
||||
# Remove added speaker
|
||||
# translatedText = re.sub(r"^.+?:\s", "", translatedText)
|
||||
# Remove speaker
|
||||
matchSpeakerList = re.findall(r"^(\[.+?\]\s?[|:]\s?)\s?", translatedText)
|
||||
if len(matchSpeakerList) > 0:
|
||||
translatedText = translatedText.replace(matchSpeakerList[0], "")
|
||||
|
||||
# Textwrap
|
||||
translatedText = textwrap.fill(translatedText, width=WIDTH)
|
||||
|
|
|
|||
154
vocab.txt
154
vocab.txt
|
|
@ -1,17 +1,38 @@
|
|||
Here are some vocabulary and terms so that you know the proper spelling and translation.
|
||||
```
|
||||
# Game Characters
|
||||
ユスティ (Yusty) - Female
|
||||
ユースティテ (Yustitia) - Female
|
||||
イリス (Iris) - Female
|
||||
ノエル (Noel) - Female
|
||||
リーン (Leen) - Female
|
||||
サーニャ (Sanya) - Female
|
||||
パイネル (Painel) - Female
|
||||
ウェイン (Wayne) - Female
|
||||
マキナ (Makina) - Female
|
||||
リーパー (Reaper) - Female
|
||||
大工 (Carpenter) - Male
|
||||
アイリス (Iris) - Female
|
||||
フランシスカ (Francisca) - Female
|
||||
リサ (Lisa) - Female
|
||||
エリーゼ (Elise) - Female
|
||||
エルフィナ (Elphina) - Female
|
||||
カリン (Karin) - Female
|
||||
リルナ (Riruna) - Female
|
||||
アルフォンス (Alphonse) - Male
|
||||
グスタフ (Gustav) - Male
|
||||
ルカ (Luca) - Male
|
||||
クラウディオ (Claudio) - Male
|
||||
ジェフリー (Jeffrey) - Male
|
||||
シオン (Sion) - Female
|
||||
フォルクレー兄妹 (Forqueray) - Male & Female
|
||||
(妹)(Sister) - Female
|
||||
アクア (Aqua) - Male
|
||||
フィーラ (Fira)
|
||||
レイア (Leia)
|
||||
サン (Sun)
|
||||
ケイ (Kei)
|
||||
トリウーニヒ (Triuni)
|
||||
エメラルダ (Emeralda)
|
||||
転生ちゃん (Reincarnation-chan)
|
||||
神楽ちゃん (Kagura-chan) - Female
|
||||
ミル (Miru) - Female
|
||||
メリッサ (Melissa) - Female
|
||||
クレア (Claire) - Female
|
||||
コレット (Colette) - Female
|
||||
モニカ (Monica) - Female
|
||||
ノーラ (Nora) - Female
|
||||
ルチア (Lucia) - Female
|
||||
悪魔竜アイリス (Devil Dragon Iris) - Female
|
||||
|
||||
# Lewd Terms
|
||||
マンコ (pussy)
|
||||
|
|
@ -140,121 +161,10 @@ ME 音量 (ME Volume)
|
|||
ローバー (Roper)
|
||||
夢魔 (Succubus)
|
||||
|
||||
#Enemies
|
||||
シコザル (Masturbating Monkey)
|
||||
ドクムラサキ (Dokumurasaki)
|
||||
シコザル:賢者モード (Masturbating Monkey: Sage Mode)
|
||||
シコザル:興奮 (Masturbating Monkey: Aroused)
|
||||
キングシコザル (King Masturbating Monkey)
|
||||
カブリマラドラゴン (Kaburimara Dragon)
|
||||
カブリマラドラゴン亜種 (Kaburimara Dragon Subspecies)
|
||||
学園長 (Headmaster)
|
||||
パラライズアゲハ (Paralyze Swallowtail)
|
||||
クンニリザード (Cunnilingus Lizard)
|
||||
ピリジンワーム (Pyridine Worm)
|
||||
溶岩塊 (Lava Chunk)
|
||||
スノーエイプ (Snow Ape)
|
||||
カブリマラドラゴン:突然変異個体 (Kaburimara Dragon: Mutant)
|
||||
水流操りし齧歯類 (Rodent that Controls Water Flow)
|
||||
3ターン毎に命を貪るワニ (Crocodile that Devours Life Every 3 Turns)
|
||||
エレクチオンスコーピオン (Erection Scorpion)
|
||||
熱砂の捕食者 (Predator of the Scorching Sands)
|
||||
チンゲリオン (Chingerion)
|
||||
シコッタハゲタカ (Masturbating Vulture)
|
||||
エイミンサボテン (Aiming Cactus)
|
||||
奴隷商人 (Slave Trader)
|
||||
ハゲタカ3兄弟 (Three Vulture Brothers)
|
||||
フローズンバタフライ (Frozen Butterfly)
|
||||
アイスバーグ (Iceberg)
|
||||
ゴブリン(棍棒) (Goblin (Club))
|
||||
ゴブリン(盾) (Goblin (Shield))
|
||||
ゴブリン(薬) (Goblin (Potion))
|
||||
スノーボア (Snow Boar)
|
||||
剛なる右腕 (Mighty Right Arm)
|
||||
賢しき左腕 (Wise Left Arm)
|
||||
クリスタルゴーレム (Crystal Golem)
|
||||
剛なる右腕:熱暴走 (Mighty Right Arm: Overheat)
|
||||
賢しき左腕:熱暴走 (Wise Left Arm: Overheat)
|
||||
クリスタルゴーレム:熱暴走 (Crystal Golem: Overheat)
|
||||
ゴブリンキング (Goblin King)
|
||||
クンニリザードエリート (Cunnilingus Lizard Elite)
|
||||
デスストーカー (Death Stalker)
|
||||
巨人族 (Giant Tribe)
|
||||
ゴールデンシコザル (Golden Masturbating Monkey)
|
||||
巨人族の長 (Giant Tribe Chief)
|
||||
始原竜クレスケンスルーナ (Primordial Dragon Crescensluna)
|
||||
現実と理想の相違から訪れる混沌 (Chaos Born from the Gap Between Reality and Ideals)
|
||||
チシドクガエル (Poison Blood Frog)
|
||||
危険な肉ビラ (Dangerous Meat Flap)
|
||||
鏡反の魔蟲 (Mirror-Reflecting Demon Bug)
|
||||
シコザルドロップ実験 (Masturbating Monkey Drop Experiment)
|
||||
↓以下シコザルの森 (↓Below: Masturbating Monkey Forest)
|
||||
シコザル:異常性欲個体 (Masturbating Monkey: Hypersexual Specimen)
|
||||
ドクムラサキ (Poison Purple)
|
||||
シビレタケ (Numbing Mushroom)
|
||||
森林ムカデ (Forest Centipede)
|
||||
野生の種馬 (Wild Stud)
|
||||
メタルシコザル (Metal Masturbating Monkey)
|
||||
大妖花 (Great Demon Flower)
|
||||
↓以下マラスル (↓Below: Marasle)
|
||||
ベビースノーボア (Baby Snow Boar)
|
||||
万年発情ウサギ (Perpetually Horny Rabbit)
|
||||
シルバーウルフ (Silver Wolf)
|
||||
シロカブト (White Beetle)
|
||||
↓以下大陰森 (↓Below: Great Dark Forest)
|
||||
チシドクガエル (Poison Dart Frog)
|
||||
水流操りし齧歯類 (Rodent That Controls Water Currents)
|
||||
3T毎に強攻撃を繰り出すワニ (Crocodile That Unleashes a Strong Attack Every 3T)
|
||||
オトノサマガエル (Lord Frog)
|
||||
オヒメサマガエル (Princess Frog)
|
||||
〇雑魚用耐性 (〇Resistance for Small Fry)
|
||||
〇ボス用耐性 (〇Resistance for Boss)
|
||||
↓以下失意の沼地 (↓Below: Swamp of Despair)
|
||||
マカフシギダケ (Mysterious Mushroom)
|
||||
カオスプラント (Chaos Plant)
|
||||
ボニウスネーク (Bonious Snake)
|
||||
バジリスク (Basilisk)
|
||||
↓以下満洪石窟寺院 (↓Below: Mankou Stone Cave Temple)
|
||||
ゲイザー (Gazer)
|
||||
ワスプ (Wasp)
|
||||
クイーンワスプ (Queen Wasp)
|
||||
邪神像 (Idol of the Evil God)
|
||||
↓以下リズイパ海溝 (↓Below: Rizuipa Trench)
|
||||
鏡反の魔蟲 (Mirror-Reflected Demon Bug)
|
||||
アビスワーム (Abyss Worm)
|
||||
スベスベオマンコガニ (Smooth Pussy Crab)
|
||||
デビルオクトパス (Devil Octopus)
|
||||
深海不定形生物 (Deep Sea Amorphous Creature)
|
||||
チェーンソーシャーク (Chainsaw Shark)
|
||||
大海の覇者 (Ruler of the Great Sea)
|
||||
海魔マレノストルム (Sea Demon Marenostrum)
|
||||
↓以下岬の教会 (↓Below: Cape Church)
|
||||
ブラックウィドウ (Black Widow)
|
||||
踊り狂う怪鳥 (Frenzied Dancing Bird)
|
||||
キングトロル (King Troll)
|
||||
キマイラ (Chimera)
|
||||
スケルトン (Skeleton)
|
||||
塔の守護者 (Guardian of the Tower)
|
||||
フォートレスタートル (Fortress Turtle)
|
||||
|
||||
# Other
|
||||
w ((lol))
|
||||
2万 (20,000)
|
||||
『 (『)
|
||||
』 (』)
|
||||
|
||||
# Game Specific
|
||||
ぽんこつ王女ユスティの廃村開拓記 (The Clumsy Princess Yusty and the Abandoned Village Revival)
|
||||
試しの塔 (Trial Tower)
|
||||
満洪石窟寺院 (Mankou Stone Cave Temple)
|
||||
空き家 (Vacant House)
|
||||
娼館 (Brothel)
|
||||
ヨーデル (Yodel)
|
||||
リズイパ海溝 (Rizuipa Trench)
|
||||
マラスル (Marasle)
|
||||
シコザル (Masturbating Monkey)
|
||||
大家族の民家 (Big Family House)
|
||||
蛇ヶ淵沼 (Snake Swamp)
|
||||
トロッコ洞窟 (Minecart)
|
||||
|
||||
```
|
||||
Loading…
Reference in a new issue