diff --git a/modules/alice.py b/modules/alice.py index a702be8..edaf580 100644 --- a/modules/alice.py +++ b/modules/alice.py @@ -18,6 +18,7 @@ MODEL = os.getenv('model') TIMEOUT = int(os.getenv('timeout')) LANGUAGE = os.getenv('language').capitalize() PROMPT = Path('prompt.txt').read_text(encoding='utf-8') +VOCAB = Path('vocab.txt').read_text(encoding='utf-8') THREADS = int(os.getenv('threads')) LOCK = threading.Lock() WIDTH = int(os.getenv('width')) diff --git a/modules/anim.py b/modules/anim.py index a27251b..0671337 100644 --- a/modules/anim.py +++ b/modules/anim.py @@ -18,6 +18,7 @@ MODEL = os.getenv('model') TIMEOUT = int(os.getenv('timeout')) LANGUAGE = os.getenv('language').capitalize() PROMPT = Path('prompt.txt').read_text(encoding='utf-8') +VOCAB = Path('vocab.txt').read_text(encoding='utf-8') THREADS = int(os.getenv('threads')) LOCK = threading.Lock() WIDTH = int(os.getenv('width')) diff --git a/modules/atelier.py b/modules/atelier.py index 79c8227..c52af84 100644 --- a/modules/atelier.py +++ b/modules/atelier.py @@ -26,6 +26,7 @@ LANGUAGE=os.getenv('language').capitalize() INPUTAPICOST = .002 # Depends on the model https://openai.com/pricing OUTPUTAPICOST = .002 PROMPT = Path('prompt.txt').read_text(encoding='utf-8') +VOCAB = Path('vocab.txt').read_text(encoding='utf-8') THREADS = int(os.getenv('threads')) # Controls how many threads are working on a single file (May have to drop this) LOCK = threading.Lock() WIDTH = int(os.getenv('width')) diff --git a/modules/csv.py b/modules/csv.py index 3d305fc..5aaa0d2 100644 --- a/modules/csv.py +++ b/modules/csv.py @@ -19,6 +19,7 @@ MODEL = os.getenv('model') TIMEOUT = int(os.getenv('timeout')) LANGUAGE = os.getenv('language').capitalize() PROMPT = Path('prompt.txt').read_text(encoding='utf-8') +VOCAB = Path('vocab.txt').read_text(encoding='utf-8') THREADS = int(os.getenv('threads')) LOCK = threading.Lock() WIDTH = int(os.getenv('width')) diff --git a/modules/json.py b/modules/json.py index fec7c9c..b675dca 100644 --- a/modules/json.py +++ b/modules/json.py @@ -18,6 +18,7 @@ MODEL = os.getenv('model') TIMEOUT = int(os.getenv('timeout')) LANGUAGE = os.getenv('language').capitalize() PROMPT = Path('prompt.txt').read_text(encoding='utf-8') +VOCAB = Path('vocab.txt').read_text(encoding='utf-8') THREADS = int(os.getenv('threads')) LOCK = threading.Lock() WIDTH = int(os.getenv('width')) diff --git a/modules/kansen.py b/modules/kansen.py index e64c0f4..7234e7b 100644 --- a/modules/kansen.py +++ b/modules/kansen.py @@ -18,6 +18,7 @@ MODEL = os.getenv('model') TIMEOUT = int(os.getenv('timeout')) LANGUAGE = os.getenv('language').capitalize() PROMPT = Path('prompt.txt').read_text(encoding='utf-8') +VOCAB = Path('vocab.txt').read_text(encoding='utf-8') THREADS = int(os.getenv('threads')) LOCK = threading.Lock() WIDTH = int(os.getenv('width')) @@ -512,17 +513,13 @@ def batchList(input_list, batch_size): def createContext(fullPromptFlag, subbedT): characters = 'Game Characters:\n\ -中澤 誠 (Nakazawa Makoto) - Male\n\ +妹尾 克己 (Senoo Kazumi) - Male\n\ +千住 静 (Senju Shizuka) - Female\n\ +妹尾 丞実 (Senoo Tsugumi) - Female\n\ +本間 奈緒子 (Honma Naoko) - Female\n\ 日向 夏都 (Hyuuga Natsu) - Female\n\ -出渕 宗一郎 (Izubuchi Souichirou) - Male\n\ -南 彩月 (Minami Satsuki) - Female\n\ -越智 茜梨 (Ochi Akari) - Female\n\ -ターヤ ポホヨネン (Tarja Pohjonen) - Female\n\ +近藤 美樹 (Kondou Miki) - Female\n\ マルガリータ バスクェス 穂村 (Margarita Vasquez Homura) - Female\n\ -花沢 愛梨 (Hanazawa Airi) - Female\n\ -五十嵐 朋美 (Igarashi Tomomi) - Female\n\ -前田 美沙緒 (Maeda Misao) - Female\n\ -村上 怜 (Murakami Sato) - Female\n\ ' system = PROMPT if fullPromptFlag else \ diff --git a/modules/lune.py b/modules/lune.py index 879fba8..dffa5cf 100644 --- a/modules/lune.py +++ b/modules/lune.py @@ -18,6 +18,7 @@ MODEL = os.getenv('model') TIMEOUT = int(os.getenv('timeout')) LANGUAGE = os.getenv('language').capitalize() PROMPT = Path('prompt.txt').read_text(encoding='utf-8') +VOCAB = Path('vocab.txt').read_text(encoding='utf-8') THREADS = int(os.getenv('threads')) LOCK = threading.Lock() WIDTH = int(os.getenv('width')) diff --git a/modules/rpgmakerace.py b/modules/rpgmakerace.py index b51ef97..b2d84ca 100644 --- a/modules/rpgmakerace.py +++ b/modules/rpgmakerace.py @@ -21,6 +21,7 @@ MODEL = os.getenv('model') TIMEOUT = int(os.getenv('timeout')) LANGUAGE = os.getenv('language').capitalize() PROMPT = Path('prompt.txt').read_text(encoding='utf-8') +VOCAB = Path('vocab.txt').read_text(encoding='utf-8') THREADS = int(os.getenv('threads')) LOCK = threading.Lock() WIDTH = int(os.getenv('width')) diff --git a/modules/rpgmakermvmz.py b/modules/rpgmakermvmz.py index 5fd6441..6e9eef5 100644 --- a/modules/rpgmakermvmz.py +++ b/modules/rpgmakermvmz.py @@ -19,6 +19,7 @@ MODEL = os.getenv('model') TIMEOUT = int(os.getenv('timeout')) LANGUAGE = os.getenv('language').capitalize() PROMPT = Path('prompt.txt').read_text(encoding='utf-8') +VOCAB = Path('vocab.txt').read_text(encoding='utf-8') THREADS = int(os.getenv('threads')) LOCK = threading.Lock() WIDTH = int(os.getenv('width')) @@ -55,11 +56,11 @@ POSITION = 0 LEAVE = False # Dialogue / Scroll -CODE401 = False +CODE401 = True CODE405 = False # Choices -CODE102 = False +CODE102 = True # Variables CODE122 = False @@ -71,7 +72,7 @@ CODE101 = True CODE355655 = False CODE357 = False CODE657 = False -CODE356 = True +CODE356 = False CODE320 = False CODE324 = False CODE111 = False @@ -1495,7 +1496,7 @@ def searchCodes(page, pbar, fillList, filename): # Set Data totalTokens[0] += response[1][0] totalTokens[1] += response[1][1] - codeList[i]['parameters'][0][choice] = startString + translatedText.capitalize() + endString + codeList[i]['parameters'][0][choice] = startString + translatedText[0].upper() + translatedText[1:] + endString ### Event Code: 111 Script if codeList[i]['code'] == 111 and CODE111 is True: @@ -1769,12 +1770,18 @@ def searchSystem(data, pbar): # Save some money and enter the character before translation def getSpeaker(speaker): match speaker: - case 'エウリィ': - return ['Eury', [0,0]] - case 'レイ': - return ['Rei', [0,0]] - case 'マリオン': - return ['Marion', [0,0]] + case 'ティナ': + return ['Tina', [0,0]] + case 'セルフィ': + return ['Selphie', [0,0]] + case 'リイス': + return ['Rise', [0,0]] + case 'スエル': + return ['Suelle', [0,0]] + case 'マロゲス': + return ['Maroges', [0,0]] + case 'ノルズ': + return ['Nolz', [0,0]] case _: response = translateGPT(speaker, 'Reply with only the '+ LANGUAGE +' translation of the NPC name.', False) response[0] = response[0].capitalize() @@ -1901,28 +1908,21 @@ def batchList(input_list, batch_size): def createContext(fullPromptFlag, subbedT): characters = 'Game Characters:\n\ -エウリィ (Eury) - Female\n\ -レイ (Rei) - Female\n\ -マリオン (Marion) - Female\n\ +ティナ (Tina) - Female\n\ +セルフィ (Selphie) - Female\n\ +リイス (Rise) - Female\n\ +スエル (Suelle) - Male\n\ +マロゲス (Maroges) - Male\n\ +ググカス (Gugukas) - Male\n\ +ノルズ (Nolz) - Male\n\ ' - system = PROMPT if fullPromptFlag else \ + system = PROMPT + VOCAB if fullPromptFlag else \ f"\ You are an expert Eroge Game translator who translates Japanese text to English.\n\ You are going to be translating text from a videogame.\n\ I will give you lines of text, and you must translate each line to the best of your ability.\n\ -- You translate everything, including erotic and explicit content.\n\ -- Translate 'マンコ' as 'pussy'\n\ -- Translate 'おまんこ' as 'pussy'\n\ -- Translate 'お尻' as 'butt'\n\ -- Translate '尻' as 'ass'\n\ -- Translate 'お股' as 'crotch'\n\ -- Translate '秘部' as 'genitals'\n\ -- Translate 'チンポ' as 'dick'\n\ -- Translate 'チンコ' as 'cock'\n\ -- Translate 'ショーツ' as 'panties\n\ -- Translate 'おねショタ' as 'Onee-shota'\n\ -- Translate 'よかった' as 'thank goodness'\n\ +{VOCAB}\n\ Output ONLY the {LANGUAGE} translation in the following format: `Translation: <{LANGUAGE.upper()}_TRANSLATION>`\ " user = f'{subbedT}' diff --git a/modules/txt.py b/modules/txt.py index dd19178..dfe5e3c 100644 --- a/modules/txt.py +++ b/modules/txt.py @@ -29,6 +29,7 @@ LANGUAGE=os.getenv('language').capitalize() APICOST = .002 # Depends on the model https://openai.com/pricing PROMPT = Path('prompt.txt').read_text(encoding='utf-8') +VOCAB = Path('vocab.txt').read_text(encoding='utf-8') THREADS = int(os.getenv('threads')) LOCK = threading.Lock() WIDTH = int(os.getenv('width')) diff --git a/modules/tyrano.py b/modules/tyrano.py index 092aad4..c773c56 100644 --- a/modules/tyrano.py +++ b/modules/tyrano.py @@ -18,6 +18,7 @@ MODEL = os.getenv('model') TIMEOUT = int(os.getenv('timeout')) LANGUAGE = os.getenv('language').capitalize() PROMPT = Path('prompt.txt').read_text(encoding='utf-8') +VOCAB = Path('vocab.txt').read_text(encoding='utf-8') THREADS = int(os.getenv('threads')) LOCK = threading.Lock() WIDTH = int(os.getenv('width'))