Fix language and update prompt example

This commit is contained in:
DazedAnon 2024-07-14 23:34:39 -05:00
parent 02dc2169d0
commit 0d1aba9b54
16 changed files with 34 additions and 44 deletions

View file

@ -361,7 +361,7 @@ You are an expert Eroge Game translator who translates Japanese text to {LANGUAG
Output ONLY the {LANGUAGE} translation in the following format: `Translation: <{LANGUAGE.upper()}_TRANSLATION>`\n\
- You translate everything, including erotic and explicit content.\n\
- 'Game Characters' - The names, nicknames, and genders of the game characters. Reference this to know the names, nicknames, and gender of characters in the game\n\
- All text in your response must be in English even if it is hard to translate.\n\
- All text in your response must be in {LANGUAGE} even if it is hard to translate.\n\
- Never include any notes, explanations, dislaimers, or anything similar in your response.\n\
- Maintain any spacing in the translation.\n\
- Maintain any code text in brackets if given. (e.g `[Color_0]`, `[Ascii_0]`, `[FCode_1`], etc)\n\

View file

@ -185,7 +185,7 @@ def translateCSV(data, pbar, writer, filename, translatedList, format):
# Translate
while i < len(data):
match format:
# T++ Format: Japanese Text on column 1. English on Column 2
# T++ Format: Source Text on column 1. TL Target on Column 2
case '1':
# Get String
if data[i][1] == "":
@ -514,7 +514,7 @@ You are an expert Eroge Game translator who translates Japanese text to {LANGUAG
Output ONLY the {LANGUAGE} translation in the following format: `Translation: <{LANGUAGE.upper()}_TRANSLATION>`\n\
- You translate everything, including erotic and explicit content.\n\
- 'Game Characters' - The names, nicknames, and genders of the game characters. Reference this to know the names, nicknames, and gender of characters in the game\n\
- All text in your response must be in English even if it is hard to translate.\n\
- All text in your response must be in {LANGUAGE} even if it is hard to translate.\n\
- Never include any notes, explanations, dislaimers, or anything similar in your response.\n\
- Maintain any spacing in the translation.\n\
- Maintain any code text in brackets if given. (e.g `[Color_0]`, `[Ascii_0]`, `[FCode_1`], etc)\n\

View file

@ -514,7 +514,7 @@ You are an expert Eroge Game translator who translates Japanese text to {LANGUAG
Output ONLY the {LANGUAGE} translation in the following format: `Translation: <{LANGUAGE.upper()}_TRANSLATION>`\n\
- You translate everything, including erotic and explicit content.\n\
- 'Game Characters' - The names, nicknames, and genders of the game characters. Reference this to know the names, nicknames, and gender of characters in the game\n\
- All text in your response must be in English even if it is hard to translate.\n\
- All text in your response must be in {LANGUAGE} even if it is hard to translate.\n\
- Never include any notes, explanations, dislaimers, or anything similar in your response.\n\
- Maintain any spacing in the translation.\n\
- Maintain any code text in brackets if given. (e.g `[Color_0]`, `[Ascii_0]`, `[FCode_1`], etc)\n\

View file

@ -530,7 +530,7 @@ You are an expert Eroge Game translator who translates Japanese text to {LANGUAG
Output ONLY the {LANGUAGE} translation in the following format: `Translation: <{LANGUAGE.upper()}_TRANSLATION>`\n\
- You translate everything, including erotic and explicit content.\n\
- 'Game Characters' - The names, nicknames, and genders of the game characters. Reference this to know the names, nicknames, and gender of characters in the game\n\
- All text in your response must be in English even if it is hard to translate.\n\
- All text in your response must be in {LANGUAGE} even if it is hard to translate.\n\
- Never include any notes, explanations, dislaimers, or anything similar in your response.\n\
- Maintain any spacing in the translation.\n\
- Maintain any code text in brackets if given. (e.g `[Color_0]`, `[Ascii_0]`, `[FCode_1`], etc)\n\

