More localization support!

This commit is contained in:
Aidan Brady 2013-11-30 00:43:54 -05:00
parent b224a01f39
commit ba32a2b112
4 changed files with 41 additions and 24 deletions

View file

@ -153,11 +153,11 @@ public class GuiConfiguration extends GuiMekanism
int yAxis = (mouseY - (height - ySize) / 2);
fontRenderer.drawString(MekanismUtils.localize("gui.configuration"), 60, 5, 0x404040);
fontRenderer.drawString("Eject: " + (configurable.getEjector().isEjecting() ? "On" : "Off"), 53, 17, 0x00CD00);
fontRenderer.drawString(MekanismUtils.localize("gui.eject") + ": " + (configurable.getEjector().isEjecting() ? "On" : "Off"), 53, 17, 0x00CD00);
fontRenderer.drawString("Input (" + (configurable.getEjector().hasStrictInput() ? "On" : "Off") + ")", 18, 81, 0x787878);
fontRenderer.drawString("Output", 72, 68, 0x787878);
fontRenderer.drawString("Slots", 122, 81, 0x787878);
fontRenderer.drawString(MekanismUtils.localize("gui.input") + " (" + (configurable.getEjector().hasStrictInput() ? "On" : "Off") + ")", 18, 81, 0x787878);
fontRenderer.drawString(MekanismUtils.localize("gui.output"), 72, 68, 0x787878);
fontRenderer.drawString(MekanismUtils.localize("gui.slots"), 122, 81, 0x787878);
if(configurable.getEjector().getOutputColor() != null)
{
@ -182,7 +182,7 @@ public class GuiConfiguration extends GuiMekanism
if(xAxis >= x && xAxis <= x+14 && yAxis >= y && yAxis <= y+14)
{
drawCreativeTabHoveringText(data.color != null ? data.color.getName() : "None", xAxis, yAxis);
drawCreativeTabHoveringText(data.color != null ? data.color.getName() : MekanismUtils.localize("gui.none"), xAxis, yAxis);
}
}
@ -195,7 +195,7 @@ public class GuiConfiguration extends GuiMekanism
if(xAxis >= x && xAxis <= x+14 && yAxis >= y && yAxis <= y+14)
{
drawCreativeTabHoveringText(color != null ? color.getName() : "None", xAxis, yAxis);
drawCreativeTabHoveringText(color != null ? color.getName() : MekanismUtils.localize("gui.none"), xAxis, yAxis);
}
}
@ -206,18 +206,18 @@ public class GuiConfiguration extends GuiMekanism
drawCreativeTabHoveringText(configurable.getEjector().getOutputColor().getName(), xAxis, yAxis);
}
else {
drawCreativeTabHoveringText("None", xAxis, yAxis);
drawCreativeTabHoveringText(MekanismUtils.localize("gui.none"), xAxis, yAxis);
}
}
if(xAxis >= 156 && xAxis <= 170 && yAxis >= 6 && yAxis <= 20)
{
drawCreativeTabHoveringText("Auto-eject", xAxis, yAxis);
drawCreativeTabHoveringText(MekanismUtils.localize("gui.autoEject"), xAxis, yAxis);
}
if(xAxis >= 156 && xAxis <= 170 && yAxis >= 21 && yAxis <= 35)
{
drawCreativeTabHoveringText("Strict Input", xAxis, yAxis);
drawCreativeTabHoveringText(MekanismUtils.localize("gui.configuration.strictInput"), xAxis, yAxis);
}
super.drawGuiContainerForegroundLayer(mouseX, mouseY);

View file

@ -147,7 +147,7 @@ public class GuiDigitalMiner extends GuiMekanism
fontRenderer.drawString(tileEntity.running ? MekanismUtils.localize("gui.digitalMiner.running") : MekanismUtils.localize("gui.digitalMiner.idle"), 9, 10, 0x00CD00);
fontRenderer.drawString(tileEntity.searcher.state.desc, 9, 19, 0x00CD00);
fontRenderer.drawString(MekanismUtils.localize("gui.digitalMiner.eject") + ": " + (tileEntity.doEject ? "On" : "Off"), 9, 30, 0x00CD00);
fontRenderer.drawString(MekanismUtils.localize("gui.eject") + ": " + (tileEntity.doEject ? "On" : "Off"), 9, 30, 0x00CD00);
fontRenderer.drawString(MekanismUtils.localize("gui.digitalMiner.pull") + ": " + (tileEntity.doPull ? "On" : "Off"), 9, 39, 0x00CD00);
fontRenderer.drawString(MekanismUtils.localize("gui.digitalMiner.silk") + ": " + (tileEntity.silkTouch ? "On" : "Off"), 9, 48, 0x00CD00);

View file

