From 541ffcd55b4aa65c89625526c0d4969940c41418 Mon Sep 17 00:00:00 2001 From: dazedanon Date: Fri, 20 Mar 2026 17:56:46 -0500 Subject: [PATCH] mroe changes for ace --- gui/workflow_tab.py | 167 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 153 insertions(+), 14 deletions(-) diff --git a/gui/workflow_tab.py b/gui/workflow_tab.py index 3dc9e9e..e619cf4 100644 --- a/gui/workflow_tab.py +++ b/gui/workflow_tab.py @@ -1092,6 +1092,86 @@ class WorkflowTab(QWidget): "List any Japanese strings you detected but chose NOT to translate, with a one-line reason.\n" ) + _ACE_SCRIPTS_TRANSLATE_PROMPT = ( + "You are helping me translate a Japanese RPGMaker Ace (VX Ace) game.\n" + "The game's scripts are in the ace_json/scripts/ folder as .rb files.\n" + "I need you to translate visible Japanese strings inside these Ruby scripts\n" + "without breaking any game logic or script functionality.\n" + "\n" + "A vocab.txt glossary file has been attached. Use it as your primary reference\n" + "for character names, worldbuilding terms, and their approved English translations.\n" + "Any Japanese name or term that appears in the glossary must be translated\n" + "exactly as specified there — do not invent alternative spellings.\n" + "\n" + "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n" + "## WHAT TO TRANSLATE\n" + "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n" + "\n" + "Only translate string literals that are directly shown to the player at runtime.\n" + "These typically appear as:\n" + " - Strings passed to msgbox, msgbox_p, print, p\n" + " - Labels and text in Window or Scene classes rendered to screen\n" + " - draw_text / draw_item calls with a Japanese string literal\n" + " - Default UI label text (menu names, button labels, status window text)\n" + " - Battle log messages, notifications, popup strings\n" + " - Help or description text shown in help windows\n" + "\n" + "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n" + "## WHAT MUST NOT BE TRANSLATED\n" + "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n" + "\n" + "CRITICAL — translating the following will break the game:\n" + "\n" + " 1. Strings used as hash keys, method names, or symbol equivalents.\n" + " Example: vocab[\"HP\"] = \"体力\" \u2192 translate \"体力\" but NOT the key \"HP\"\n" + "\n" + " 2. Strings used as internal identifiers compared with == or used in case/when:\n" + " - Actor/class/skill/item names used as lookup strings\n" + " - Script-internal state names or flag strings\n" + " Example: if type == \"スキル\" \u2192 do NOT translate \"スキル\"\n" + "\n" + " 3. File paths, filenames, font names, colour strings, URLs.\n" + "\n" + " 4. Regular expressions, format strings used with sprintf or % operator\n" + " where the placeholders must stay in the same position.\n" + " (You may translate the human-readable parts but keep %s / %d / %1 etc intact.)\n" + "\n" + " 5. Script class names, module names, method names, constants.\n" + "\n" + " 6. Any string that is read back elsewhere in the scripts with an exact match.\n" + "\n" + "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n" + "## HOW TO IDENTIFY SAFE STRINGS\n" + "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n" + "\n" + "Before translating a string, ask yourself:\n" + " \u2714 Is this value ever displayed directly to the player as text?\n" + " \u2714 Is it purely a display string, not compared or looked up anywhere?\n" + " \u2714 Would changing it break no conditional logic or data lookup?\n" + "\n" + "If all three are YES, it is safe to translate.\n" + "When in doubt, SKIP IT — untranslated Japanese is better than a broken game.\n" + "\n" + "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n" + "## OUTPUT FORMAT\n" + "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n" + "\n" + "For each .rb file that needed changes, provide the full translated file content.\n" + "Only change the string values identified as safe above.\n" + "Preserve all Ruby syntax, indentation, comments, and structure exactly.\n" + "\n" + "After all files, output a translation summary:\n" + "\n" + "### Translations Made\n" + "List each change in this format:\n" + " File: