Skip to content

VoVanRusLvSC2/Localization-Editor-SC2-KSP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Localization Editor SC2 KSP

Localization Editor SC2 KSP is a desktop editor for StarCraft II map and mod localization. It helps map makers open SC2 archives, compare language columns, translate missing text, apply SC2 glossary terminology, and save changes back into the correct .SC2Data/LocalizedData structure.

It is built for real SC2 projects, not only single text files:

  • Opens GameStrings.txt, ObjectStrings.txt, TriggerStrings.txt, GameHotkeys.txt, and custom localization .txt files.
  • Works with SC2Map, SC2Mod, and mpq archives.
  • Lets you switch between localization files inside the same archive without reopening the map.
  • Supports single-target translation or translating from one source language to all supported languages.
  • Uses editable StarCraft II glossaries so unit, ability, button, and common SC2 terms stay consistent.
  • Supports Google Translate Free, Google Cloud, DeepL, Gemini, SiliconFlow, Cloudflare Worker AI, and local LibreTranslate.

Releases

Current Installer

  • Current Windows installer build: 2.3
  • If an older build is installed, use the latest installer from Releases.

Quick Start

  1. Download the latest release.
  2. Install and launch the editor.
  3. Open your SC2Map / SC2Mod / mpq archive or a localization .txt file.
  4. If an archive contains several localization files, use the archive-file dropdown near the file name to switch between them.
  5. Select a source language, target language, and translation backend.
  6. Translate, review the table, then save.

Logs

Main application logs are rotating UTF-8 files:

  • Windows: %LOCALAPPDATA%\Localization Editor SC2 KSP\logs\app-0.log through app-4.log
  • Other OS: ~/.Localization_Editor_SC2_KSP/logs/app-0.log through app-4.log

Local LibreTranslate startup and repair logs are stored separately:

  • Windows: %LOCALAPPDATA%\LocalizationEditorSC2KSP\argos-runtime\startup-logs\lt-*.log
  • Other OS: ~/.localization-editor-argos-runtime/startup-logs/lt-*.log

When a severe exception is logged, the app creates error-report-*.txt in the main log folder and shows an in-app support window with vlencmanissc@gmail.com, the GitHub Issues URL, and the report path. It does not open Outlook, a browser, or any other external mail client automatically.

PowerShell examples:

Get-Content "$env:LOCALAPPDATA\Localization Editor SC2 KSP\logs\app-0.log" -Tail 120
Get-Content "$env:LOCALAPPDATA\Localization Editor SC2 KSP\logs\app-0.log" -Tail 80 -Wait
Get-Content "$env:LOCALAPPDATA\LocalizationEditorSC2KSP\argos-runtime\startup-logs\lt-*.log" -Tail 120

Publication Name Protection

StarCraft II publication names come from GameStrings.txt, key DocInfo/Name. The editor caches that key per map/archive next to the application:

  • preferred folder: publication-names next to Localization Editor SC2 KSP.exe
  • common per-user install example: %LOCALAPPDATA%\Programs\Localization Editor SC2 KSP\publication-names
  • fallback folder on Windows: %LOCALAPPDATA%\Localization Editor SC2 KSP\publication-names
  • cache file format: <map-or-mod-file-name>-<path-hash>.xml, for example crys_the_swarm_reborn-3218263ec1829ae4.xml

The cache uses a readable XML structure:

  • source stores the map file name/path, archive-relative file path, DocInfo/Name key, and update dates.
  • main-language stores the original publication name in the original localization language.
  • first-seen-titles stores the first detected map name for every language that existed in the map, with the first-save date.
  • translations stores the locked publication title and latest seen title for each translated language.

On later saves, the editor restores those locked DocInfo/Name values before writing the archive, so switching from DeepL to Google/Gemini/SiliconFlow cannot accidentally rename an already prepared publication. Old flat Java properties XML cache files are still readable and are rewritten to the new structured format on the next save.

Editable Glossaries After Install

The installer places editable glossary files in the application folder:

  • glossary next to Localization Editor SC2 KSP.exe
  • example: C:\Program Files\Localization Editor SC2 KSP\glossary

You can edit these files after installation without rebuilding the app.

Default files placed there:

  • sc2_word_glossary_KSP.txt
  • sc2_phrase_glossary_KSP.txt
  • Addition_UnitNames_Detailed_KSP.txt
  • Addition_Weapons_Detailed_KSP.txt
  • Addition_Abilities_Detailed_KSP.txt

