Skip to content

Commit a4030b1

Browse files
committed
feature: FTBQuestsの翻訳でchapter_groupsも翻訳するように
1 parent 033a887 commit a4030b1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/init.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
FTBQUESTS_DIR1 = Path('./kubejs/assets/kubejs/lang')
77
FTBQUESTS_DIR2 = Path('./kubejs/assets/ftbquests/lang')
88
FTBQUESTS_DIR3 = Path('./config/ftbquests/quests/chapters')
9+
FTBQUESTS_DIR4 = Path('./config/ftbquests/quests/chapter_groups.snbt')
910

1011
MAX_ATTEMPTS = 5
1112

1213
USER = 'Y-RyuZU'
1314
REPO = 'MinecraftModsLocalizer'
14-
VERSION = 'v2.0.5'
15+
VERSION = 'v2.0.6'

src/quests.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import re
55
import shutil
66

7-
from init import FTBQUESTS_DIR1, FTBQUESTS_DIR2, FTBQUESTS_DIR3, BETTERQUESTING_DIR
7+
from init import FTBQUESTS_DIR1, FTBQUESTS_DIR2, FTBQUESTS_DIR3, FTBQUESTS_DIR4, BETTERQUESTING_DIR
88
from provider import provide_log_directory
99
from prepare import extract_map_from_lang, extract_map_from_json, prepare_translation
1010

@@ -106,6 +106,10 @@ def translate_ftbquests():
106106
logging.info(f"en_us.json not found in {FTBQUESTS_DIR1}, translating snbt files in directory...")
107107
nbt_files = list(FTBQUESTS_DIR3.glob('*.snbt'))
108108

109+
backup_file = backup_directory / FTBQUESTS_DIR4.name
110+
shutil.copy(FTBQUESTS_DIR4, backup_file)
111+
translate_ftbquests_from_snbt(FTBQUESTS_DIR4)
112+
109113
for file in nbt_files:
110114
backup_file = backup_directory / file.name
111115
shutil.copy(file, backup_file)

0 commit comments

Comments
 (0)