diff --git a/src/main/java/com/gmail/nossr50/commands/general/AddlevelsCommand.java b/src/main/java/com/gmail/nossr50/commands/general/AddlevelsCommand.java index 9b96d5c73..a25ab555e 100644 --- a/src/main/java/com/gmail/nossr50/commands/general/AddlevelsCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/general/AddlevelsCommand.java @@ -1,6 +1,5 @@ package com.gmail.nossr50.commands.general; -import org.bukkit.ChatColor; import org.bukkit.OfflinePlayer; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; @@ -29,8 +28,7 @@ public class AddlevelsCommand implements CommandExecutor{ PlayerProfile profile; int levels; SkillType skill; - String skillName; - String usage = ChatColor.RED + "Proper usage is /addlevels [player] "; //TODO: Needs more locale. + String usage = LocaleLoader.getString("Commands.Usage.3", new Object[] {"addlevels", "[" + LocaleLoader.getString("Commands.Usage.Player") + "]", "<" + LocaleLoader.getString("Commands.Usage.Skill") + ">", "<" + LocaleLoader.getString("Commands.Usage.Level") + ">" }); if (CommandHelper.noCommandPermissions(sender, "mcmmo.tools.mmoedit")) { return true; @@ -51,14 +49,13 @@ public class AddlevelsCommand implements CommandExecutor{ profile = Users.getProfile(modifiedPlayer); if (skill.equals(SkillType.ALL)) { - skillName = "all skills"; + sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.1", new Object[] {levels})); } else { - skillName = Misc.getCapitalized(skill.toString()); + sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.1", new Object[] {levels, Misc.getCapitalized(skill.toString())})); } profile.addLevels(skill, levels); - sender.sendMessage(ChatColor.GREEN + "You were awarded " + levels + " levels in " + skillName + "!"); //TODO: Needs more locale. } } else { @@ -90,23 +87,23 @@ public class AddlevelsCommand implements CommandExecutor{ if (Misc.isInt(args[2])) { levels = Integer.valueOf(args[2]); skill = Skills.getSkillType(args[1]); - String message; Users.getProfile(modifiedPlayer).addLevels(skill, levels); if (skill.equals(SkillType.ALL)) { - skillName = "all skills"; - message = ChatColor.RED + "All skills have been modified for " + playerName + "."; //TODO: Use locale + sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", new Object[] {playerName})); } else { - skillName = Misc.getCapitalized(skill.toString()); - message = ChatColor.RED + skillName + " has been modified for " + playerName + "."; //TODO: Use locale + sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.2", new Object[] {Misc.getCapitalized(skill.toString()), playerName})); } - sender.sendMessage(message); - if (modifiedPlayer.isOnline()) { - ((Player) modifiedPlayer).sendMessage(ChatColor.GREEN + "You were awarded " + levels + " levels in " + skillName + "!"); //TODO: Needs more locale. + if (skill.equals(SkillType.ALL)) { + ((Player) modifiedPlayer).sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.1", new Object[] {levels})); + } + else { + ((Player) modifiedPlayer).sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.1", new Object[] {levels, Misc.getCapitalized(skill.toString())})); + } } } else { diff --git a/src/main/java/com/gmail/nossr50/commands/general/AddxpCommand.java b/src/main/java/com/gmail/nossr50/commands/general/AddxpCommand.java index ee5852a27..cb8333541 100644 --- a/src/main/java/com/gmail/nossr50/commands/general/AddxpCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/general/AddxpCommand.java @@ -1,6 +1,5 @@ package com.gmail.nossr50.commands.general; -import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; @@ -29,8 +28,7 @@ public class AddxpCommand implements CommandExecutor { Player modifiedPlayer; int xp; SkillType skill; - String skillName; - String usage = ChatColor.RED + "Proper usage is /addxp [playername] "; //TODO: Needs more locale. + String usage = LocaleLoader.getString("Commands.Usage.3", new Object[] {"addxp", "[" + LocaleLoader.getString("Commands.Usage.Player") + "]", "<" + LocaleLoader.getString("Commands.Usage.Skill") + ">", "<" + LocaleLoader.getString("Commands.Usage.XP") + ">" }); if (CommandHelper.noCommandPermissions(sender, "mcmmo.tools.mmoedit")) { return true; @@ -54,14 +52,12 @@ public class AddxpCommand implements CommandExecutor { mcMMOPlayer.addXPOverride(skill, xp); if (skill.equals(SkillType.ALL)) { - skillName = "all skills"; + modifiedPlayer.sendMessage(LocaleLoader.getString("Commands.addxp.AwardAll", new Object[] {xp})); } else { - skillName = Misc.getCapitalized(skill.toString()); + modifiedPlayer.sendMessage(LocaleLoader.getString("Commands.addxp.AwardSkill", new Object[] {xp, Misc.getCapitalized(skill.toString())})); } - modifiedPlayer.sendMessage(ChatColor.GREEN + "You were awarded " + xp + " experience in " + skillName + "!"); //TODO: Needs more locale. - if (skill.equals(SkillType.ALL)) { Skills.xpCheckAll(modifiedPlayer, profile); } @@ -103,26 +99,22 @@ public class AddxpCommand implements CommandExecutor { if (Misc.isInt(args[2])) { xp = Integer.valueOf(args[2]); skill = Skills.getSkillType(args[1]); - String message; mcMMOPlayer.addXPOverride(skill, xp); if (skill.equals(SkillType.ALL)) { - skillName = "all skills"; - message = ChatColor.RED + "All skills have been modified for " + playerName + "."; //TODO: Use locale + sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", new Object[] {playerName})); } else { - skillName = Misc.getCapitalized(skill.toString()); - message = ChatColor.RED + skillName + " has been modified for " + playerName + "."; //TODO: Use locale + sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.2", new Object[] {Misc.getCapitalized(skill.toString()), playerName})); } - sender.sendMessage(message); - modifiedPlayer.sendMessage(ChatColor.GREEN + "You were awarded " + xp + " experience in " + skillName + "!"); //TODO: Needs more locale. - if (skill.equals(SkillType.ALL)) { + modifiedPlayer.sendMessage(LocaleLoader.getString("Commands.addxp.AwardAll", new Object[] {xp})); Skills.xpCheckAll(modifiedPlayer, profile); } else { + modifiedPlayer.sendMessage(LocaleLoader.getString("Commands.addxp.AwardSkill", new Object[] {xp, Misc.getCapitalized(skill.toString())})); Skills.xpCheckSkill(skill, modifiedPlayer, profile); } } diff --git a/src/main/resources/locale/locale_cy.properties b/src/main/resources/locale/locale_cy.properties index 746b598f1..6191d46a7 100644 --- a/src/main/resources/locale/locale_cy.properties +++ b/src/main/resources/locale/locale_cy.properties @@ -334,6 +334,12 @@ Combat.StruckByGore=[[RED]]**YOU HAVE BEEN GORED** Combat.TargetDazed=Target was [[DARK_RED]]Dazed Combat.TouchedFuzzy=[[DARK_RED]] cyffwrdd Fuzzy. Teimlo benysgafn. mcMMO.Description=[[DARK_AQUA]]About the [[YELLOW]]mcMMO[[DARK_AQUA]] Project:,[[GOLD]]mcMMO is an [[RED]]open source[[GOLD]] RPG mod created in February 2011,[[GOLD]]by [[BLUE]]nossr50[[GOLD]]. The goal is to provide a quality RPG experience.,[[DARK_AQUA]]Tips:,[[GOLD]] - [[GREEN]]Use [[RED]]/mcc[[GREEN]] to see commands,[[GOLD]] - [[GREEN]]Type [[RED]]/SKILLNAME[[GREEN]] to see detailed skill info,[[DARK_AQUA]]Developers:,[[GOLD]] - [[GREEN]]nossr50 [[BLUE]](Project Lead),[[GOLD]] - [[GREEN]]GJ [[BLUE]](Senior Developer),[[GOLD]] - [[GREEN]]NuclearW [[BLUE]](Developer),[[GOLD]] - [[GREEN]]bm01 [[BLUE]](Developer),[[DARK_AQUA]]Useful Links:,[[GOLD]] - [[GREEN]]issues.mcmmo.org[[GOLD]] Bug Reporting,[[GOLD]] - [[GREEN]]#mcmmo @ irc.esper.net[[GOLD]] IRC Chat,[[GOLD]] - [[GREEN]]http://bit.ly/H6XwFb[[GOLD]] Bukkit Forum Thread +Commands.addlevels.AwardAll.1=[[GREEN]]You were awarded {0} levels in all skills! +Commands.addlevels.AwardAll.2=[[RED]]All skills have been modified for {0}. +Commands.addlevels.AwardSkill.1=[[GREEN]]You were awarded {0} levels in {1}! +Commands.addlevels.AwardSkill.2=[[RED]]{0} has been modified for {1}. +Commands.addxp.AwardAll=[[GREEN]]You were awarded {0} experience in all skills! +Commands.addxp.AwardSkill=[[GREEN]]You were awarded {0} experience in {1}! Commands.Ability.Off=Ability use toggled [[RED]]off Commands.Ability.On=Ability use toggled [[GREEN]]on Commands.AdminChat.Off=Admin Sgwrs unig [[RED]] Oddi ar diff --git a/src/main/resources/locale/locale_de.properties b/src/main/resources/locale/locale_de.properties index d3b4b5fdc..885665204 100644 --- a/src/main/resources/locale/locale_de.properties +++ b/src/main/resources/locale/locale_de.properties @@ -377,6 +377,12 @@ Combat.TouchedFuzzy=[[DARK_RED]]Ungl\u00FCcklich ber\u00FChrt. Schwindelgef\u00F #KOMMANDOS ##allgemein mcMMO.Description=[[DARK_AQUA]]\u00DCber das [[YELLOW]]mcMMO[[DARK_AQUA]] Project:,[[GOLD]]mcMMO ist ein [[RED]]Open Source[[GOLD]] RPG Mod [[GOLD]]von [[BLUE]]nossr50[[GOLD]] aus 2011,[[GOLD]]Ziel ist es eine qualitative RPG Erfahrung zu bieten.,[[DARK_AQUA]]Tips:,[[GOLD]] - [[GOLD]]Nutze [[RED]]/mcc[[GOLD]] f\u00FCr die Commands,[[GOLD]] - [[GOLD]]Nutze [[RED]]/SKILLNAME[[GOLD]] f\u00FCr detailierte Skillinfos,[[DARK_AQUA]]Entwickler:,[[GOLD]] - [[GREEN]]nossr50 [[BLUE]](Projekleiter),[[GOLD]] - [[GREEN]]GJ [[BLUE]](Senior Entwickler),[[GOLD]] - [[GREEN]]NuclearW [[BLUE]](Entwickler),[[GOLD]] - [[GREEN]]bm01 [[BLUE]](Entwickler),[[DARK_AQUA]]N\u00FCtzliche Links:,[[GOLD]] - [[GREEN]]issues.mcmmo.org[[GOLD]] Fehlerberichte,[[GOLD]] - [[GREEN]]#mcmmo @ irc.esper.net[[GOLD]] IRC Chat,[[GOLD]] - [[GREEN]]http://bit.ly/H6XwFb[[GOLD]] Thema im Bukkit Forum,[[DARK_AQUA]]Deutsche \u00DCbersetzung:,[[GOLD]] - [[BLUE]] Jobsti +Commands.addlevels.AwardAll.1=[[GREEN]]You were awarded {0} levels in all skills! +Commands.addlevels.AwardAll.2=[[RED]]All skills have been modified for {0}. +Commands.addlevels.AwardSkill.1=[[GREEN]]You were awarded {0} levels in {1}! +Commands.addlevels.AwardSkill.2=[[RED]]{0} has been modified for {1}. +Commands.addxp.AwardAll=[[GREEN]]You were awarded {0} experience in all skills! +Commands.addxp.AwardSkill=[[GREEN]]You were awarded {0} experience in {1}! Commands.Ability.Off=F\u00E4higkeiten [[RED]]deaktiviert Commands.Ability.On=F\u00E4higkeiten [[GREEN]]aktivivert Commands.AdminChat.Off=Admin Chat only [[RED]]deaktiviert diff --git a/src/main/resources/locale/locale_en_US.properties b/src/main/resources/locale/locale_en_US.properties index 95e151c3b..086f47279 100644 --- a/src/main/resources/locale/locale_en_US.properties +++ b/src/main/resources/locale/locale_en_US.properties @@ -386,6 +386,12 @@ Combat.TouchedFuzzy=[[DARK_RED]]Touched Fuzzy. Felt Dizzy. #COMMANDS ##generic mcMMO.Description=[[DARK_AQUA]]About the [[YELLOW]]mcMMO[[DARK_AQUA]] Project:,[[GOLD]]mcMMO is an [[RED]]open source[[GOLD]] RPG mod created in February 2011,[[GOLD]]by [[BLUE]]nossr50[[GOLD]]. The goal is to provide a quality RPG experience.,[[DARK_AQUA]]Tips:,[[GOLD]] - [[GREEN]]Use [[RED]]/mcc[[GREEN]] to see commands,[[GOLD]] - [[GREEN]]Type [[RED]]/SKILLNAME[[GREEN]] to see detailed skill info,[[DARK_AQUA]]Developers:,[[GOLD]] - [[GREEN]]nossr50 [[BLUE]](Project Lead),[[GOLD]] - [[GREEN]]GJ [[BLUE]](Senior Developer),[[GOLD]] - [[GREEN]]NuclearW [[BLUE]](Developer),[[GOLD]] - [[GREEN]]bm01 [[BLUE]](Developer),[[DARK_AQUA]]Useful Links:,[[GOLD]] - [[GREEN]]issues.mcmmo.org[[GOLD]] Bug Reporting,[[GOLD]] - [[GREEN]]#mcmmo @ irc.esper.net[[GOLD]] IRC Chat,[[GOLD]] - [[GREEN]]http://bit.ly/H6XwFb[[GOLD]] Bukkit Forum Thread +Commands.addlevels.AwardAll.1=[[GREEN]]You were awarded {0} levels in all skills! +Commands.addlevels.AwardAll.2=[[RED]]All skills have been modified for {0}. +Commands.addlevels.AwardSkill.1=[[GREEN]]You were awarded {0} levels in {1}! +Commands.addlevels.AwardSkill.2=[[RED]]{0} has been modified for {1}. +Commands.addxp.AwardAll=[[GREEN]]You were awarded {0} experience in all skills! +Commands.addxp.AwardSkill=[[GREEN]]You were awarded {0} experience in {1}! Commands.Ability.Off=Ability use toggled [[RED]]off Commands.Ability.On=Ability use toggled [[GREEN]]on Commands.AdminChat.Off=Admin Chat only [[RED]]Off @@ -455,6 +461,7 @@ Commands.Usage.Message=message Commands.Usage.PartyName=party-name Commands.Usage.Player=player Commands.Usage.Skill=skill +Commands.Usage.XP=xp mcMMO.NoInvites=[[RED]]You have no invites at this time mcMMO.NoPermission=[[DARK_RED]]Insufficient permissions. mcMMO.NoSkillNote=[[DARK_GRAY]]If you don't have access to a skill it will not be shown here.