From 37673a8f24b98da03a95872de732180d5e06d7fb Mon Sep 17 00:00:00 2001 From: dazedanon Date: Tue, 15 Apr 2025 09:20:08 -0500 Subject: [PATCH] Small changes --- modules/rpgmakerace.py | 10 ++--- modules/rpgmakermvmz.py | 40 +++++++++++++++++++- modules/rpgmakerplugin.py | 56 +++++++++++++++------------ vocab.txt | 79 ++++++++++++++++++--------------------- 4 files changed, 113 insertions(+), 72 deletions(-) diff --git a/modules/rpgmakerace.py b/modules/rpgmakerace.py index 7e3ca54..80321cc 100644 --- a/modules/rpgmakerace.py +++ b/modules/rpgmakerace.py @@ -82,9 +82,9 @@ POSITION = 0 LEAVE = False # Dialogue / Scroll / Choices (Main Codes) -CODE401 = False -CODE405 = False -CODE102 = False +CODE401 = True +CODE405 = True +CODE102 = True # Optional CODE101 = False # Turn this one when names exist in 101 @@ -94,8 +94,8 @@ CODE408 = False # Warning, translates comments and can inflate costs. CODE122 = False # Other -CODE355655 = True -CODE357 = False +CODE355655 = False +CODE357 = True CODE657 = False CODE356 = False CODE320 = False diff --git a/modules/rpgmakermvmz.py b/modules/rpgmakermvmz.py index bd722c0..6916f9c 100644 --- a/modules/rpgmakermvmz.py +++ b/modules/rpgmakermvmz.py @@ -956,7 +956,7 @@ def searchCodes(page, pbar, jobList, filename): # Colors if len(speakerList) == 0: speakerList = re.findall( - r"^[\\]+[cC]\[[\d]+\]【?(.+?)】?[\\]+[Cc]\[[\d]\]\\?\\?$", + r"^[\\]+[cC]\[[\d]+\]【?(.+?)】?[\\]+[Cc]\[?[\d]?\]?\\?\\?$", jaString, ) @@ -1675,6 +1675,42 @@ def searchCodes(page, pbar, jobList, filename): codeList[i]["parameters"][0] = codeList[i]["parameters"][0].replace(replaceString, translatedText) list355655.pop(0) + elif "_subject=" in jaString: + jaString = codeList[i]["parameters"][0] + regex = r'_subject=(.+?)_' + + # Check Exist + match = re.search(regex, jaString) + if match: + replaceString = match.group(1) + finalJAString = replaceString + + # Remove Textwrap + # finalJAString = finalJAString.replace("\n", " ") + + # Remove Spaces + finalJAString = finalJAString.replace("\u3000", "") + finalJAString = finalJAString.strip() + + # Final Set + if finalJAString: + # Pass 1 + if setData: + list355655.append(finalJAString) + + # Pass 2 + else: + # Grab and Replace + translatedText = list355655[0] + translatedText = re.sub(r"(??" elif "event_text" in jaString: regex = r"event_text\s*:\s*(.*)" + elif "Menu Name" in jaString: + regex = r"Menu\sName\s*:\s*(.*)>" else: i += 1 continue diff --git a/modules/rpgmakerplugin.py b/modules/rpgmakerplugin.py index 93e04ed..1ca591e 100644 --- a/modules/rpgmakerplugin.py +++ b/modules/rpgmakerplugin.py @@ -195,6 +195,11 @@ def translatePlugin(data, pbar, filename, translatedList): global LOCK, ESTIMATE i = 0 + # Category + with open("translations.txt", "a+", encoding="utf-8") as tlFile: + tlFile.write(f"\nCustom:\n") + tlFile.close() + while i < len(data): voice = False speaker = "" @@ -202,7 +207,7 @@ def translatePlugin(data, pbar, filename, translatedList): colorCode = r"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\C" # Custom - regex = r'"Text[\\]+":[\\]+"(.+?)[\\]' + regex = r'"description":\s"(.+?)",?$' matchList = re.findall(regex, data[i]) if len(matchList) > 0: for match in matchList: @@ -217,34 +222,37 @@ def translatePlugin(data, pbar, filename, translatedList): # Remove any textwrap # jaString = jaString.replace(newline, " ") - # Pass 1 - if setData == False: - custom.append(jaString.strip()) + if jaString.replace("\u3000", "") and jaString: + # Pass 1 + if setData == False: + custom.append(jaString.strip()) - # Pass 2 - else: - if custom: - # Grab and Pop - translatedText = custom[0] - custom.pop(0) + # Pass 2 + else: + if custom: + # Grab and Pop + translatedText = custom[0] + custom.pop(0) - # Set to None if empty list - if len(translatedList) <= 0: - translatedList = None + # Set to None if empty list + if len(translatedList) <= 0: + translatedList = None - # Replace Single Quotes - translatedText = re.sub(r"([^\\'])'", r"\1\\'", translatedText) - translatedText = re.sub(r"([^\\'])\"", r"\1\\'", translatedText) + # Replace Single Quotes + translatedText = re.sub(r"([^\\'])'", r"\1\\'", translatedText) + translatedText = re.sub(r"([^\\'])\"", r"\1\\'", translatedText) - # Textwrap - # translatedText = textwrap.fill(translatedText, WIDTH) + # Textwrap + # translatedText = textwrap.fill(translatedText, WIDTH) - # Replace \n and \c - translatedText = re.sub(r"\\+n", re.escape(newline), translatedText) - translatedText = re.sub(r"\\+C", re.escape(colorCode), translatedText) + # Replace \n and \c + translatedText = re.sub(r"\\+n", re.escape(newline), translatedText) + translatedText = re.sub(r"\\+C", re.escape(colorCode), translatedText) - # Set Data - data[i] = data[i].replace(originalString, translatedText) + # Set Data + with open("translations.txt", "a+", encoding="utf-8") as tlFile: + tlFile.write(f"{originalString} ({translatedText})\n") + data[i] = data[i].replace(originalString, translatedText) # Quest Name regex = r'[\\]+"Titled[\\]+":[\\]+"(.*?)[\\]+"' @@ -547,7 +555,7 @@ def translatePlugin(data, pbar, filename, translatedList): PBAR = pbar # TL - response = translateGPT(custom, "Title", True) + response = translateGPT(custom, "Relic Name", True) tokens[0] += response[1][0] tokens[1] += response[1][1] customResponse = response[0] diff --git a/vocab.txt b/vocab.txt index c0115e1..61b0703 100644 --- a/vocab.txt +++ b/vocab.txt @@ -1,15 +1,8 @@ Here are some vocabulary and terms so that you know the proper spelling and translation. ``` # Game Characters -セレト (Sereto) - Male -メア (Mea) - Female -リリリ (Lilili) - Female -デイ (Dei) - Female -ルーシィ (Lucy) - Female -セビナ (Sebina) - Female -アビー (Abby) - Female -マリステラ (Maristella) - Female -レミ (Remy) - Female +シリル (Cyril) - Female +ジャヒカ (Jahika) - Female # Lewd Terms マンコ (pussy) @@ -22,6 +15,36 @@ Here are some vocabulary and terms so that you know the proper spelling and tran チンコ (cock) ショーツ (panties) イラマチオ (irrumatio) +理性 (Sanity) +性欲 (Libido) +子宮の状態 (Uterus St.) +最後の相手 (Last Partner) +陰茎の長さ (Penis Length) +射精量 (Total Cum) +絶頂回数 (Orgasm) +搾精回数 (Semen Milked) +経験人数 (Partners) +膣内射精 (Creampie) +膣外射精 (Non-Creampie) +アナル (Anal) +パイズリ (Paizuri) +フェラ (Blowjob) +手コキ (Handjob) +太もも (Thighjob) +尻コキ (Assjob) +ぶっかけ (Cumshot) +おさわり (Touched) +受精 (Fertilized) +出産 (Births) +子宮 (Womb) +股触られ (Fingered) +乳揉まれ (Fondled) +尻揉まれ (Ass Groped) +乳首 (Nipples) +キス (Kiss) +舐めた (Lick) +舐められ (Licked By) +衣装ごとの性行為回数 (Sex Acts per Outfit) # Honorifics さん (san) @@ -73,38 +96,6 @@ ME 音量 (ME Volume) 回 (x) 人 (x) -# Sex Terms -理性 (Sanity) -性欲 (Libido) -子宮の状態 (Uterus St.) -最後の相手 (Last Partner) -陰茎の長さ (Penis Length) -射精量 (Total Cum) -絶頂回数 (Orgasm) -搾精回数 (Semen Milked) -経験人数 (Partners) -膣内射精 (Creampie) -膣外射精 (Non-Creampie) -アナル (Anal) -パイズリ (Paizuri) -フェラ (Blowjob) -手コキ (Handjob) -太もも (Thighjob) -尻コキ (Assjob) -ぶっかけ (Cumshot) -おさわり (Touched) -受精 (Fertilized) -出産 (Births) -子宮 (Womb) -股触られ (Fingered) -乳揉まれ (Fondled) -尻揉まれ (Ass Groped) -乳首 (Nipples) -キス (Kiss) -舐めた (Lick) -舐められ (Licked By) -衣装ごとの性行為回数 (Sex Acts per Outfit) - # Demons/Angels/Monsters 悪魔 (Devil) 上級悪魔 (Arch Devil) @@ -137,5 +128,9 @@ w ((lol)) 』 (』) # Game Specific -デロメーロ (Delomero) +クーリア (Curia) +デヴァンド (Devand) +ツァフ荒地 (Tzaf Wasteland) +エラトー密林 (Erato Jungle) + ``` \ No newline at end of file