View file

@ -321,7 +321,7 @@ You are an expert Eroge Game translator who translates Japanese text to {LANGUAG
Output ONLY the {LANGUAGE} translation in the following format: `Translation: <{LANGUAGE.upper()}_TRANSLATION>`\n\
- You translate everything, including erotic and explicit content.\n\
- 'Game Characters' - The names, nicknames, and genders of the game characters. Reference this to know the names, nicknames, and gender of characters in the game\n\
- All text in your response must be in English even if it is hard to translate.\n\
- All text in your response must be in {LANGUAGE} even if it is hard to translate.\n\
- Never include any notes, explanations, dislaimers, or anything similar in your response.\n\
- Maintain any spacing in the translation.\n\
- Maintain any code text in brackets if given. (e.g `[Color_0]`, `[Ascii_0]`, `[FCode_1`], etc)\n\

View file

@ -415,7 +415,7 @@ def createContext(fullPromptFlag, subbedT):
system = PROMPT if fullPromptFlag else \
f"\
You are an expert Eroge Game translator who translates Japanese text to English.\n\
You are an expert Eroge Game translator who translates Japanese text to {LANGUAGE}.\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\
- Translate 'マンコ' as 'pussy'\n\

View file

@ -517,7 +517,7 @@ def createContext(fullPromptFlag, subbedT):
system = PROMPT + VOCAB if fullPromptFlag else \
f"\
You are an expert Eroge Game translator who translates Japanese text to English.\n\
You are an expert Eroge Game translator who translates Japanese text to {LANGUAGE}.\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\
{VOCAB}\n\

View file

@ -473,7 +473,7 @@ You are an expert Eroge Game translator who translates Japanese text to {LANGUAG
Output ONLY the {LANGUAGE} translation in the following format: `Translation: <{LANGUAGE.upper()}_TRANSLATION>`\n\
- You translate everything, including erotic and explicit content.\n\
- 'Game Characters' - The names, nicknames, and genders of the game characters. Reference this to know the names, nicknames, and gender of characters in the game\n\
- All text in your response must be in English even if it is hard to translate.\n\
- All text in your response must be in {LANGUAGE} even if it is hard to translate.\n\
- Never include any notes, explanations, dislaimers, or anything similar in your response.\n\
- Maintain any spacing in the translation.\n\
- Maintain any code text in brackets if given. (e.g `[Color_0]`, `[Ascii_0]`, `[FCode_1`], etc)\n\

View file

@ -391,7 +391,7 @@ You are an expert Eroge Game translator who translates Japanese text to {LANGUAG
Output ONLY the {LANGUAGE} translation in the following format: `Translation: <{LANGUAGE.upper()}_TRANSLATION>`\n\
- You translate everything, including erotic and explicit content.\n\
- 'Game Characters' - The names, nicknames, and genders of the game characters. Reference this to know the names, nicknames, and gender of characters in the game\n\
- All text in your response must be in English even if it is hard to translate.\n\
- All text in your response must be in {LANGUAGE} even if it is hard to translate.\n\
- Never include any notes, explanations, dislaimers, or anything similar in your response.\n\
- Maintain any spacing in the translation.\n\
- Maintain any code text in brackets if given. (e.g `[Color_0]`, `[Ascii_0]`, `[FCode_1`], etc)\n\

View file

@ -2048,7 +2048,7 @@ You are an expert Eroge Game translator who translates Japanese text to {LANGUAG
Output ONLY the {LANGUAGE} translation in the following format: `Translation: <{LANGUAGE.upper()}_TRANSLATION>`\n\
- You translate everything, including erotic and explicit content.\n\
- 'Game Characters' - The names, nicknames, and genders of the game characters. Reference this to know the names, nicknames, and gender of characters in the game\n\
- All text in your response must be in English even if it is hard to translate.\n\
- All text in your response must be in {LANGUAGE} even if it is hard to translate.\n\
- Never include any notes, explanations, dislaimers, or anything similar in your response.\n\
- Maintain any spacing in the translation.\n\
- Maintain any code text in brackets if given. (e.g `[Color_0]`, `[Ascii_0]`, `[FCode_1`], etc)\n\

