From b43a42b74fe2de2b5b074693bf18f9be266e835d Mon Sep 17 00:00:00 2001 From: DarkKronicle Date: Wed, 10 Nov 2021 14:33:01 -0700 Subject: [PATCH] Fixing translations --- .../advancedchathud/config/gui/SharingScreen.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/github/darkkronicle/advancedchathud/config/gui/SharingScreen.java b/src/main/java/io/github/darkkronicle/advancedchathud/config/gui/SharingScreen.java index 869112b..0d85537 100644 --- a/src/main/java/io/github/darkkronicle/advancedchathud/config/gui/SharingScreen.java +++ b/src/main/java/io/github/darkkronicle/advancedchathud/config/gui/SharingScreen.java @@ -13,6 +13,7 @@ import fi.dy.masa.malilib.gui.GuiBase; import fi.dy.masa.malilib.gui.GuiTextFieldGeneric; import fi.dy.masa.malilib.gui.Message; +import fi.dy.masa.malilib.gui.button.IButtonActionListener; import fi.dy.masa.malilib.util.StringUtils; import io.github.darkkronicle.advancedchatcore.gui.buttons.NamedSimpleButton; import io.github.darkkronicle.advancedchathud.AdvancedChatHud; @@ -58,8 +59,11 @@ public void init() { this.addTextField(text, null); this.addButton( - new NamedSimpleButton(x, y, "advancedchat.gui.button.importtab"), - (button, mouseButton) -> importTab()); + x, y, "advancedchat.gui.button.importtab", (button, mouseButton) -> importTab()); + } + + private void addButton(int x, int y, String translation, IButtonActionListener listener) { + this.addButton(new NamedSimpleButton(x, y, StringUtils.translate(translation)), listener); } public void importTab() {