Translate Babele JSON files for Foundry VTT using OpenAI.
- Recursively scan exported JSON files for translatable content
- Detect only supported translatable fields
- Return structured
TranslationEntryobjects with file, JSON path, field name, and source text - Leave the JSON files unchanged
- name
- description
- caption
- content
- text
- label
- hint
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtpython3 test_scanner.py /path/to/babele-exportIf no path is provided, the script prompts for one.
from pathlib import Path
from foundry_translator.scanner import Scanner
scanner = Scanner(Path("/path/to/babele-export"))
documents, entries = scanner.scan()
for entry in entries:
print(entry.file, entry.path, entry.field, entry.source)🚧 In development