GalTransl/GalTransl
支持GPT-4/Claude/Deepseek/Sakura等大语言模型的Galgame自动化翻译解决方案 Automated translation solution for visual novels supporting GPT-4/Claude/Deepseek/Sakura
GalTransl – AI‑powered automatic translation for visual novels (galgames)
What it is – GalTransl is a desktop application that automates the whole pipeline of translating Japanese galgames into Chinese using large language models such as GPT‑4, Claude, DeepSeek, Sakura, etc. It stitches together script extraction, prompt‑engineered LLM translation, dictionary handling, caching, and re‑injection so that users can create a complete “translation patch” without writing code.
Key features
- Graphical desktop UI (Tauri + React) – no command‑line needed, supports dark mode, custom backgrounds, multi‑project management.
- LLM back‑ends – works with GPT‑4, Claude, DeepSeek, Sakura and other OpenAI‑compatible APIs; prompt engineering improves translation quality.
- GPT dictionary – a special dictionary that feeds character bios, name mappings and troublesome terms to the LLM each request, ensuring consistent handling of names, pronouns and jargon.
- Pre‑/post‑translation dictionaries – rule‑based string replacements before or after LLM output, with conditional logic to avoid over‑replacements.
- Automatic caching & resume – translation results are saved in a cache; you can edit the cache to fix errors and resume without re‑translating everything.
- Full pipeline integration – includes tools for extracting scripts (GARbro, KirikiriTools, SExtractor, etc.), injecting translated text back into the game, and handling both “no‑pack” and packed formats.
- Subtitle & document support – can translate .srt, .lrc, .vtt, mtool JSON, t++ Excel, epub, etc.
- Local models – provides links to GalTransl‑7B‑v3.5 and GalTransl‑14B‑v3 models on HuggingFace for on‑device translation (requires ≥6 GB VRAM).
Installation / quick start
- Desktop version (recommended) – download the latest zip from the Releases page, unzip, and double‑click
GalTransl Desktop.exe. The app launches a backend service automatically; no Python, Node or Rust installation is required. - Developer / CLI version – clone the repo, install Python 3.11.9, run
pip install -r requirements.txt(or the provided batch file), install Node.js and Rust, then runrun_desktop_dev.bat(orrun_GalTransl_terminal.batfor CLI). Detailed steps are in the “环境准备” section of the README.
Typical workflow
- Identify & unpack the game’s resource archive (using GARbro, KirikiriTools, etc.).
- Extract the script to a
name‑messageJSON format (the GUI toolGalTransl_DumpInjector.exehelps with this). - Create a project in the desktop UI, point it at the extracted JSON, and configure an LLM backend (API key, endpoint, model).
- Set up dictionaries – add a project‑specific GPT dictionary for character names and any recurring terms, plus any pre/post dictionaries you need.
- Start translation – the UI shows live progress; results are cached automatically.
- Review & fix – open the
transl_cachefiles (JSON) in VS Code or EmEditor, editpre_zh/proofread_zhfields, then rerun the project to regenerate the finaljson_cn. - Inject the translated JSON back into the game scripts using the provided injector tools, then test the game (or use “no‑pack” loading if the engine supports it).
Licensing – The repository is released under the license shown by the badge in the README (the exact SPDX identifier is displayed on the GitHub page). The project also hosts two HuggingFace model checkpoints (GalTransl‑7B‑v3.5 and GalTransl‑14B‑v3) under their respective licenses.
GalTransl is essentially a bridge between visual‑novel script handling and modern LLM translation, offering a user‑friendly GUI and a suite of dictionary‑based quality‑control tools to make AI‑assisted fan‑translation more reliable and reproducible.
Related
- Project
- Project
- Project
- Project