From ab37044ac9f436566aa1b9f40b3b3093db89be51 Mon Sep 17 00:00:00 2001 From: sferatime Date: Wed, 5 Aug 2020 19:33:05 +0300 Subject: [PATCH] Add basic blocks localisation --- build.gradle | 2 +- .../common/items/GT_MetaBlock2_Item.java | 3 +- .../common/items/GT_MetaBlock_Item.java | 3 +- .../assets/gregtech_addon/lang/en_US.lang | 81 +++++++++++++++++++ 4 files changed, 86 insertions(+), 3 deletions(-) create mode 100644 src/main/resources/assets/gregtech_addon/lang/en_US.lang diff --git a/build.gradle b/build.gradle index 592311c..dce517c 100644 --- a/build.gradle +++ b/build.gradle @@ -59,7 +59,7 @@ dependencies { compile files("libs/ThermalDynamics-[1.7.10]1.2.1-172-dev.jar") compile files("libs/ThermalExpansion-[1.7.10]4.1.5-248-dev.jar") compile files("libs/ThermalFoundation-[1.7.10]1.2.6-118-dev.jar") - compile file("libs/Railcraft_1.7.10-9.12.2.1-dev.jar") + compile files("libs/Railcraft_1.7.10-9.12.2.1-dev.jar") } processResources diff --git a/src/main/java/gregtechmod/common/items/GT_MetaBlock2_Item.java b/src/main/java/gregtechmod/common/items/GT_MetaBlock2_Item.java index 4c1aaac..0ecd6d5 100644 --- a/src/main/java/gregtechmod/common/items/GT_MetaBlock2_Item.java +++ b/src/main/java/gregtechmod/common/items/GT_MetaBlock2_Item.java @@ -9,6 +9,7 @@ import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; public class GT_MetaBlock2_Item extends ItemBlock { public GT_MetaBlock2_Item(Block par1) { @@ -27,7 +28,7 @@ public class GT_MetaBlock2_Item extends ItemBlock { @SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean par4) { - aList.add("Mobs can't spawn on this Block"); // FIXME: lang + aList.add(StatCollector.translateToLocal("block.deny_mobs_spawn.tooltip")); } @Override diff --git a/src/main/java/gregtechmod/common/items/GT_MetaBlock_Item.java b/src/main/java/gregtechmod/common/items/GT_MetaBlock_Item.java index 8e3aa1a..611ee2c 100644 --- a/src/main/java/gregtechmod/common/items/GT_MetaBlock_Item.java +++ b/src/main/java/gregtechmod/common/items/GT_MetaBlock_Item.java @@ -9,6 +9,7 @@ import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; public class GT_MetaBlock_Item extends ItemBlock { public GT_MetaBlock_Item(Block par1) { @@ -27,7 +28,7 @@ public class GT_MetaBlock_Item extends ItemBlock { @SuppressWarnings("unchecked") @Override public void addInformation(ItemStack aStack, EntityPlayer aPlayer, @SuppressWarnings("rawtypes") List aList, boolean par4) { - aList.add("Mobs can't spawn on this Block"); // FIXME localization! + aList.add(StatCollector.translateToLocal("block.deny_mobs_spawn.tooltip")); } @Override diff --git a/src/main/resources/assets/gregtech_addon/lang/en_US.lang b/src/main/resources/assets/gregtech_addon/lang/en_US.lang new file mode 100644 index 0000000..d83443b --- /dev/null +++ b/src/main/resources/assets/gregtech_addon/lang/en_US.lang @@ -0,0 +1,81 @@ +tile.BlockMetaID_Block.Adv_Machine.name=Advanced Machine Block +tile.BlockMetaID_Block.Fusioncoil.name=Fusion Coil +tile.BlockMetaID_Block.Iridium_reinforced_Stone.name=Iridium Reinforced Stone +tile.BlockMetaID_Block.Block_of_Silver.name=Block of Silver +tile.BlockMetaID_Block.Block_of_Ruby.name=Block of Ruby +tile.BlockMetaID_Block.Block_of_Sapphire.name=Block of Sapphire +tile.BlockMetaID_Block.LESU_Block.name=LESU-Block +tile.BlockMetaID_Block.Block_of_Aluminum.name=Block of Aluminium +tile.BlockMetaID_Block.Block_of_Titanium.name=Block of Titanium +tile.BlockMetaID_Block.Block_of_Chrome.name=Block of Chrome +tile.BlockMetaID_Block.Highly_Advanced_Machineblock.name=Highly Advanced Machineblock +tile.BlockMetaID_Block.Block_of_Steel.name=Block of Steel +tile.BlockMetaID_Block.Block_of_Brass.name=Block of Brass +tile.BlockMetaID_Block.Standard_Machine_Casing.name=Standard Machine Casing +tile.BlockMetaID_Block.Reinforced_Machine_Casing.name=Reinforced Machine Casing +tile.BlockMetaID_Block.Advanced_Machine_Casing.name=Advanced Machine Casing +tile.BlockMetaID_Ore.Galena_Ore.name=Galena Ore +tile.BlockMetaID_Ore.Iridium_Ore.name=Iridium Ore +tile.BlockMetaID_Ore.Ruby_Ore.name=Ruby Ore +tile.BlockMetaID_Ore.Sapphire_Ore.name=Sapphire Ore +tile.BlockMetaID_Ore.Bauxite_Ore.name=Bauxite Ore +tile.BlockMetaID_Ore.Pyrite_Ore.name=Pyrite Ore +tile.BlockMetaID_Ore.Cinnabar_Ore.name=Cinnabar Ore +tile.BlockMetaID_Ore.Sphalerite_Ore.name=Sphalerite Ore +tile.BlockMetaID_Ore.Tungstate_Ore.name=Tungstate Ore +tile.BlockMetaID_Ore.Cooperite_Ore.name=Sheldonite Ore +tile.BlockMetaID_Ore.Olivine_Ore.name=Olivine Ore +tile.BlockMetaID_Ore.Sodalite_Ore.name=Sodalite Ore +tile.BlockMetaID_Ore.Tetrahedrite_Ore.name=Tetrahedrite Ore +tile.BlockMetaID_Ore.Cassiterite_Ore.name=Cassiterite Ore +tile.BlockMetaID_Ore.Nickel_Ore.name=Nickel Ore +tile.BlockMetaID_Block2.GT_LeadBlock.name=Block of Lead +tile.BlockMetaID_Block2.GT_ElectrumBlock.name=Block of Electrum +tile.BlockMetaID_Block2.GT_ZincBlock.name=Block of Zinc +tile.BlockMetaID_Block2.GT_OlivineBlock.name=Block of Olivine +tile.BlockMetaID_Block2.GT_GreenSapphireBlock.name=Block of Green Sapphire +tile.BlockMetaID_Block2.GT_PlatinumBlock.name=Block of Platinum +tile.BlockMetaID_Block2.GT_TungstenBlock.name=Block of Tungsten +tile.BlockMetaID_Block2.GT_NickelBlock.name=Block of Nickel +tile.BlockMetaID_Block2.GT_TungstenSteelWall.name=Tungstensteel Block +tile.BlockMetaID_Block2.GT_TungstenSteelIridiumWall.name=Iridium Reinforced Tungstensteel Block +tile.BlockMetaID_Block2.GT_InvarBlock.name=Block of Invar +tile.BlockMetaID_Block2.GT_OsmiumBlock.name=Block of Osmium +tile.BlockMetaID_Block2.GT_IridiumBlock.name=Block of Iridium +tile.BlockMetaID_Block2.GT_Bronze_Plated_Bricks.name=Bronze Plated Bricks +tile.BlockMetaID_Block2.GT_YellowGarnetBlock.name=Block of Yellow Garnet +tile.BlockMetaID_Block2.GT_RedGarnetBlock.name=Block of Red Garnet +tile.BlockMetaID_Stone1.GT_Black_Granite.name=Black Granite +tile.BlockMetaID_Stone1.GT_Black_Granite_Cobble.name=Black Granite Cobblestone +tile.BlockMetaID_Stone1.GT_Black_Granite_Cobble_Mossy.name=Mossy Black Granite Cobblestone +tile.BlockMetaID_Stone1.GT_Black_Granite_Bricks.name=Black Granite Bricks +tile.BlockMetaID_Stone1.GT_Black_Granite_Bricks_Cracked.name=Cracked Black Granite Bricks +tile.BlockMetaID_Stone1.GT_Black_Granite_Bricks_Mossy.name=Mossy Black Granite Bricks +tile.BlockMetaID_Stone1.GT_Black_Granite_Bricks_Chiseled.name=Chiseled Black Granite +tile.BlockMetaID_Stone1.GT_Black_Granite_Smooth.name=Smooth Black Granite +tile.BlockMetaID_Stone1.GT_Red_Granite.name=Red Granite +tile.BlockMetaID_Stone1.GT_Red_Granite_Cobble.name=Red Granite Cobblestone +tile.BlockMetaID_Stone1.GT_Red_Granite_Cobble_Mossy.name=Mossy Red Granite Cobblestone +tile.BlockMetaID_Stone1.GT_Red_Granite_Bricks.name=Red Granite Bricks +tile.BlockMetaID_Stone1.GT_Red_Granite_Bricks_Cracked.name=Cracked Red Granite Bricks +tile.BlockMetaID_Stone1.GT_Red_Granite_Bricks_Mossy.name=Mossy Red Granite Bricks +tile.BlockMetaID_Stone1.GT_Red_Granite_Bricks_Chiseled.name=Chiseled Red Granite +tile.BlockMetaID_Stone1.GT_Red_Granite_Smooth.name=Smooth Red Granite +tile.BlockMetaID_Machine.GT_BUG.name=You ran into a serious Bug, if you have legitly aquired this Block, please report it immidietly +tile.BlockMetaID_Machine.Fusionreactor.name=Fusion Reactor +tile.BlockMetaID_Machine.Lightningrod.name=Lightning Rod +tile.BlockMetaID_Machine.Quantumchest.name=Old Quantum Chest +tile.BlockMetaID_Machine.GregTech_Computercube.name=GregTech Computer Cube +tile.BlockMetaID_Machine.UUM_Assembler.name=UUM-Assembler +tile.BlockMetaID_Machine.Sonictron.name=Sonictron +tile.BlockMetaID_Machine.Lapotronic_Energystorageunit.name=Lapotronic Energy Storage Unit +tile.BlockMetaID_Machine.Interdimensional_Energystorageunit.name=Interdimensional Energy Storage Unit +tile.BlockMetaID_Machine.Adjustable_Energystorageunit.name=Adjustable Energy Storage Unit +tile.BlockMetaID_Machine.Charge_O_Mat.name=Charge-O-Mat +tile.BlockMetaID_Machine.Industrial_Centrifuge.name=Industrial Centrifuge +tile.BlockMetaID_Machine.Superconductorwire.name=Superconductor Wire +tile.BlockMetaID_Machine.Playerdetector.name=Player Detector +tile.BlockMetaID_Machine.Matterfabricator.name=Matter Fabricator +tile.BlockMetaID_Machine.Supercondensator.name=Supercondensator + +block.deny_mobs_spawn.tooltip=Mobs can't spawn on this block