This mod adds a feature to split lang files for better version control, also adds some utility commands.
Mod is available on CurseForge.
splitSplits the lang file into their own category type and for quests, tasks and quest links they are grouped by chapters.
lang/
├─ en_us/
│ ├─ chapters/
│ │ ├─ chapter1.snbt # Contains quest, task and quest links ids
│ │ ├─ chapter2.snbt
│ │ └─ chapter3.snbt
│ ├─ chapter.snbt # Chapter names
│ ├─ chapter_group.snbt # Chapter group names
│ ├─ file.snbt # Quest book name
│ └─ reward_table.snbt # Reward table names
└─ en_us.snbt # Original file, it updates from split files when loaded/reloaded
replace_unmerged: boolean (you mostly want to use false, unless you know you want to overwrite the previously generated and non-merged split files)
locale: locale code (ie: pt_br, zh_ch, ko_kr)
/langsplitter split <replace_unmerged> [<locale>]
# If you don't provide a locale it will split every lang available.
fill_missing_translationFills missing lang entries based on en_us locale and runs the split.
Note: You can check at debug.log all the new entries that was added.
/langsplitter fill_missing_translation <replace_unmerged> <locale>
purge_mergedWhen you load or reload the quest and there are available split files to be read, they are merged into the original file and after that renamed to .snbt_merged. You can use this command to purge them from the folder if you don't like seeing those.
/langsplitter purge_merged
# FTB Quests Lang Splitter
# ignore original lang files like en_us.snbt
config/ftbquests/quests/lang/*.snbt
# ignore recovery files
config/ftbquests/quests/lang/recovery/*.snbt
# ignore already merged files
config/ftbquests/quests/lang/**/*.snbt_merged
For translators:
fill_missing_translation command to generate the files containing all entries./ftbquests reload to merge your changessplit command again to generate the file.snbt_merged and after done, rename back to .snbtsplit one last time and PR the relevant files (run purge_merged if they are on the way, but a proper .gitignore should deal with it).For maintainers:
split command and commit the files.About the recovery folder:
recovery containing the following:en_us_<timestamp>.snbt will be generated (ie: en_us_1755120819.snbt) {
"chapters/basic_armor.snbt": {
quest.004D61425172324F.quest_subtitle: {
new: "This is my new subtitle"
old: "This is the old subtitle"
}
}
}
This project is licensed under the MIT License.
You can reach me on All The Mods Discord with @Uncandango, you can also open your issue on Github or comment on the mod comment's section on CurseForge.
YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications. YourKit is the creator of YourKit Java Profiler, YourKit .NET Profiler, and YourKit YouMonitor.