@ -68,7 +68,7 @@ public class ItemConfigurator extends ItemEnergized
tileEntity.recurringNodes.clear();
tileEntity.cleaningNodes.clear();
player.sendChatToPlayer(ChatMessageComponent.createFromText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + "Reset Electric Pump calculation."));
player.sendChatToPlayer(ChatMessageComponent.createFromText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + MekanismUtils.localize("tooltip.configurator.pumpReset")));
return true;
}
else if(world.getBlockTileEntity(x, y, z) instanceof TileEntityLogisticalTransporter)
@ -84,17 +84,17 @@ public class ItemConfigurator extends ItemEnergized
switch(newMode)
{
case 0:
description = "Always active";
description = MekanismUtils.localize("control.disabled.desc");
break;
case 1:
description = "Active with signal";
description = MekanismUtils.localize("control.high.desc");
break;
case 2:
description = "Active without signal";
description = MekanismUtils.localize("control.low.desc");
break;
}
player.sendChatToPlayer(ChatMessageComponent.createFromText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " Diverter mode changed to: " + EnumColor.RED + description));
player.sendChatToPlayer(ChatMessageComponent.createFromText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.configurator.toggleDiverter") + ": " + EnumColor.RED + description));
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Object3D.get(transporter), transporter.getNetworkedData(new ArrayList())), Object3D.get(transporter), 50D);
return true;
}
@ -102,7 +102,7 @@ public class ItemConfigurator extends ItemEnergized
TileEntityLogisticalTransporter transporter = (TileEntityLogisticalTransporter)world.getBlockTileEntity(x, y, z);
TransporterUtils.incrementColor(transporter);
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Object3D.get(transporter), transporter.getNetworkedData(new ArrayList())), Object3D.get(transporter), 50D);
player.sendChatToPlayer(ChatMessageComponent.createFromText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " Color bumped to: " + (transporter.color != null ? transporter.color.getName() : EnumColor.BLACK + "None")));
player.sendChatToPlayer(ChatMessageComponent.createFromText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.configurator.toggleColor") + ": " + (transporter.color != null ? transporter.color.getName() : EnumColor.BLACK + MekanismUtils.localize("gui.none"))));
return true;
}
}
@ -127,7 +127,7 @@ public class ItemConfigurator extends ItemEnergized
if(!player.isSneaking())
{
player.sendChatToPlayer(ChatMessageComponent.createFromText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " Current color: " + config.getSideData().get(config.getConfiguration()[MekanismUtils.getBaseOrientation(side, config.getOrientation())]).color.getName()));
player.sendChatToPlayer(ChatMessageComponent.createFromText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.configurator.viewColor") + ": " + config.getSideData().get(config.getConfiguration()[MekanismUtils.getBaseOrientation(side, config.getOrientation())]).color.getName()));
return true;
}
else {
@ -135,7 +135,7 @@ public class ItemConfigurator extends ItemEnergized
{
setEnergy(stack, getEnergy(stack) - ENERGY_PER_CONFIGURE);
MekanismUtils.incrementOutput(config, MekanismUtils.getBaseOrientation(side, config.getOrientation()));
player.sendChatToPlayer(ChatMessageComponent.createFromText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " Color bumped to: " + config.getSideData().get(config.getConfiguration()[MekanismUtils.getBaseOrientation(side, config.getOrientation())]).color.getName()));
player.sendChatToPlayer(ChatMessageComponent.createFromText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.configurator.toggleColor") + ": " + config.getSideData().get(config.getConfiguration()[MekanismUtils.getBaseOrientation(side, config.getOrientation())]).color.getName()));
if(config instanceof TileEntityBasicBlock)
{
@ -205,7 +205,7 @@ public class ItemConfigurator extends ItemEnergized
return true;
}
else {
player.addChatMessage(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + "You are not authenticated on this chest.");
player.addChatMessage(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + MekanismUtils.localize("tooltip.configurator.unauth"));
return true;
}
}
@ -246,11 +246,11 @@ public class ItemConfigurator extends ItemEnergized
switch(state)
{
case 0:
return "modify";
return MekanismUtils.localize("tooltip.configurator.modify");
case 1:
return "empty";
return MekanismUtils.localize("tooltip.configurator.empty");
case 2:
return "wrench";
return MekanismUtils.localize("tooltip.configurator.wrench");
}
return "unknown";

View file

@ -122,7 +122,6 @@ fluid.hydrogen=Liquid Hydrogen
fluid.oxygen=Liquid Oxygen
//Gui text
gui.configuration=Configuration
gui.removeSpeedUpgrade=Remove speed upgrade
gui.removeEnergyUpgrade=Remove energy upgrade
gui.condensentrating=Condensentrating
@ -149,6 +148,12 @@ gui.start=Start
gui.stop=Stop
gui.config=Config
gui.teleport=Teleport
gui.eject=Eject
gui.input=Input
gui.slots=Slots
gui.configuration=Configuration
gui.configuration.strictInput=Strict Input
gui.factory.secondaryEnergy=Secondary energy
gui.factory.smelting=Smelting
@ -206,17 +211,29 @@ gui.digitalMiner.autoPull=Auto-pull
gui.digitalMiner.replaceBlock=Replace block
gui.digitalMiner.reset=Reset
gui.digitalMiner.silkTouch=Silk touch
gui.digitalMiner.eject=Eject
gui.digitalMiner.pull=Pull
gui.digitalMiner.silk=Silk
gui.digitalMiner.toMine=To mine
gui.digitalMiner.running=Running
gui.digitalMiner.idle=Idle
//Item and block tooltip text
tooltip.configurator.modify=Modify
tooltip.configurator.empty=Empty
tooltip.configurator.wrench=Wrench
tooltip.configurator.pumpReset=Reset Electric Pump calculation
tooltip.configurator.toggleDiverter=Diverter mode changed to
tooltip.configurator.toggleColor=Color bumped to
tooltip.configurator.viewColor=Current color
tooltip.configurator.unauth=This chest is locked
//Redstone control
control.disabled=Disabled
control.high=High
control.low=Low
control.disabled.desc=Always active
control.high.desc=Active with signal
control.low.desc=Active without signal
//Colors
color.black=Black