From bef3f08a716a734467041a39a1c777705041e8fd Mon Sep 17 00:00:00 2001 From: Ranzu <66495944+Ranzuu@users.noreply.github.com> Date: Tue, 7 Jul 2026 14:51:57 +0200 Subject: [PATCH 1/3] Localize Config --- .../modularui/ModularUIConfig.java | 24 ++++++++--------- .../assets/modularui2/lang/en_US.lang | 26 +++++++++++++++++++ 2 files changed, 38 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/cleanroommc/modularui/ModularUIConfig.java b/src/main/java/com/cleanroommc/modularui/ModularUIConfig.java index 2cc2179a0..0cfbac2e2 100644 --- a/src/main/java/com/cleanroommc/modularui/ModularUIConfig.java +++ b/src/main/java/com/cleanroommc/modularui/ModularUIConfig.java @@ -7,43 +7,43 @@ @Config(modid = ModularUI.ID) public class ModularUIConfig { - @Config.Comment("Amount of pixels scrolled") + @Config.LangKey("modularui2.config.default_scroll_speed") @Config.RangeInt(min = 1, max = 100) public static int defaultScrollSpeed = 30; - @Config.Comment("If progress bar should step in texture pixels or screen pixels. (Screen pixels are way smaller and therefore smoother)") + @Config.LangKey("modularui2.config.smooth_progress_bar") public static boolean smoothProgressBar = false; // Default direction - @Config.Comment("Default tooltip position around the widget or its panel.") + @Config.LangKey("modularui2.config.tooltip_pos") public static RichTooltip.Pos tooltipPos = RichTooltip.Pos.NEXT_TO_MOUSE; - @Config.Comment("If true, pressing ESC key in the text field will restore the last text instead of confirming current one.") + @Config.LangKey("modularui2.config.esc_restore_last_text") public static boolean escRestoreLastText = false; - @Config.Comment("If true, display the slot overlay when the slot is occupied.") + @Config.LangKey("modularui2.config.show_slot_overlay") public static boolean showSlotOverlay = true; - @Config.Comment("If true, widget outlines and widget information will be drawn.") + @Config.LangKey("modularui2.config.gui_debug_mode") public static boolean guiDebugMode = ModularUI.isDevEnv; - @Config.Comment("If true and not specified otherwise, screens will try to use the 'vanilla_dark' theme.") + @Config.LangKey("modularui2.config.use_dark_theme_by_default") public static boolean useDarkThemeByDefault = false; - @Config.Comment("Debug text color. Prefix Hex values with a #. Common colors can be referred by their name.") + @Config.LangKey("modularui2.config.debug_text_color") public static String debugTextColor = "#FFAAAAAA"; - @Config.Comment("Debug outline color. Prefix Hex values with a #. Common colors can be referred by their name.") + @Config.LangKey("modularui2.config.debug_outline_color") public static String debugOutlineColor = "#DCB42873"; + @Config.LangKey("modularui2.config.enable_test_guis") @Config.RequiresMcRestart - @Config.Comment("Enables a test block, test item with a test gui and opening a gui by right clicking a diamond.") public static boolean enableTestGuis = ModularUI.isDevEnv; + @Config.LangKey("modularui2.config.enable_test_overlays") @Config.RequiresMcRestart - @Config.Comment("Enables a test overlay shown on title screen and watermark shown on every GuiContainer.") public static boolean enableTestOverlays = false; - //@Config.Comment("If true, vanilla tooltip will be replaced with MUI's RichTooltip") + //@Config.LangKey("modularui2.config.use_rich_tooltips") //public static boolean replaceVanillaTooltips = false; } diff --git a/src/main/resources/assets/modularui2/lang/en_US.lang b/src/main/resources/assets/modularui2/lang/en_US.lang index e8c77e56f..e17a3b67c 100644 --- a/src/main/resources/assets/modularui2/lang/en_US.lang +++ b/src/main/resources/assets/modularui2/lang/en_US.lang @@ -37,3 +37,29 @@ modularui2.debug.slot_number=§7Slot Number: §3%d modularui2.debug.shift_click_priority=§7Shift-Click Priority: §3%d modularui2.debug.disabled=§cDISABLED modularui2.debug.hovered=§7Hovered: §6%s + +# Config +modularui2.config.default_scroll_speed=Scroll Speed +modularui2.config.default_scroll_speed.tooltip=Amount of pixels scrolled +modularui2.config.smooth_progress_bar=Smooth Progress Bar +modularui2.config.smooth_progress_bar.tooltip=If progress bar should step in texture pixels or screen pixels.\n(Screen pixels are way smaller and therefore smoother) +modularui2.config.tooltip_pos=Tooltip Position +modularui2.config.tooltip_pos.tooltip=Default tooltip position around the widget or its panel. +modularui2.config.esc_restore_last_text=ESC Restores Last Text +modularui2.config.esc_restore_last_text.tooltip=If true, pressing ESC key in the text field will restore the last text instead of confirming current one. +modularui2.config.show_slot_overlay=Show Slot Overlay +modularui2.config.show_slot_overlay.tooltip=If true, display the slot overlay when the slot is occupied. +modularui2.config.gui_debug_mode=GUI Debug Mode +modularui2.config.gui_debug_mode.tooltip=If true, widget outlines and widget information will be drawn. +modularui2.config.use_dark_theme_by_default=Use Dark Theme By Default +modularui2.config.use_dark_theme_by_default.tooltip=If true and not specified otherwise, screens will try to use the 'vanilla_dark' theme. +modularui2.config.debug_text_color=Debug Text Color +modularui2.config.debug_text_color.tooltip=Debug text color. Prefix Hex values with a #. Common colors can be referred by their name. +modularui2.config.debug_outline_color=Debug Outline Color +modularui2.config.debug_outline_color.tooltip=Debug outline color. Prefix Hex values with a #. Common colors can be referred by their name. +modularui2.config.enable_test_guis=Enable Test GUIs +modularui2.config.enable_test_guis.tooltip=Enables a test block, test item with a test gui and opening a gui by right clicking a diamond. +modularui2.config.enable_test_overlays=Enable Test Overlays +modularui2.config.enable_test_overlays.tooltip=Enables a test overlay shown on title screen and watermark shown on every GuiContainer. +# modularui2.config.use_rich_tooltips=Enable RichTooltip +# modularui2.config.use_rich_tooltips.tooltip=If true, vanilla tooltip will be replaced with MUI's RichTooltip \ No newline at end of file From ffd7cd3d4dfba9c050f856c51193823b250ad52e Mon Sep 17 00:00:00 2001 From: Ranzu <66495944+Ranzuu@users.noreply.github.com> Date: Tue, 7 Jul 2026 14:59:23 +0200 Subject: [PATCH 2/3] Restore Config.Comment - because this is used for the config file still --- .../com/cleanroommc/modularui/ModularUIConfig.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/com/cleanroommc/modularui/ModularUIConfig.java b/src/main/java/com/cleanroommc/modularui/ModularUIConfig.java index 0cfbac2e2..15e68c881 100644 --- a/src/main/java/com/cleanroommc/modularui/ModularUIConfig.java +++ b/src/main/java/com/cleanroommc/modularui/ModularUIConfig.java @@ -8,40 +8,51 @@ public class ModularUIConfig { @Config.LangKey("modularui2.config.default_scroll_speed") + @Config.Comment("Amount of pixels scrolled") @Config.RangeInt(min = 1, max = 100) public static int defaultScrollSpeed = 30; @Config.LangKey("modularui2.config.smooth_progress_bar") + @Config.Comment("If progress bar should step in texture pixels or screen pixels. (Screen pixels are way smaller and therefore smoother)") public static boolean smoothProgressBar = false; // Default direction @Config.LangKey("modularui2.config.tooltip_pos") + @Config.Comment("Default tooltip position around the widget or its panel.") public static RichTooltip.Pos tooltipPos = RichTooltip.Pos.NEXT_TO_MOUSE; @Config.LangKey("modularui2.config.esc_restore_last_text") + @Config.Comment("If true, pressing ESC key in the text field will restore the last text instead of confirming current one.") public static boolean escRestoreLastText = false; @Config.LangKey("modularui2.config.show_slot_overlay") + @Config.Comment("If true, display the slot overlay when the slot is occupied.") public static boolean showSlotOverlay = true; @Config.LangKey("modularui2.config.gui_debug_mode") + @Config.Comment("If true, widget outlines and widget information will be drawn.") public static boolean guiDebugMode = ModularUI.isDevEnv; @Config.LangKey("modularui2.config.use_dark_theme_by_default") + @Config.Comment("If true and not specified otherwise, screens will try to use the 'vanilla_dark' theme.") public static boolean useDarkThemeByDefault = false; @Config.LangKey("modularui2.config.debug_text_color") + @Config.Comment("Debug text color. Prefix Hex values with a #. Common colors can be referred by their name.") public static String debugTextColor = "#FFAAAAAA"; @Config.LangKey("modularui2.config.debug_outline_color") + @Config.Comment("Debug outline color. Prefix Hex values with a #. Common colors can be referred by their name.") public static String debugOutlineColor = "#DCB42873"; @Config.LangKey("modularui2.config.enable_test_guis") @Config.RequiresMcRestart + @Config.Comment("Enables a test block, test item with a test gui and opening a gui by right clicking a diamond.") public static boolean enableTestGuis = ModularUI.isDevEnv; @Config.LangKey("modularui2.config.enable_test_overlays") @Config.RequiresMcRestart + @Config.Comment("Enables a test overlay shown on title screen and watermark shown on every GuiContainer.") public static boolean enableTestOverlays = false; //@Config.LangKey("modularui2.config.use_rich_tooltips") From 0e9bc48098a1c507d94bb5f57fd986e56e496768 Mon Sep 17 00:00:00 2001 From: Ranzu <66495944+Ranzuu@users.noreply.github.com> Date: Tue, 7 Jul 2026 15:00:00 +0200 Subject: [PATCH 3/3] missed the commented one --- src/main/java/com/cleanroommc/modularui/ModularUIConfig.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/cleanroommc/modularui/ModularUIConfig.java b/src/main/java/com/cleanroommc/modularui/ModularUIConfig.java index 15e68c881..c5eacd9cb 100644 --- a/src/main/java/com/cleanroommc/modularui/ModularUIConfig.java +++ b/src/main/java/com/cleanroommc/modularui/ModularUIConfig.java @@ -56,5 +56,6 @@ public class ModularUIConfig { public static boolean enableTestOverlays = false; //@Config.LangKey("modularui2.config.use_rich_tooltips") + //@Config.Comment("If true, vanilla tooltip will be replaced with MUI's RichTooltip") //public static boolean replaceVanillaTooltips = false; }