Skip to content

Commit ce2ca46

Browse files
committed
turn a bit more config strings to translations
1 parent 0d739dc commit ce2ca46

2 files changed

Lines changed: 29 additions & 12 deletions

File tree

src/main/java/dev/dfonline/codeclient/config/Config.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,13 @@ public YetAnotherConfigLib getLibConfig() {
156156
.title(Text.literal("CodeClient Config"))
157157
//<editor-fold desc="General">
158158
.category(ConfigCategory.createBuilder()
159-
.name(Text.literal("General"))
159+
.name(Text.translatable("codeclient.config.tab.general"))
160160
.tooltip(Text.literal("General always specific options for CodeClient"))
161161
.option(Option.createBuilder(boolean.class)
162-
.name(Text.literal("CodeClient API"))
162+
.name(Text.translatable("codeclient.config.api"))
163163
.description(OptionDescription.createBuilder()
164-
.text(Text.literal("Allows external apps to add code to your plot."))
165-
.text(Text.literal("(requires restart)"))
164+
.text(Text.translatable("codeclient.config.api.description"))
165+
.text(Text.translatable("codeclient.config.requires_restart"))
166166
.build())
167167
.binding(
168168
false,
@@ -173,9 +173,9 @@ public YetAnotherConfigLib getLibConfig() {
173173
.flag(OptionFlag.GAME_RESTART)
174174
.build())
175175
.option(Option.createBuilder(CharSetOption.class)
176-
.name(Text.literal("Read Charset"))
176+
.name(Text.translatable("codeclient.config.read_charset"))
177177
.description(OptionDescription.createBuilder()
178-
.text(Text.literal("Can fix artifacts in ActionDump loading."))
178+
.text(Text.translatable("codeclient.config.read_charset.description"))
179179
.build())
180180
.binding(
181181
CharSetOption.UTF_8,
@@ -186,9 +186,9 @@ public YetAnotherConfigLib getLibConfig() {
186186
.controller(nodeOption -> () -> new EnumController<>(nodeOption, CharSetOption.class))
187187
.build())
188188
.option(Option.createBuilder(CharSetOption.class)
189-
.name(Text.literal("Save Charset"))
189+
.name(Text.translatable("codeclient.config.save_charset"))
190190
.description(OptionDescription.createBuilder()
191-
.text(Text.literal("When getting the actiondump get it in a needed format."), Text.literal("Default recommended."))
191+
.text(Text.translatable("codeclient.config.save_charset.description"), Text.translatable("codeclient.config.default_recommended"))
192192
.build())
193193
.binding(
194194
CharSetOption.UTF_8,
@@ -209,8 +209,8 @@ public YetAnotherConfigLib getLibConfig() {
209209
.controller(TickBoxControllerBuilder::create)
210210
.build())
211211
.option(Option.createBuilder(boolean.class)
212-
.name(Text.literal("Auto Focus Search"))
213-
.description(OptionDescription.of(Text.literal("When opening the Code Palette (").append(Text.keybind("key.codeclient.codepalette")).append(") automatically select the search bar."), Text.literal("This is disabled because it interferes with navigation binds.")))
212+
.name(Text.translatable("codeclient.config.auto_focus_search"))
213+
.description(OptionDescription.of(Text.translatable("codeclient.config.auto_focus_search.description", Text.keybind("key.codeclient.codepalette")), Text.translatable("codeclient.config.auto_focus_search.description.2")))
214214
.binding(
215215
false,
216216
() -> FocusSearch,
@@ -229,9 +229,9 @@ public YetAnotherConfigLib getLibConfig() {
229229
.controller(TickBoxControllerBuilder::create)
230230
.build())
231231
.option(Option.createBuilder(boolean.class)
232-
.name(Text.literal("CCDBUG"))
232+
.name(Text.translatable("codeclient.config.ccdbug"))
233233
.description(OptionDescription.createBuilder()
234-
.text(Text.literal("Toggle CCDBUG, which is a variable and entity watcher for debugging."))
234+
.text(Text.translatable("codeclient.config.ccdbug.description"))
235235
.build())
236236
.binding(
237237
true,

src/main/resources/assets/codeclient/lang/en_us.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,27 @@
1010
"key.codeclient.tp.backward": "Teleport Backwards",
1111
"key.codeclient.open_action": "Open Action",
1212

13+
"codeclient.config.tab.general": "General",
14+
15+
"codeclient.config.api": "CodeClient API",
16+
"codeclient.config.api.description": "Allows external apps to add code to your plot.",
17+
"codeclient.config.read_charset": "Read Charset",
18+
"codeclient.config.read_charset.description": "Can fix artifacts in ActionDump loading.",
19+
"codeclient.config.save_charset": "Save Charset",
20+
"codeclient.config.save_charset.description": "When getting the actiondump get it in a needed format.",
21+
22+
"codeclient.config.requires_restart": "(requires restart)",
23+
"codeclient.config.default_recommended": "Default recommended.",
24+
1325
"codeclient.config.dev_for_build": "Dev mode for build",
1426
"codeclient.config.dev_for_build.description": "Uses dev mode instead of build mode, clearing your inventory and teleporting you.",
27+
"codeclient.config.auto_focus_search": "Auto Focus Search",
28+
"codeclient.config.auto_focus_search.description": "When opening the Code Palette (%s) automatically select the search bar.",
29+
"codeclient.config.auto_focus_search.description.2": "This is disabled because it interferes with navigation binds.",
1530
"codeclient.config.chat_edits_vars": "Auto edit values",
1631
"codeclient.config.chat_edits_vars.description": "Opening chat whilst holding a value will automatically put the contents in chat.",
32+
"codeclient.config.ccdbug": "CCDBUG",
33+
"codeclient.config.ccdbug.description": "Toggle CCDBUG, which is a variable and entity watcher for debugging.",
1734
"codeclient.config.insert_overlay": "Click to insert value",
1835
"codeclient.config.insert_overlay.description": "Click on an empty slot in a code chest to insert a value.",
1936
"codeclient.config.param_ghosts": "Parameter Ghosts",

0 commit comments

Comments
 (0)