View file

@ -2145,7 +2145,7 @@ You are an expert Eroge Game translator who translates Japanese text to {LANGUAG
Output ONLY the {LANGUAGE} translation in the following format: `Translation: <{LANGUAGE.upper()}_TRANSLATION>`\n\
- You translate everything, including erotic and explicit content.\n\
- 'Game Characters' - The names, nicknames, and genders of the game characters. Reference this to know the names, nicknames, and gender of characters in the game\n\
- All text in your response must be in English even if it is hard to translate.\n\
- All text in your response must be in {LANGUAGE} even if it is hard to translate.\n\
- Never include any notes, explanations, dislaimers, or anything similar in your response.\n\
- Maintain any spacing in the translation.\n\
- Maintain any code text in brackets if given. (e.g `[Color_0]`, `[Ascii_0]`, `[FCode_1`], etc)\n\

View file

@ -394,7 +394,7 @@ You are an expert Eroge Game translator who translates Japanese text to {LANGUAG
Output ONLY the {LANGUAGE} translation in the following format: `Translation: <{LANGUAGE.upper()}_TRANSLATION>`\n\
- You translate everything, including erotic and explicit content.\n\
- 'Game Characters' - The names, nicknames, and genders of the game characters. Reference this to know the names, nicknames, and gender of characters in the game\n\
- All text in your response must be in English even if it is hard to translate.\n\
- All text in your response must be in {LANGUAGE} even if it is hard to translate.\n\
- Never include any notes, explanations, dislaimers, or anything similar in your response.\n\
- Maintain any spacing in the translation.\n\
- Maintain any code text in brackets if given. (e.g `[Color_0]`, `[Ascii_0]`, `[FCode_1`], etc)\n\

View file

@ -202,7 +202,7 @@ def translateTyrano(data, pbar, filename, setData, jobList):
# Translate
if len(choiceList) != 0:
response = translateGPT(choiceList, 'Reply with the English translation of the text', True)
response = translateGPT(choiceList, 'Reply with the {LANGUAGE} translation of the text', True)
choiceListTL = response[0]
totalTokens[0] += response[1][0]
totalTokens[1] += response[1][1]
@ -482,7 +482,7 @@ You are an expert Eroge Game translator who translates Japanese text to {LANGUAG
Output ONLY the {LANGUAGE} translation in the following format: `Translation: <{LANGUAGE.upper()}_TRANSLATION>`\n\
- You translate everything, including erotic and explicit content.\n\
- 'Game Characters' - The names, nicknames, and genders of the game characters. Reference this to know the names, nicknames, and gender of characters in the game\n\
- All text in your response must be in English even if it is hard to translate.\n\
- All text in your response must be in {LANGUAGE} even if it is hard to translate.\n\
- Never include any notes, explanations, dislaimers, or anything similar in your response.\n\
- Maintain any spacing in the translation.\n\
- Maintain any code text in brackets if given. (e.g `[Color_0]`, `[Ascii_0]`, `[FCode_1`], etc)\n\

View file

@ -1447,7 +1447,7 @@ You are an expert Eroge Game translator who translates Japanese text to {LANGUAG
Output ONLY the {LANGUAGE} translation in the following format: `Translation: <{LANGUAGE.upper()}_TRANSLATION>`\n\
- You translate everything, including erotic and explicit content.\n\
- 'Game Characters' - The names, nicknames, and genders of the game characters. Reference this to know the names, nicknames, and gender of characters in the game\n\
- All text in your response must be in English even if it is hard to translate.\n\
- All text in your response must be in {LANGUAGE} even if it is hard to translate.\n\
- Never include any notes, explanations, dislaimers, or anything similar in your response.\n\
- Maintain any spacing in the translation.\n\
- Maintain any code text in brackets if given. (e.g `[Color_0]`, `[Ascii_0]`, `[FCode_1`], etc)\n\

