diff --git a/lang b/lang index 1d0c7ada9..a4228c2c4 160000 --- a/lang +++ b/lang @@ -1 +1 @@ -Subproject commit 1d0c7ada9c1d102e6ba92ece9f5dc2cdfdbf82be +Subproject commit a4228c2c4133d774727d8c64a21305db76f043a7 diff --git a/src/main/java/forestry/apiculture/CommandBeekeepingMode.java b/src/main/java/forestry/apiculture/CommandBeekeepingMode.java index 4d7e1ad7e..b55eebc72 100755 --- a/src/main/java/forestry/apiculture/CommandBeekeepingMode.java +++ b/src/main/java/forestry/apiculture/CommandBeekeepingMode.java @@ -78,7 +78,7 @@ public class CommandBeekeepingMode extends CommandMC { public void processCommand(ICommandSender sender, String[] arguments) { if (arguments.length <= 0) - throw new WrongUsageException(StringUtil.localize("chat.help",this.getCommandUsage(sender))); + throw new WrongUsageException(StringUtil.localizeAndFormat("chat.help", this.getCommandUsage(sender))); if (arguments[0].matches("list")) listModes(sender, arguments); @@ -104,7 +104,7 @@ public class CommandBeekeepingMode extends CommandMC { saveStatistics(sender, arguments); } else if (arguments[0].matches("help")) { - sendChatMessage(sender, StringUtil.localize("chat.bees.command.help.0", this.getCommandName())); + sendChatMessage(sender, StringUtil.localizeAndFormat("chat.bees.command.help.0", this.getCommandName())); sendChatMessage(sender, StringUtil.localize("chat.bees.command.help.1")); sendChatMessage(sender, StringUtil.localize("chat.bees.command.help.2")); sendChatMessage(sender, StringUtil.localize("chat.bees.command.help.3")); diff --git a/src/main/java/forestry/apiculture/gui/GuiBeealyzer.java b/src/main/java/forestry/apiculture/gui/GuiBeealyzer.java index 4aeddec6b..18cf8f038 100755 --- a/src/main/java/forestry/apiculture/gui/GuiBeealyzer.java +++ b/src/main/java/forestry/apiculture/gui/GuiBeealyzer.java @@ -271,7 +271,7 @@ public class GuiBeealyzer extends GuiAlyzer { if (bee.getGeneration() >= 0) { newLine(); - displayText = StringUtil.localize("gui.beealyzer.generations", bee.getGeneration()); + displayText = StringUtil.localizeAndFormat("gui.beealyzer.generations", bee.getGeneration()); // offset = (int)(((158 - fontRendererObj.getStringWidth(origin)) / 2)*(1/factor)); drawCenteredLine(displayText, 8, 158, fontColor.get("gui.beealyzer.binomial")); } diff --git a/src/main/java/forestry/arboriculture/CommandTreekeepingMode.java b/src/main/java/forestry/arboriculture/CommandTreekeepingMode.java index 39fdf95b6..e2bcaf51a 100755 --- a/src/main/java/forestry/arboriculture/CommandTreekeepingMode.java +++ b/src/main/java/forestry/arboriculture/CommandTreekeepingMode.java @@ -78,7 +78,7 @@ public class CommandTreekeepingMode extends CommandMC { public void processCommand(ICommandSender sender, String[] arguments) { if (arguments.length <= 0) - throw new WrongUsageException(StringUtil.localize("chat.help",this.getCommandUsage(sender))); + throw new WrongUsageException(StringUtil.localizeAndFormat("chat.help", this.getCommandUsage(sender))); if (arguments[0].matches("list")) listModes(sender, arguments); @@ -104,7 +104,7 @@ public class CommandTreekeepingMode extends CommandMC { saveStatistics(sender, arguments); } else if (arguments[0].matches("help")) { - sendChatMessage(sender, StringUtil.localize("chat.trees.command.help.0", this.getCommandName())); + sendChatMessage(sender, StringUtil.localizeAndFormat("chat.trees.command.help.0", this.getCommandName())); sendChatMessage(sender, StringUtil.localize("chat.trees.command.help.1")); sendChatMessage(sender, StringUtil.localize("chat.trees.command.help.2")); sendChatMessage(sender, StringUtil.localize("chat.trees.command.help.3")); diff --git a/src/main/java/forestry/core/CommandForestry.java b/src/main/java/forestry/core/CommandForestry.java index cbbab3207..56fc9e866 100755 --- a/src/main/java/forestry/core/CommandForestry.java +++ b/src/main/java/forestry/core/CommandForestry.java @@ -53,7 +53,7 @@ public class CommandForestry extends CommandMC { public void processCommand(ICommandSender sender, String[] arguments) { if (arguments.length <= 0) - throw new WrongUsageException(StringUtil.localize("chat.help",this.getCommandUsage(sender))); + throw new WrongUsageException(StringUtil.localizeAndFormat("chat.help", this.getCommandUsage(sender))); if (arguments[0].matches("version")) { commandVersion(sender, arguments); @@ -62,7 +62,7 @@ public class CommandForestry extends CommandMC { commandPlugins(sender, arguments); return; } else if (arguments[0].matches("help")) { - sendChatMessage(sender, StringUtil.localize("chat.command.help.0", this.getCommandName())); + sendChatMessage(sender, StringUtil.localizeAndFormat("chat.command.help.0", this.getCommandName())); sendChatMessage(sender, StringUtil.localize("chat.command.help.1")); sendChatMessage(sender, StringUtil.localize("chat.command.help.2")); sendChatMessage(sender, StringUtil.localize("chat.command.help.3")); @@ -123,7 +123,7 @@ public class CommandForestry extends CommandMC { } if (found == null) - throw new CommandException(StringUtil.localize("chat.plugins.error",arguments[2])); + throw new CommandException(StringUtil.localizeAndFormat("chat.plugins.error", arguments[2])); String entry = "\u00A7c"; if (found.isAvailable()) diff --git a/src/main/java/forestry/core/genetics/ItemResearchNote.java b/src/main/java/forestry/core/genetics/ItemResearchNote.java index be78da7a1..ed6930fec 100755 --- a/src/main/java/forestry/core/genetics/ItemResearchNote.java +++ b/src/main/java/forestry/core/genetics/ItemResearchNote.java @@ -233,7 +233,7 @@ public class ItemResearchNote extends ItemForestry { @Override public String getItemStackDisplayName(ItemStack itemstack) { ResearchNote note = new ResearchNote(itemstack.getTagCompound()); - return StringUtil.localize(getUnlocalizedName(itemstack) + ".name", note.researcher); + return StringUtil.localizeAndFormat(getUnlocalizedName(itemstack) + ".name", note.researcher); } @SuppressWarnings("rawtypes") diff --git a/src/main/java/forestry/core/utils/StringUtil.java b/src/main/java/forestry/core/utils/StringUtil.java index f015e51bc..191ab175d 100755 --- a/src/main/java/forestry/core/utils/StringUtil.java +++ b/src/main/java/forestry/core/utils/StringUtil.java @@ -22,7 +22,7 @@ public class StringUtil { return StatCollector.translateToLocal(key).replace("\\n", "\n").replace("@", "%").replace("\\%", "@"); } - public static String localize(String key, Object... args) { + public static String localizeAndFormat(String key, Object... args) { String text = StringUtil.localize(key); try { diff --git a/src/main/java/forestry/mail/CommandMail.java b/src/main/java/forestry/mail/CommandMail.java index 28eb79bdd..b95171eaf 100755 --- a/src/main/java/forestry/mail/CommandMail.java +++ b/src/main/java/forestry/mail/CommandMail.java @@ -18,11 +18,8 @@ import net.minecraft.command.ICommandSender; import net.minecraft.command.WrongUsageException; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.server.MinecraftServer; import net.minecraft.world.World; -import com.mojang.authlib.GameProfile; - import forestry.api.mail.ITradeStation; import forestry.api.mail.PostManager; import forestry.api.mail.TradeStationInfo; @@ -56,7 +53,7 @@ public class CommandMail extends CommandMC { @Override public void processCommand(ICommandSender sender, String[] arguments) { if (arguments.length <= 0) - throw new WrongUsageException(StringUtil.localize("chat.help",this.getCommandUsage(sender))); + throw new WrongUsageException(StringUtil.localizeAndFormat("chat.help", this.getCommandUsage(sender))); if (arguments[0].matches("trades")) { commandTrades(sender, arguments); @@ -65,7 +62,7 @@ public class CommandMail extends CommandMC { commandVirtualize(sender, arguments); return; } else if (arguments[0].matches("help")) { - sendChatMessage(sender, StringUtil.localize("chat.mail.command.help.0", this.getCommandName())); + sendChatMessage(sender, StringUtil.localizeAndFormat("chat.mail.command.help.0", this.getCommandName())); sendChatMessage(sender, StringUtil.localize("chat.mail.command.help.1")); sendChatMessage(sender, StringUtil.localize("chat.mail.command.help.2")); sendChatMessage(sender, StringUtil.localize("chat.mail.command.help.3"));