From 76d4d112ac2892fa8b99dcc90e823ed4597ff371 Mon Sep 17 00:00:00 2001 From: NetheriteMiner <88792142+NetheriteMiner@users.noreply.github.com> Date: Mon, 30 Oct 2023 13:53:17 -0400 Subject: Fix: Enable translator and fix modifying links (#559) Enable translator and fix modifying links #559 --- .../hannibal2/skyhanni/config/commands/Commands.kt | 23 +++++++++++----------- .../skyhanni/config/features/ChatConfig.java | 20 +++++++++---------- 2 files changed, 22 insertions(+), 21 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/config') diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index ea77de371..1e32ff718 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.data.GuiEditManager import at.hannibal2.skyhanni.data.PartyAPI import at.hannibal2.skyhanni.features.bingo.BingoCardDisplay import at.hannibal2.skyhanni.features.bingo.BingoNextStepHelper +import at.hannibal2.skyhanni.features.chat.Translator import at.hannibal2.skyhanni.features.combat.ghostcounter.GhostUtil import at.hannibal2.skyhanni.features.commands.PartyCommands import at.hannibal2.skyhanni.features.event.diana.BurrowWarpHelper @@ -162,13 +163,13 @@ object Commands { "shfarmingprofile", "Look up the farming profile from yourself or another player on elitebot.dev" ) { FarmingWeightDisplay.lookUpCommand(it) } -// registerCommand( -// "shcopytranslation", -// " \n" + -// "Requires the Chat > Translator feature to be enabled.\n" + -// "Copies the translation for a given message to your clipboard. " + -// "Language codes are at the end of the translation when you click on a message." -// ) { Translator.fromEnglish(it) } + registerCommand( + "shcopytranslation", + " \n" + + "Requires the Chat > Translator feature to be enabled.\n" + + "Copies the translation for a given message to your clipboard. " + + "Language codes are at the end of the translation when you click on a message." + ) { Translator.fromEnglish(it) } registerCommand( "shmouselock", "Lock/Unlock the mouse so it will no longer rotate the player (for farming)" @@ -297,10 +298,10 @@ object Commands { registerCommand("shsendcontests", "") { GardenNextJacobContest.shareContestConfirmed(it) } registerCommand("shwords", "Opens the config list for modifying visual words") { openVisualWords() } registerCommand("shstopaccountupgradereminder", "") { AccountUpgradeReminder.disable() } -// registerCommand( -// "shsendtranslation", -// "Respond with a translation of the message that the user clicks" -// ) { Translator.toEnglish(it) } + registerCommand( + "shsendtranslation", + "Respond with a translation of the message that the user clicks" + ) { Translator.toEnglish(it) } } private fun shortenedCommands() { diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java index d400c279f..309ce04a7 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/ChatConfig.java @@ -186,14 +186,14 @@ public class ChatConfig { @FeatureToggle public boolean hideSacksChange = false; -// @Expose -// @ConfigOption( -// name = "Translator", -// desc = "Click on a message to translate it into English. " + -// "Use §e/shcopytranslation§7 to get the translation from English. " + -// "§cTranslation is not guaranteed to be 100% accurate." -// ) -// @ConfigEditorBoolean -// @FeatureToggle -// public boolean translator = false; + @Expose + @ConfigOption( + name = "Translator", + desc = "Click on a message to translate it into English. " + + "Use §e/shcopytranslation§7 to get the translation from English. " + + "§cTranslation is not guaranteed to be 100% accurate." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean translator = false; } -- cgit