瀏覽代碼

Fix some locale errors

nossr50 5 年之前
父節點
當前提交
9f455f5a0d
共有 2 個文件被更改,包括 5 次插入4 次删除
  1. 1 1
      Changelog.txt
  2. 4 3
      src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java

+ 1 - 1
Changelog.txt

@@ -1,7 +1,7 @@
 Version 2.1.128
 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)
     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
     Blast Mining nerf reverted
-
+    Fixed a few locale errors with commands
 
 
 Version 2.1.127
 Version 2.1.127
     Child Skills now have XP bars, they are hidden by default
     Child Skills now have XP bars, they are hidden by default

+ 4 - 3
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.setDescription("Reloads locale"); // TODO: Localize
         command.setPermission("mcmmo.commands.reloadlocale");
         command.setPermission("mcmmo.commands.reloadlocale");
         command.setPermissionMessage(permissionsMessage);
         command.setPermissionMessage(permissionsMessage);
-        command.setUsage(LocaleLoader.formatString("Commands.Usage.0", "mcmmoreloadlocale"));
+        command.setUsage(LocaleLoader.getString("Commands.Usage.0", "mcmmoreloadlocale"));
         command.setExecutor(new McmmoReloadLocaleCommand());
         command.setExecutor(new McmmoReloadLocaleCommand());
     }
     }
 
 
     private static void registerCompatibilityCommand() {
     private static void registerCompatibilityCommand() {
         PluginCommand command = mcMMO.p.getCommand("mmocompat"); //TODO: Localize
         PluginCommand command = mcMMO.p.getCommand("mmocompat"); //TODO: Localize
         command.setDescription(LocaleLoader.getString("Commands.Description.mmocompat"));
         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());
         command.setExecutor(new CompatibilityCommand());
     }
     }
 
 
     private static void registerXPBarCommand() {
     private static void registerXPBarCommand() {
         PluginCommand command = mcMMO.p.getCommand("mmoxpbar"); //TODO: Localize
         PluginCommand command = mcMMO.p.getCommand("mmoxpbar"); //TODO: Localize
         command.setDescription(LocaleLoader.getString("Commands.Description.mmoxpbar"));
         command.setDescription(LocaleLoader.getString("Commands.Description.mmoxpbar"));
-        command.setUsage(LocaleLoader.formatString("Commands.Usage.1", "mmoxpbar", "<skillname | reset>", "<show | hide>"));
+        command.setUsage(LocaleLoader.getString("Commands.Usage.1", "mmoxpbar", "<reset>"));
+        command.setUsage(command.getUsage() +"\n" + LocaleLoader.getString("Commands.Usage.2", "<skillname>", "<show | hide>"));
         command.setExecutor(new XPBarCommand());
         command.setExecutor(new XPBarCommand());
     }
     }