Skip to content

Commit 4bafddd

Browse files
committed
chore: translate sgui controls
part of #47
1 parent c08f936 commit 4bafddd

File tree

4 files changed

+53
-10
lines changed

4 files changed

+53
-10
lines changed

src/main/java/de/rubixdev/enchantedshulkers/screen/VanillaBigAugmentedGui.java

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package de.rubixdev.enchantedshulkers.screen;
22

3+
import de.rubixdev.enchantedshulkers.Mod;
34
import eu.pb4.sgui.api.ClickType;
45
import eu.pb4.sgui.api.elements.GuiElementBuilder;
56
import eu.pb4.sgui.api.gui.SimpleGui;
@@ -296,19 +297,19 @@ private void updateSlots() {
296297
}
297298
}
298299

299-
addScrollButton(0, Text.literal("Scroll up one"), -1, scroll <= 0, up_1);
300-
addScrollButton(1, Text.literal("Scroll down one"), 1, scroll >= maxScroll(), down_1);
301-
addScrollButton(2, Text.literal("Scroll up two"), -2, scroll <= 0, up_2);
302-
addScrollButton(3, Text.literal("Scroll down two"), 2, scroll >= maxScroll(), down_2);
303-
addScrollButton(4, Text.literal("Scroll up three"), -3, scroll <= 0, up_3);
304-
addScrollButton(5, Text.literal("Scroll down three"), 3, scroll >= maxScroll(), down_3);
305-
addScrollButton(6, Text.literal("Scroll to top"), -rows, scroll <= 0, up_stop);
306-
addScrollButton(7, Text.literal("Scroll to bottom"), rows, scroll >= maxScroll(), down_stop);
300+
addScrollButton(0, Text.translatable(Mod.MOD_ID + ".ui.big_augment_sgui.scroll_up_one"), -1, scroll <= 0, up_1);
301+
addScrollButton(1, Text.translatable(Mod.MOD_ID + ".ui.big_augment_sgui.scroll_down_one"), 1, scroll >= maxScroll(), down_1);
302+
addScrollButton(2, Text.translatable(Mod.MOD_ID + ".ui.big_augment_sgui.scroll_up_two"), -2, scroll <= 0, up_2);
303+
addScrollButton(3, Text.translatable(Mod.MOD_ID + ".ui.big_augment_sgui.scroll_down_two"), 2, scroll >= maxScroll(), down_2);
304+
addScrollButton(4, Text.translatable(Mod.MOD_ID + ".ui.big_augment_sgui.scroll_up_three"), -3, scroll <= 0, up_3);
305+
addScrollButton(5, Text.translatable(Mod.MOD_ID + ".ui.big_augment_sgui.scroll_down_three"), 3, scroll >= maxScroll(), down_3);
306+
addScrollButton(6, Text.translatable(Mod.MOD_ID + ".ui.big_augment_sgui.scroll_to_top"), -rows, scroll <= 0, up_stop);
307+
addScrollButton(7, Text.translatable(Mod.MOD_ID + ".ui.big_augment_sgui.scroll_to_bottom"), rows, scroll >= maxScroll(), down_stop);
307308