On startup, the editor loads glossary files from that install-folder glossary first when they exist. For legacy installs, %LOCALAPPDATA%\Localization Editor SC2 KSP\glossary is still used as a fallback if present.

2.3 Notes

  • Discord invite now uses the same animated promo-button shell as the Boosty support button, with tighter spacing in Settings.
  • Table columns can now be resized manually by dragging the header edge with the mouse. Header sorting is disabled so repeated header clicks stay responsive.
  • Exact SC2 word and phrase glossary hits are applied before any translation API call, so canonical terms such as Roach Warren are not retranslated word by word.
  • AI translation prompts now treat short rows as SC2 entity/UI names and require exact glossary terms for official names while still allowing natural grammar around them.
  • Missing or unavailable translation API/key problems are treated as user configuration errors: they stay in the translation error overlay and logs, but do not show the manual support email dialog.
  • The phrase glossary remains editable after installation next to the EXE, so new official SC2 phrases can be added without rebuilding the app.

2.2 Notes

  • Installer keeps editable glossary files next to the installed EXE, so dictionary fixes can be made after installation.
  • Added sc2_phrase_glossary_KSP.txt with official SC2 multi-word terms, so phrases like Рассадник тараканов are translated as Roach Warren instead of being assembled from separate words.
  • Translation now detects mixed-language rows better, including Russian text already present in an enUS target column.
  • Word glossary now includes Research -> Исследование, and installed editable glossaries receive missing bundled word entries without overwriting user edits.
  • Save errors now explain missing, locked, or inaccessible SC2 archives instead of showing only a generic write failure.
  • Folder-based .SC2Map/.SC2Mod projects now save as folder projects, and the editor clears Windows read-only attributes on the write path before saving.
  • Error reporting now writes a local error-report-*.txt and shows manual support contact details without opening Outlook/browser automatically.
  • Long opened map/mod names now get full-name tooltips and better fitting in the green file badge.
  • Archive file switching keeps clearer spacing and shows the full internal localization path in tooltips.
  • The in-app file search clears automatically after opening a found folder.

2.1 Notes

  • Added archive file switching for common localization files inside one opened SC2 archive.
  • DeepL now auto-detects Free vs Pro API endpoints and uses DeepL-compatible language codes.
  • DeepL diagnostics now call out TLS/SSL/proxy/certificate problems when the API check fails before translation.
  • Failed translation startup now returns the main button to Translate instead of leaving a stale Save action.
  • DocInfo/Name publication titles are cached and locked per map so later translation-backend changes do not rename the published map.
  • AI prompt backends now receive stronger SC2 glossary hints and preserve frozen glossary placeholders.
  • Main word glossary now includes Creep -> Слизь and Nydus -> Нидус.
  • Logging locations are documented.

Dependencies

  • Java: JDK 17 (required)
  • Build tool: Maven (for source build)
  • OS: Windows desktop environment (primary target)

Main Maven dependencies used by the app:

  • JavaFX: javafx-controls, javafx-fxml, javafx-media (22.0.1)
  • HTTP/API: retrofit2, okhttp logging-interceptor
  • JSON/Parsing: gson, jackson, jsoup
  • Language detection: langdetect, tika-core
  • Archive and native integration: jmpq3, commons-compress, jna, jna-platform

Optional local translation backend dependencies:

  • Python 3.10+
  • libretranslate
  • minisbd (if startup reports download_models import error, upgrade it)

Translation Backends and AI Info

For backend details, pricing notes, and setup hints (Google, DeepL, Cloudflare, SiliconFlow, LibreTranslate, etc.), see:

  • README_TRANSLATE.txt

Optional: Local LibreTranslate

If you want to use LibreTranslate locally:

python -m pip install --upgrade pip
python -m pip install libretranslate
python -m libretranslate.main --host 127.0.0.1 --port 5000 --disable-web-ui

If startup fails with: ImportError: cannot import name 'download_models' from 'minisbd'

run:

python -m pip install --upgrade minisbd
python -m libretranslate.main --host 127.0.0.1 --port 5000 --disable-web-ui

Health check:

  • http://127.0.0.1:5000/languages

The app expects LibreTranslate at:

  • http://127.0.0.1:5000

About

A localization editor for StarCraft II maps and mods. Opens GameStrings.txt files, translates them into selected languages, and automatically saves them into the correct SC2Data directory structure.

Resources

License

Stars

13 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors