From b15e0f82fdc41563e18bd65ba8aeeb46b3beeaa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=9D=E5=A4=8F=E5=90=8C=E5=AD=A6?= <2411829240@qq.com> Date: Sun, 8 Sep 2024 17:39:14 +0800 Subject: [PATCH] add the exit prompt message i18n --- .../mixin/mixins/early/MixinMinecraft_ConfirmExit.java | 3 ++- src/main/resources/assets/dreamcraft/lang/en_US.lang | 1 + src/main/resources/assets/dreamcraft/lang/zh_CN.lang | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/dreammaster/mixin/mixins/early/MixinMinecraft_ConfirmExit.java b/src/main/java/com/dreammaster/mixin/mixins/early/MixinMinecraft_ConfirmExit.java index bbfd5646c..52ce8eeb8 100644 --- a/src/main/java/com/dreammaster/mixin/mixins/early/MixinMinecraft_ConfirmExit.java +++ b/src/main/java/com/dreammaster/mixin/mixins/early/MixinMinecraft_ConfirmExit.java @@ -7,6 +7,7 @@ import javax.swing.JOptionPane; import net.minecraft.client.Minecraft; +import net.minecraft.client.resources.I18n; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Unique; @@ -47,7 +48,7 @@ public class MixinMinecraft_ConfirmExit { final ImageIcon imageIcon = resource == null ? null : new ImageIcon(resource); final int result = JOptionPane.showConfirmDialog( frame, - "Are you sure you want to exit the game ?", + I18n.format("dreamcraft.gui.quitmessage"), Refstrings.NAME, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, diff --git a/src/main/resources/assets/dreamcraft/lang/en_US.lang b/src/main/resources/assets/dreamcraft/lang/en_US.lang index 6c1dcfcb8..18c58e3d5 100644 --- a/src/main/resources/assets/dreamcraft/lang/en_US.lang +++ b/src/main/resources/assets/dreamcraft/lang/en_US.lang @@ -1773,3 +1773,4 @@ item.tconstruct.manual.weaponry.part_materials=\n\nValid Shaft Materials:\n* Sti item.tconstruct.manual.weaponry.bolts=\n\nBolts:\nCrafting bolts is a delicate process. First you need a core in the form of a tool rod.\nTake this tool rod to a smeltery and put it into a Casting Table. Pour some metal onto it to coat the tip with a more damaging material.\nAfter this process, add a fletching and your bolts are ready to be used.\n\nSince the bolts consist of a harder core and tip they carry more weight than regular arrows, making them perfect to fight armored targets. dreamcraft.mobsinfocompat.limitedropcount=Drops only %s times per person +dreamcraft.gui.quitmessage=Are you sure you want to exit the game ? \ No newline at end of file diff --git a/src/main/resources/assets/dreamcraft/lang/zh_CN.lang b/src/main/resources/assets/dreamcraft/lang/zh_CN.lang index a95fabf41..1630724f1 100644 --- a/src/main/resources/assets/dreamcraft/lang/zh_CN.lang +++ b/src/main/resources/assets/dreamcraft/lang/zh_CN.lang @@ -667,4 +667,5 @@ tc.aspect.help.custom1=平衡的事物 tc.aspect.help.custom2=扭曲的思想 tc.aspect.help.custom3=新事物的起始 tc.aspect.help.custom4=宇宙 -tc.aspect.help.custom5=荣耀 \ No newline at end of file +tc.aspect.help.custom5=荣耀 +dreamcraft.gui.quitmessage=你确定要退出游戏吗? \ No newline at end of file