From 9f455f5a0d3af3f0715086bae1a47a7bfed8b9cb Mon Sep 17 00:00:00 2001 From: nossr50 Date: Tue, 5 May 2020 19:23:55 -0700 Subject: [PATCH] Fix some locale errors --- Changelog.txt | 2 +- .../nossr50/util/commands/CommandRegistrationManager.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 1ad2b0df8..bb7643d84 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,7 +1,7 @@ Version 2.1.128 The first rank of Iron Arm for Unarmed now only gives 1.5 bonus damage instead of 4 (other ranks are the same as before) Blast Mining nerf reverted - + Fixed a few locale errors with commands Version 2.1.127 Child Skills now have XP bars, they are hidden by default diff --git a/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java b/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java index 36dd2f5f4..19034f36f 100644 --- a/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java +++ b/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java @@ -418,21 +418,22 @@ public final class CommandRegistrationManager { command.setDescription("Reloads locale"); // TODO: Localize command.setPermission("mcmmo.commands.reloadlocale"); command.setPermissionMessage(permissionsMessage); - command.setUsage(LocaleLoader.formatString("Commands.Usage.0", "mcmmoreloadlocale")); + command.setUsage(LocaleLoader.getString("Commands.Usage.0", "mcmmoreloadlocale")); command.setExecutor(new McmmoReloadLocaleCommand()); } private static void registerCompatibilityCommand() { PluginCommand command = mcMMO.p.getCommand("mmocompat"); //TODO: Localize command.setDescription(LocaleLoader.getString("Commands.Description.mmocompat")); - command.setUsage(LocaleLoader.formatString("Commands.Usage.0", "mmocompat")); + command.setUsage(LocaleLoader.getString("Commands.Usage.0", "mmocompat")); command.setExecutor(new CompatibilityCommand()); } private static void registerXPBarCommand() { PluginCommand command = mcMMO.p.getCommand("mmoxpbar"); //TODO: Localize command.setDescription(LocaleLoader.getString("Commands.Description.mmoxpbar")); - command.setUsage(LocaleLoader.formatString("Commands.Usage.1", "mmoxpbar", "", "")); + command.setUsage(LocaleLoader.getString("Commands.Usage.1", "mmoxpbar", "")); + command.setUsage(command.getUsage() +"\n" + LocaleLoader.getString("Commands.Usage.2", "", "")); command.setExecutor(new XPBarCommand()); }