aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2021-07-30 12:51:40 +0200
committerGitHub <noreply@github.com>2021-07-30 12:51:40 +0200
commitcfcc6c42495ddcdfa9de97e3c1fe35bea1ce3d84 (patch)
tree57ebf25f8fdcedc04baef3b3401da8a81e9b6919
parent66d8c20fa08b89ca74dc188d4e1991713f59f2cb (diff)
parenta68e8610086d810ddfe646d44c7489e4b9b7d843 (diff)
downloadGT5-Unofficial-cfcc6c42495ddcdfa9de97e3c1fe35bea1ce3d84.tar.gz
GT5-Unofficial-cfcc6c42495ddcdfa9de97e3c1fe35bea1ce3d84.tar.bz2
GT5-Unofficial-cfcc6c42495ddcdfa9de97e3c1fe35bea1ce3d84.zip
Merge pull request #7 from iouter/GT-NH-Mod
Add lang key for localize dimension, and fix an issue.
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java2
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/DimensionHelper.java20
-rw-r--r--src/main/resources/assets/gtneioreplugin/lang/en_US.lang41
-rw-r--r--src/main/resources/assets/gtneioreplugin/lang/zh_CN.lang90
4 files changed, 79 insertions, 74 deletions
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..75b227d8a4 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;
@@ -139,8 +134,7 @@ public class DimensionHelper {
case "MakeMake":
s = s + " (T7)";
break;
- case "Deep Dark":
- case "CentauriBb":
+ case "Underdark":
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<String> 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..b770cea7cb 100644
--- a/src/main/resources/assets/gtneioreplugin/lang/en_US.lang
+++ b/src/main/resources/assets/gtneioreplugin/lang/en_US.lang
@@ -35,12 +35,41 @@ 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.Vanilla EndAsteroids=Vanilla EndAsteroids
+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=αCentauriBb
+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..ce0fe22f00 100644
--- a/src/main/resources/assets/gtneioreplugin/lang/zh_CN.lang
+++ b/src/main/resources/assets/gtneioreplugin/lang/zh_CN.lang
@@ -35,12 +35,41 @@ 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.Vanilla EndAsteroids=原版末地小行星
+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
@@ -54,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