aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/config/features
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/chat/ChatConfig.java12
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/chat/TranslatorConfig.java37
2 files changed, 40 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/chat/ChatConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/chat/ChatConfig.java
index f9e64f1e0..6a1d129a2 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/chat/ChatConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/chat/ChatConfig.java
@@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.config.features.chat;
import at.hannibal2.skyhanni.config.FeatureToggle;
import com.google.gson.annotations.Expose;
import io.github.notenoughupdates.moulconfig.annotations.Accordion;
+import io.github.notenoughupdates.moulconfig.annotations.Category;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDraggableList;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorKeybind;
@@ -104,16 +105,9 @@ public class ChatConfig {
@FeatureToggle
public boolean hideSacksChange = false;
+ @Category(name = "Translator", desc = "Chat translator settings.")
@Expose
- @ConfigOption(
- name = "Translator",
- desc = "Click on a message to translate it to English.\n" +
- "Use §e/shcopytranslation§7 to translate from English.\n" +
- "§cTranslation is not guaranteed to be 100% accurate."
- )
- @ConfigEditorBoolean
- @FeatureToggle
- public boolean translator = false;
+ public TranslatorConfig translator = new TranslatorConfig();
@Expose
@ConfigOption(name = "SkyBlock XP in Chat", desc = "Send the SkyBlock XP messages into the chat.")
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/chat/TranslatorConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/chat/TranslatorConfig.java
new file mode 100644
index 000000000..648afbd87
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/chat/TranslatorConfig.java
@@ -0,0 +1,37 @@
+package at.hannibal2.skyhanni.config.features.chat;
+
+import at.hannibal2.skyhanni.config.FeatureToggle;
+import at.hannibal2.skyhanni.features.chat.translation.TranslatableLanguage;
+import com.google.gson.annotations.Expose;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDropdown;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorText;
+import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;
+import io.github.notenoughupdates.moulconfig.observer.Property;
+
+public class TranslatorConfig {
+
+ @Expose
+ @ConfigOption(
+ name = "Translate On Click",
+ desc = "Click on a message to translate it to English.\n" +
+ "Use §e/shcopytranslation§7 to translate from English.\n" +
+ "§cTranslation is not guaranteed to be 100% accurate."
+ )
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public boolean translateOnClick = false;
+
+ @ConfigOption(name = "Language Name", desc = "The name of the language selected below. Note that languages marked as unknown might still be supported.")
+ @Expose
+ @ConfigEditorDropdown
+ public Property<TranslatableLanguage> languageName = Property.of(TranslatableLanguage.ENGLISH);
+
+ @Expose
+ @ConfigOption(
+ name = "Language Code",
+ desc = "Enter a language code here to translate on chat click into another language. " +
+ "E.g. `es` for spanish or 'de' for german. Empty for english.")
+ @ConfigEditorText
+ public Property<String> languageCode = Property.of("en");
+}