308309
setSlot(actionsRow() + 8, GuiElementBuilder.from(Items.PLAYER_HEAD.getDefaultStack())
309310
.setSkullOwner(maximized ? minimize.getLeft() : maximize.getLeft(), maximized ? minimize.getRight() : maximize.getRight(), null)
310-
.setName(Text.literal(maximized ? "Minimize" : "Maximize").formatted(Formatting.GREEN))
311-
.setLore(maximized ? List.of() : List.of(Text.literal("Items cannot be interacted with when maximized").formatted(Formatting.GRAY)))
311+
.setName(Text.translatable(Mod.MOD_ID + ".ui.big_augment_sgui." + (maximized ? "minimize" : "maximize")).formatted(Formatting.GREEN))
312+
.setLore(maximized ? List.of() : List.of(Text.translatable(Mod.MOD_ID + ".ui.big_augment_sgui.maximize.desc").formatted(Formatting.GRAY)))
312313
.setCallback(() -> {
313314
click();
314315
new VanillaBigAugmentedGui(player, shulkerInventory, rows, getTitle(), color, !maximized, false).open();

src/main/resources/assets/enchantedshulkers/lang/de_de.yml

+14
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,20 @@ enchantedshulkers.options:
4545
weakerVacuum.desc: Vakuum benötigt Gegenstände der selben Art bereits Container. Das selbe Verhalten kann für die Saugen Verzauberung mit "strongerSiphon" eingeschaltet werden.
4646
maxAugmentLevel.desc: Das höchste Level für die Erweitern Verzauberung. Für die beste Erfahrung führe "/reload" aus nach dem Ändern dieses Werts.
4747

48+
enchantedshulkers.ui:
49+
big_augment_sgui:
50+
scroll_up_one: Scrolle eine Reihe hoch
51+
scroll_up_two: Scrolle zwei Reihen hoch
52+
scroll_up_three: Scrolle drei Reihen hoch
53+
scroll_to_top: Scrolle zum Anfang
54+
scroll_down_one: Scrolle eine Reihe runter
55+
scroll_down_two: Scrolle zwei Reihen runter
56+
scroll_down_three: Scrolle drei Reihen runter
57+
scroll_to_bottom: Scrolle zum Ende
58+
maximize: Maximieren
59+
maximize.desc: Wenn maximiert ist kann nicht mit Gegenständen interagiert werden
60+
minimize: Minimieren
61+
4862
text.autoconfig.enchantedshulkers:
4963
title: Enchanted Shulkers Client Einstellungen
5064
option:

src/main/resources/assets/enchantedshulkers/lang/en_us.yml

+14
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,20 @@ enchantedshulkers.options:
4545
weakerVacuum.desc: Require the same item to already be present in the container. The same behavior can be enabled for the Siphon enchantment with "strongerSiphon".
4646
maxAugmentLevel.desc: The maximum level for the Augment enchantment. For the best experience execute "/reload" after changing this value.
4747

48+
enchantedshulkers.ui:
49+
big_augment_sgui:
50+
scroll_up_one: Scroll up one
51+
scroll_up_two: Scroll up two
52+
scroll_up_three: Scroll up three
53+
scroll_to_top: Scroll to top
54+
scroll_down_one: Scroll down one
55+
scroll_down_two: Scroll down two
56+
scroll_down_three: Scroll down three
57+
scroll_to_bottom: Scroll to bottom
58+
maximize: Maximize
59+
maximize.desc: Items cannot be interacted with when maximized
60+
minimize: Minimize
61+
4862
text.autoconfig.enchantedshulkers:
4963
title: Enchanted Shulkers Client Settings
5064
option:

src/main/resources/assets/enchantedshulkers/lang/zh_cn.yml

+14
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,20 @@ enchantedshulkers.options:
4545
# weakerVacuum.desc: Require the same item to already be present in the container. The same behavior can be enabled for the Siphon enchantment with "strongerSiphon".
4646
# maxAugmentLevel.desc: The maximum level for the Augment enchantment. For the best experience execute "/reload" after changing this value.
4747

48+
enchantedshulkers.ui:
49+
big_augment_sgui:
50+
# scroll_up_one: Scroll up one
51+
# scroll_up_two: Scroll up two
52+
# scroll_up_three: Scroll up three
53+
# scroll_to_top: Scroll to top
54+
# scroll_down_one: Scroll down one
55+
# scroll_down_two: Scroll down two
56+
# scroll_down_three: Scroll down three
57+
# scroll_to_bottom: Scroll to bottom
58+
# maximize: Maximize
59+
# maximize.desc: Items cannot be interacted with when maximized
60+
# minimize: Minimize
61+
4862
text.autoconfig.enchantedshulkers:
4963
title: 附魔潜影盒 - 客户端设置
5064
option:

0 commit comments

Comments
 (0)