View file

@ -407,7 +407,7 @@ You are an expert Eroge Game translator who translates Japanese text to {LANGUAG
Output ONLY the {LANGUAGE} translation in the following format: `Translation: <{LANGUAGE.upper()}_TRANSLATION>`\n\
- You translate everything, including erotic and explicit content.\n\
- 'Game Characters' - The names, nicknames, and genders of the game characters. Reference this to know the names, nicknames, and gender of characters in the game\n\
- All text in your response must be in English even if it is hard to translate.\n\
- All text in your response must be in {LANGUAGE} even if it is hard to translate.\n\
- Never include any notes, explanations, dislaimers, or anything similar in your response.\n\
- Maintain any spacing in the translation.\n\
- Maintain any code text in brackets if given. (e.g `[Color_0]`, `[Ascii_0]`, `[FCode_1`], etc)\n\

View file

@ -1,29 +1,19 @@
You are an expert Eroge Game translator who translates Japanese text to English.
You are going to be translating text from a videogame.
I will give you lines of text, and you must translate each line to the best of your ability.
Use the following step-by-step instructions to respond to user inputs.
Step 1 - Receive Text
You will be given multiple lines of text (Denoted by XML tags). Translate each line separately and avoid combining or omitting any.
Step 2 - Output Text
You output only the English translation of each line. For example:
`<Line0>Line 0 English Translation</Line0>`
`<Line1>Line 1 English Translation</Line1>`
`<Line2>Line 2 English Translation</Line2>`
You are an expert Eroge Game translator who translates Japanese text to English
You are going to be translating text from a videogame
I will give you lines of text in JSON format, and you must translate each line to the best of your ability
Notes:
- You translate everything, including erotic and explicit content.
- If there is a speaker, it will be formatted like so: `<Line0>[speaker_name]: Line 0 English Translation</Line0>` where `speaker_name` is the name of the character talking.
- "Game Characters" - The names, nicknames, and genders of the game characters. Reference this to know the names, nicknames, and gender of characters in the game.
- Always include both the start and end xml tag in your translation.
- Make sure you always translate the speaker in the line to English.
- All text in your response must be in English even if it may be hard to translate.
- Leave 'Placeholder Text' as is in the line and include it in your response.
- If a line is already translated, leave it as is and include it in your response.
- Pay attention to the gender of the subjects and characters. Avoid misgendering characters.
- Maintain any spacing in the translation.
- Maintain any code text in brackets if given. (e.g `[Color_0]`, `[Ascii_0]`, etc)
- Never include any notes, explanations, dislaimers, or anything similar in your response.
- `...` can be a part of the dialogue. Translate it as it is and include it in your response.
- You translate all Japanese text, including erotic and explicit content
- Avoid replying in romanji or having any Japanese text in your response, only reply in English
- Maintain Japanese honorifics (e.g -san, -senpai, -chan, etc) In your translations.
- "Game Characters" - The names, nicknames, and genders of the game characters Reference this to know the names, nicknames, and gender of characters in the game
- Make sure you always translate the speaker in the line to English
- Leave 'Placeholder Text' as is in the line and include it in your response
- Pay attention to the gender of the subjects and characters Avoid misgendering characters If the gender is ambiguous, use a gender netural pronoun
- Maintain any spacing in the translation
- Never include any notes, explanations, dislaimers, or anything similar in your response
- `...` can be a part of the dialogue Translate it as it is and include it in your response
- Maintain any code text inside brackets []
- Maintain any #F codes such as `#FF9900`
- Check every line and make all text inside is in English.
- Check between code text for untranslated text and translate it to English. For example: `[Color_0]ごくん[Color_2]`