From 27a4e86732029ef4788f93c264444b85fc4aa0f6 Mon Sep 17 00:00:00 2001 From: iouter <3155186831@qq.com> Date: Mon, 19 Jul 2021 15:03:01 +0800 Subject: add lang key about dimension and fix a localization issue --- .../plugin/gregtech5/PluginGT5Base.java | 2 +- .../gwyog/gtneioreplugin/util/DimensionHelper.java | 18 ++++------ .../assets/gtneioreplugin/lang/en_US.lang | 40 ++++++++++++++++++---- .../assets/gtneioreplugin/lang/zh_CN.lang | 40 ++++++++++++++++++---- 4 files changed, 75 insertions(+), 25 deletions(-) (limited to 'src/main') diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java index 88775c3e14..00107e12c1 100644 --- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java +++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java @@ -19,7 +19,7 @@ public class PluginGT5Base extends PluginBase { protected boolean ttDisplayed = false; protected static String getLocalizedNameForItem(Materials aMaterial, String aFormat) { - return String.format(aFormat.replace("%s", "%temp").replace("%material", "%s"), aMaterial.mDefaultLocalName).replace("%temp", "%s"); + return String.format(aFormat.replace("%s", "%temp").replace("%material", "%s"), aMaterial.mLocalizedName).replace("%temp", "%s"); } protected static int calculateMaxW(List L) { diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/DimensionHelper.java b/src/main/java/pers/gwyog/gtneioreplugin/util/DimensionHelper.java index 13f9b02545..e3d59e4d08 100644 --- a/src/main/java/pers/gwyog/gtneioreplugin/util/DimensionHelper.java +++ b/src/main/java/pers/gwyog/gtneioreplugin/util/DimensionHelper.java @@ -3,6 +3,7 @@ package pers.gwyog.gtneioreplugin.util; import java.util.Arrays; import java.util.HashMap; import java.util.List; +import net.minecraft.client.resources.I18n; public class DimensionHelper { @@ -94,15 +95,9 @@ public class DimensionHelper { s = s.trim(); for (int i = 0; i < DimNameDisplayed.length; i++) { if (s.equals(DimNameDisplayed[i])) { - s = DimName[i].replaceAll("GalacticraftCore_", "").replaceAll("GalacticraftMars_", "").replaceAll("GalaxySpace_", "").replaceAll("Vanilla_", "Vanilla "); - if (s.equals("Twilight")) - s = "Twilight Forrest"; - else if (s.equals("Underdark")) - s = "Deep Dark"; - else if (s.equals("EndAsteroid")) - s = "Far End Asteroids"; - - switch (s) { + s = I18n.format("gtnop.world." + DimName[i].replaceAll("GalacticraftCore_", "").replaceAll("GalacticraftMars_", "").replaceAll("GalaxySpace_", "").replaceAll("Vanilla_", "Vanilla ")); + String k = DimName[i].replaceAll("GalacticraftCore_", "").replaceAll("GalacticraftMars_", "").replaceAll("GalaxySpace_", "").replaceAll("Vanilla_", "Vanilla "); + switch (k) { case "Moon": s = s + " (T1)"; break; @@ -140,7 +135,6 @@ public class DimensionHelper { s = s + " (T7)"; break; case "Deep Dark": - case "CentauriBb": case "CentauriA": case "VegaB": case "BarnardC": @@ -150,7 +144,7 @@ public class DimensionHelper { s = s + " (T8)"; break; } - + dims[j] = s; } } @@ -161,4 +155,4 @@ public class DimensionHelper { public static List convertCondensedStringToToolTip(String line) { return tooltipBuffer.computeIfAbsent(line, (String tmp) -> computeString(line)); } -} +} \ No newline at end of file diff --git a/src/main/resources/assets/gtneioreplugin/lang/en_US.lang b/src/main/resources/assets/gtneioreplugin/lang/en_US.lang index a02ecb0b58..e17206d995 100644 --- a/src/main/resources/assets/gtneioreplugin/lang/en_US.lang +++ b/src/main/resources/assets/gtneioreplugin/lang/en_US.lang @@ -35,12 +35,40 @@ gtnop.nei.genPositionInfo=In the center of each chunk # world names -gtnop.world.overworld.name=Overworld -gtnop.world.nether.name=Nether -gtnop.world.end.name=End -gtnop.world.moon.name=Moon -gtnop.world.mars.name=Mars -gtnop.world.asteroid.name=GalactiCraft Asteroid +gtnop.world.Overworld=Overworld +gtnop.world.Nether=Nether +gtnop.world.TheEnd=TheEnd +gtnop.world.Twilight=Twilight Forrest +gtnop.world.EndAsteroid=Far End Asteroids +gtnop.world.Moon=Moon +gtnop.world.Mars=Mars +gtnop.world.Phobos=Phobos +gtnop.world.Deimos=Deimos +gtnop.world.Asteroids=Asteroids +gtnop.world.Ceres=Ceres +gtnop.world.Europa=Europa +gtnop.world.Ganymede=Ganymede +gtnop.world.Callisto=Callisto +gtnop.world.Io=Io +gtnop.world.Venus=Venus +gtnop.world.Mercury=Mercury +gtnop.world.Enceladus=Enceladus +gtnop.world.Titan=Titan +gtnop.world.Miranda=Miranda +gtnop.world.Oberon=Oberon +gtnop.world.Proteus=Proteus +gtnop.world.Triton=Triton +gtnop.world.Pluto=Pluto +gtnop.world.Kuiperbelt=Kuiperbelt +gtnop.world.Haumea=Haumea +gtnop.world.MakeMake=MakeMake +gtnop.world.CentauriA=CentauriA +gtnop.world.VegaB=VegaB +gtnop.world.BarnardC=BarnardC +gtnop.world.BarnardE=BarnardE +gtnop.world.BarnardF=BarnardF +gtnop.world.TcetiE=TcetiE +gtnop.world.Underdark=Deep Dark # biome names diff --git a/src/main/resources/assets/gtneioreplugin/lang/zh_CN.lang b/src/main/resources/assets/gtneioreplugin/lang/zh_CN.lang index 28b037420e..d3e5a2e32d 100644 --- a/src/main/resources/assets/gtneioreplugin/lang/zh_CN.lang +++ b/src/main/resources/assets/gtneioreplugin/lang/zh_CN.lang @@ -35,12 +35,40 @@ gtnop.nei.genPositionInfo=各个区块的正中心 # world names -gtnop.world.overworld.name=主世界 -gtnop.world.nether.name=下界 -gtnop.world.end.name=末地 -gtnop.world.moon.name=月球 -gtnop.world.mars.name=火星 -gtnop.world.asteroid.name=星系mod小行星带 +gtnop.world.Overworld=主世界 +gtnop.world.Nether=下界 +gtnop.world.TheEnd=末地 +gtnop.world.Twilight=暮色森林 +gtnop.world.EndAsteroid=末地小行星 +gtnop.world.Moon=月球 +gtnop.world.Mars=火星 +gtnop.world.Phobos=火卫一 +gtnop.world.Deimos=火卫二 +gtnop.world.Asteroids=小行星带 +gtnop.world.Ceres=谷神星 +gtnop.world.Europa=木卫二 +gtnop.world.Ganymede=木卫三 +gtnop.world.Callisto=木卫四 +gtnop.world.Io=木卫一 +gtnop.world.Venus=金星 +gtnop.world.Mercury=水星 +gtnop.world.Enceladus=土卫二 +gtnop.world.Titan=土卫六 +gtnop.world.Miranda=天卫五 +gtnop.world.Oberon=天卫四 +gtnop.world.Proteus=海卫八 +gtnop.world.Triton=海卫一 +gtnop.world.Pluto=冥王星 +gtnop.world.Kuiperbelt=柯伊伯带 +gtnop.world.Haumea=妊神星 +gtnop.world.MakeMake=鸟神星 +gtnop.world.CentauriA=半人马Bb +gtnop.world.VegaB=织女B +gtnop.world.BarnardC=巴纳德C +gtnop.world.BarnardE=巴纳德E +gtnop.world.BarnardF=巴纳德F +gtnop.world.TcetiE=鲸鱼座T星E +gtnop.world.Underdark=漆黑世界 # biome names -- cgit From c8206f57b2e775c3fa01911ef312a37583fbe065 Mon Sep 17 00:00:00 2001 From: iouter <3155186831@qq.com> Date: Mon, 19 Jul 2021 20:24:07 +0800 Subject: fix Deep Dark --- src/main/java/pers/gwyog/gtneioreplugin/util/DimensionHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/DimensionHelper.java b/src/main/java/pers/gwyog/gtneioreplugin/util/DimensionHelper.java index e3d59e4d08..75b227d8a4 100644 --- a/src/main/java/pers/gwyog/gtneioreplugin/util/DimensionHelper.java +++ b/src/main/java/pers/gwyog/gtneioreplugin/util/DimensionHelper.java @@ -134,7 +134,7 @@ public class DimensionHelper { case "MakeMake": s = s + " (T7)"; break; - case "Deep Dark": + case "Underdark": case "CentauriA": case "VegaB": case "BarnardC": -- cgit From 0fbf2ad3adfe223c38a46b27c3a5dfc3ab4b879e Mon Sep 17 00:00:00 2001 From: iouter <3155186831@qq.com> Date: Tue, 20 Jul 2021 16:53:02 +0800 Subject: add "Vanilla EndAsteroids" and delete vein names in zh_CN --- .../assets/gtneioreplugin/lang/en_US.lang | 1 + .../assets/gtneioreplugin/lang/zh_CN.lang | 50 +--------------------- 2 files changed, 3 insertions(+), 48 deletions(-) (limited to 'src/main') diff --git a/src/main/resources/assets/gtneioreplugin/lang/en_US.lang b/src/main/resources/assets/gtneioreplugin/lang/en_US.lang index e17206d995..39a8d53e6d 100644 --- a/src/main/resources/assets/gtneioreplugin/lang/en_US.lang +++ b/src/main/resources/assets/gtneioreplugin/lang/en_US.lang @@ -40,6 +40,7 @@ gtnop.world.Nether=Nether gtnop.world.TheEnd=TheEnd gtnop.world.Twilight=Twilight Forrest gtnop.world.EndAsteroid=Far End Asteroids +gtnop.world.Vanilla EndAsteroids=Vanilla EndAsteroids gtnop.world.Moon=Moon gtnop.world.Mars=Mars gtnop.world.Phobos=Phobos diff --git a/src/main/resources/assets/gtneioreplugin/lang/zh_CN.lang b/src/main/resources/assets/gtneioreplugin/lang/zh_CN.lang index d3e5a2e32d..ce0fe22f00 100644 --- a/src/main/resources/assets/gtneioreplugin/lang/zh_CN.lang +++ b/src/main/resources/assets/gtneioreplugin/lang/zh_CN.lang @@ -40,6 +40,7 @@ gtnop.world.Nether=下界 gtnop.world.TheEnd=末地 gtnop.world.Twilight=暮色森林 gtnop.world.EndAsteroid=末地小行星 +gtnop.world.Vanilla EndAsteroids=原版末地小行星 gtnop.world.Moon=月球 gtnop.world.Mars=火星 gtnop.world.Phobos=火卫一 @@ -82,51 +83,4 @@ gtnop.ore.null.name=无 # vein types gtnop.ore.vein.name=矿脉 gtnop.ore.asteroid.name=小行星 -gtnop.ore.custom.name=自定义 - - -# vein names -# gregtech5.09 -gtnop.ore.mix.naquadah=硅岩 -gtnop.ore.mix.lignite=褐煤 -gtnop.ore.mix.coal=煤 -gtnop.ore.mix.magnetite=磁铁 -gtnop.ore.mix.gold=金 -gtnop.ore.mix.iron=铁 -gtnop.ore.mix.cassiterite=锡石 -gtnop.ore.mix.tetrahedrite=黝铜 -gtnop.ore.mix.netherquartz=下届石英 -gtnop.ore.mix.sulfur=硫 -gtnop.ore.mix.copper=铜 -gtnop.ore.mix.bauxite=铝土 -gtnop.ore.mix.salts=岩盐 -gtnop.ore.mix.redstone=红石 -gtnop.ore.mix.soapstone=皂石 -gtnop.ore.mix.nickel=镍 -gtnop.ore.mix.platinum=铂 -gtnop.ore.mix.pitchblende=沥青铀 -gtnop.ore.mix.uranium=铀 -gtnop.ore.mix.monazite=独居石 -gtnop.ore.mix.molybdenum=钼 -gtnop.ore.mix.tungstate=钨酸盐 -gtnop.ore.mix.sapphire=蓝宝石 -gtnop.ore.mix.manganese=锰 -gtnop.ore.mix.quartz=石英岩 -gtnop.ore.mix.diamond=钻石 -gtnop.ore.mix.olivine=橄榄石 -gtnop.ore.mix.apatite=磷灰石 -gtnop.ore.mix.galena=方铅矿 -gtnop.ore.mix.lapis=青金石 -gtnop.ore.mix.beryllium=铍 -gtnop.ore.mix.oilsand=油砂 - -# gregtech5.08 -gtnop.ore.mix.plutonium=钚 - -# gregtech6 -gtnop.ore.mix.iodinesalt=Iodinesalt -gtnop.ore.mix.rocksalt=岩盐 -gtnop.ore.mix.asbestos=石棉 -gtnop.ore.mix.titanium=钛 -gtnop.ore.mix.garnet=石榴石 -gtnop.ore.mix.dolamide=Dolamide \ No newline at end of file +gtnop.ore.custom.name=自定义 \ No newline at end of file -- cgit From a68e8610086d810ddfe646d44c7489e4b9b7d843 Mon Sep 17 00:00:00 2001 From: iouter <3155186831@qq.com> Date: Tue, 20 Jul 2021 17:15:04 +0800 Subject: αCentauriBb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/assets/gtneioreplugin/lang/en_US.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/resources/assets/gtneioreplugin/lang/en_US.lang b/src/main/resources/assets/gtneioreplugin/lang/en_US.lang index 39a8d53e6d..b770cea7cb 100644 --- a/src/main/resources/assets/gtneioreplugin/lang/en_US.lang +++ b/src/main/resources/assets/gtneioreplugin/lang/en_US.lang @@ -63,7 +63,7 @@ gtnop.world.Pluto=Pluto gtnop.world.Kuiperbelt=Kuiperbelt gtnop.world.Haumea=Haumea gtnop.world.MakeMake=MakeMake -gtnop.world.CentauriA=CentauriA +gtnop.world.CentauriA=αCentauriBb gtnop.world.VegaB=VegaB gtnop.world.BarnardC=BarnardC gtnop.world.BarnardE=BarnardE -- cgit