FTB Quest Localization Tool - Extract and manage quest strings for easy localization
Project description
FTB Quest Localizer
English | 中文
A tool for extracting and managing FTB Quest localization strings. Supports both new format (1.20+, with lang/ directory) and old format (pre-1.20, inline strings in chapter files).
Installation
From PyPI:
pip install ftb-quest-localizer
From source (using uv):
git clone https://github.com/zack-zzq/FTBQuestLocalizerPython
cd FTBQuestLocalizerPython
uv sync
Usage
The tool provides three commands: split, extract, and merge.
split — New Format (1.20+)
Split SNBT lang files from lang/en_us/ into per-chapter JSON files for translation:
ftb-quest-localizer split -i <ftbquests/quests> -o <output_dir>
This reads the lang/en_us/ directory and outputs one JSON file per chapter, plus separate files for chapter groups, reward tables, etc.
extract — Old Format (pre-1.20)
Extract translatable strings directly from chapter SNBT files:
ftb-quest-localizer extract -i <ftbquests/quests> -o <output_dir> -m <modpack_name>
This replaces inline strings with translation keys and generates an en_us.json language file.
merge — Merge Translations Back
Merge translated JSON files back into SNBT lang directory structure:
ftb-quest-localizer merge -i <json_dir> -o <output_lang_dir>
This recreates the same structure as lang/en_us/ (chapter.snbt, chapter_group.snbt, chapters/*.snbt, etc.) for direct use in a modpack.
As a Python Library
from ftb_quest_localizer.splitter import split_lang_files
from ftb_quest_localizer.extractor import extract_quest_strings
from ftb_quest_localizer.merger import merge_json_to_lang_dir
# New format: split SNBT lang files into JSON
split_lang_files("path/to/ftbquests/quests", "output/")
# Old format: extract strings from chapter files
extract_quest_strings("path/to/ftbquests/quests", "output/", "modpack_name")
# Merge translated JSON back into SNBT
merge_json_to_lang_dir("translated_json/", "lang/zh_cn/")
How It Works
New Format (1.20+)
- Reads SNBT lang files from
lang/en_us/(chapter, quest, task, reward entries) - Flattens multi-line descriptions into numbered keys
- Groups entries by chapter and outputs per-chapter JSON files
- Merge reconstructs the original directory structure from translated JSON
Old Format (pre-1.20)
- Parses chapter SNBT files using
snbtlib - Extracts
title,subtitle,description,text, and hover text fields - Replaces original text with translation keys
- Generates JSON language files with the original text
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ftb_quest_localizer-2.0.4.tar.gz.
File metadata
- Download URL: ftb_quest_localizer-2.0.4.tar.gz
- Upload date:
- Size: 24.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
479307fa46d4ab00962ba6d091115146369ec5ecfb45c5d0310cb93a5049e6b3
|
|
| MD5 |
de104ac401fb9db745935011f14d41d6
|
|
| BLAKE2b-256 |
ab77210145c78a5333ef9c01254e88f5b1fd1c40589d22d9830e1f8dd00112a1
|
Provenance
The following attestation bundles were made for ftb_quest_localizer-2.0.4.tar.gz:
Publisher:
publish-to-pypi.yml on zack-zzq/FTBQuestLocalizerPython
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ftb_quest_localizer-2.0.4.tar.gz -
Subject digest:
479307fa46d4ab00962ba6d091115146369ec5ecfb45c5d0310cb93a5049e6b3 - Sigstore transparency entry: 995168838
- Sigstore integration time:
-
Permalink:
zack-zzq/FTBQuestLocalizerPython@c24cd5878736f7115846a0e1dfe03c3cff385760 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/zack-zzq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@c24cd5878736f7115846a0e1dfe03c3cff385760 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ftb_quest_localizer-2.0.4-py3-none-any.whl.
File metadata
- Download URL: ftb_quest_localizer-2.0.4-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c4431d2b4bd47284981470b7d20bb01f266db08ecb2f91c6c079778da950096
|
|
| MD5 |
b8e40d8a64366da3de055d14f7ccd057
|
|
| BLAKE2b-256 |
438e69522167470a21a77bbe573ceee9537a2072a2764d01a90e315fc859105a
|
Provenance
The following attestation bundles were made for ftb_quest_localizer-2.0.4-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on zack-zzq/FTBQuestLocalizerPython
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ftb_quest_localizer-2.0.4-py3-none-any.whl -
Subject digest:
4c4431d2b4bd47284981470b7d20bb01f266db08ecb2f91c6c079778da950096 - Sigstore transparency entry: 995168841
- Sigstore integration time:
-
Permalink:
zack-zzq/FTBQuestLocalizerPython@c24cd5878736f7115846a0e1dfe03c3cff385760 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/zack-zzq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@c24cd5878736f7115846a0e1dfe03c3cff385760 -
Trigger Event:
push
-
Statement type: