From 92fb7e8afe8367a2a5945c916d303c6dccab4dd2 Mon Sep 17 00:00:00 2001 From: Kris Avi Date: Thu, 13 Sep 2012 10:49:26 +0300 Subject: [PATCH] Translatable areas Translatable Template table gui title, gates gui title, still and moving oil (in NEI) (and added Oils to en_US.properties) --- .../lang/buildcraft/en_US.properties | 4 +++- common/buildcraft/BuildCraftEnergy.java | 8 ++++---- common/buildcraft/builders/gui/GuiTemplate.java | 3 ++- common/buildcraft/transport/GateVanilla.java | 16 ++++++++-------- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/buildcraft_resources/lang/buildcraft/en_US.properties b/buildcraft_resources/lang/buildcraft/en_US.properties index 3eaa91e0..83fe3fd0 100644 --- a/buildcraft_resources/lang/buildcraft/en_US.properties +++ b/buildcraft_resources/lang/buildcraft/en_US.properties @@ -87,4 +87,6 @@ tile.blockHopper=Hopper tile.pumpBlock=Pump tile.engineWood=Redstone Engine tile.engineStone=Stirling Engine -tile.engineIron=Combustion Engine \ No newline at end of file +tile.engineIron=Combustion Engine +tile.oilStill=Oil +tile.oilMoving=Oil \ No newline at end of file diff --git a/common/buildcraft/BuildCraftEnergy.java b/common/buildcraft/BuildCraftEnergy.java index 32eba7b9..3f94e84f 100644 --- a/common/buildcraft/BuildCraftEnergy.java +++ b/common/buildcraft/BuildCraftEnergy.java @@ -120,12 +120,12 @@ public class BuildCraftEnergy { LanguageRegistry.addName(new ItemStack(engineBlock, 1, 2), "Combustion Engine"); oilStill = (new BlockOilStill(oilStillId.getInt(DefaultProps.OIL_STILL_ID), Material.water)).setBlockName("oil"); - LanguageRegistry.addName(oilStill.setBlockName("oilStill"), "Oil"); - GameRegistry.registerBlock(oilStill); + CoreProxy.proxy.addName(oilStill.setBlockName("oilStill"), "Oil"); + CoreProxy.proxy.registerBlock(oilStill); oilMoving = (new BlockOilFlowing(oilMovingId.getInt(DefaultProps.OIL_MOVING_ID), Material.water)).setBlockName("oil"); - LanguageRegistry.addName(oilMoving.setBlockName("oilMoving"), "Oil"); - GameRegistry.registerBlock(oilMoving); + CoreProxy.proxy.addName(oilMoving.setBlockName("oilMoving"), "Oil"); + CoreProxy.proxy.registerBlock(oilMoving); // Oil and fuel if (oilMoving.blockID + 1 != oilStill.blockID) diff --git a/common/buildcraft/builders/gui/GuiTemplate.java b/common/buildcraft/builders/gui/GuiTemplate.java index de71c4b9..ac78bba8 100644 --- a/common/buildcraft/builders/gui/GuiTemplate.java +++ b/common/buildcraft/builders/gui/GuiTemplate.java @@ -42,7 +42,8 @@ public class GuiTemplate extends GuiBuildCraft { @Override protected void drawGuiContainerForegroundLayer() { - fontRenderer.drawString(template.getInvName(), getCenteredOffset(template.getInvName()), 6, 0x404040); + String title = StringUtil.localize("tile.architectBlock"); + fontRenderer.drawString(title, getCenteredOffset(title), 6, 0x404040); fontRenderer.drawString(StringUtil.localize("gui.inventory"), 8, ySize - 152, 0x404040); if (editMode && ((new Date()).getTime() / 100) % 8 >= 4) diff --git a/common/buildcraft/transport/GateVanilla.java b/common/buildcraft/transport/GateVanilla.java index 9eca7dbd..72bedf80 100644 --- a/common/buildcraft/transport/GateVanilla.java +++ b/common/buildcraft/transport/GateVanilla.java @@ -11,6 +11,7 @@ import buildcraft.core.DefaultProps; import buildcraft.core.GuiIds; import buildcraft.core.proxy.CoreProxy; import buildcraft.core.utils.Utils; +import buildcraft.core.utils.StringUtil; import buildcraft.transport.triggers.ActionEnergyPulser; import net.minecraft.src.EntityPlayer; @@ -80,22 +81,21 @@ public class GateVanilla extends Gate { @Override public String getName() { - switch (kind) { case Single: - return "Gate"; + return StringUtil.localize("item.pipeGate.0"); case AND_2: - return "Iron AND Gate"; + return StringUtil.localize("item.pipeGate.1"); case AND_3: - return "Golden AND Gate"; + return StringUtil.localize("item.pipeGate.3"); case AND_4: - return "Diamond AND Gate"; + return StringUtil.localize("item.pipeGate.5"); case OR_2: - return "Iron OR Gate"; + return StringUtil.localize("item.pipeGate.2"); case OR_3: - return "Golden OR Gate"; + return StringUtil.localize("item.pipeGate.4"); case OR_4: - return "Diamond OR Gate"; + return StringUtil.localize("item.pipeGate.6"); default: return ""; }