- C# 100%
|
|
||
|---|---|---|
| .github/workflows | ||
| game | ||
| mods | ||
| scripts | ||
| TranslationReloader | ||
| .gitignore | ||
| modicon.png | ||
| mods.json | ||
| README.md | ||
| translators.txt | ||
Polish Translations Pack for Vintage Story
Community-maintained Polish translations for Vintage Story mods.
Requirements
- .NET 10.0 SDK (or higher) - for full build pipeline with scripts
- .NET 8.0 SDK - only if building just the DLL without using the scripts
VINTAGE_STORYenvironment variable pointing to game installation
$env:VINTAGE_STORY = "C:\Program Files\Vintagestory"
Building
# Test build (no history)
dotnet scripts\mods.cs build test-$(Get-Date -Format "yyyyMMdd-HHmmss") --no-history
# Release build
dotnet scripts\mods.cs build <version>
# Examples
dotnet scripts\mods.cs build 1.0.0
dotnet scripts\mods.cs build 1.2.0-pre.16
How It Works
The pack includes TranslationReloader.dll which:
- Uses
ExecuteOrder() = double.MaxValueto run last - Moves translation pack Origin to end of Origins list via reflection
- Reloads all translations - our files load last and override older versions
Weblate Integration
This repository is synchronized with Weblate for collaborative translation management:
- Translation files (
mods/*/assets/*/lang/pl.json) are edited directly on Weblate - Translators contribute Polish translations via the Weblate web interface
- Weblate automatically commits translation changes back to this repository
- Each build includes the latest translations that were committed by Weblate
- Supported mods are defined in
mods.json- this list determines which mods are tracked for translations
Workflow:
dotnet scripts\mods.cs updatedownloads mods from ModDB and extracts theiren.jsonfiles (English strings)- Weblate detects new English strings and makes them available for translation
- Translators edit Polish translations on Weblate
- Weblate commits translation changes directly to this repository
dotnet scripts\mods.cs build <version>packages allpl.jsonfiles with the mod pack
Technical Detail: The mod includes TranslationReloader.dll which ensures Polish translations override any older versions from mods by reordering asset origins and reloading translations after all mods have loaded.
Commands
Fix JSON formatting
dotnet scripts\mods.cs fix
Converts all JSON files in mods/ folder to LF-only line endings and reformats them with 4-space indentation.
Update mods from ModDB
dotnet scripts\mods.cs update
Downloads and extracts en.json files (English strings) from mods listed in mods.json. Only updates if new versions are detected. Creates/updates:
en.jsonfiles extracted from mods (stored inmods/<mod-name>/assets/*/lang/)mods.json- Updates mod version numbers and last updated datesupdate-log.txt- Summary of updated mods (only created if changes detected)
Note: pl.json files are NOT touched by this command - they must be translated separately via Weblate or manually.
Build package
dotnet scripts\mods.cs build <version> [--no-history]
Parameters:
<version>- Version string (e.g.,1.0.0,test-20251106)--no-history- Skip saving to build history (optional, recommended for test builds)
Creates/updates:
PolishTranslationsPack_v<version>.zip- Packaged mod with all translationschangelog_<version>.txt- Detailed changelogbuild-history.json- Build history tracking (with--no-historyflag)
Examples:
# Test build
dotnet scripts\mods.cs build test-$(Get-Date -Format "yyyyMMdd-HHmmss") --no-history
# Release build
dotnet scripts\mods.cs build 1.0.0
Configuration Files
translators.txt
Contains the list of translator authors credited in the mod pack. Each name on a separate line.
Used by: build command - authors from this file are added to modinfo.json when packaging the mod. If the file doesn't exist or is empty, "Community Translators" is used as default.
Example:
alex_dev
marina
toma
mods.json
Database of supported mods with their ModDB IDs, versions, and last update dates.
Used by: update command - determines which mods to download from ModDB.
Format:
[
{
"name": "Mod Display Name",
"modid": "moddb_id",
"version": "1.2.3",
"lastUpdated": "2025-11-20"
}
]